nuttx/Documentation/applications/examples/s2opc/index.rst
raiden00pl 2a34f57dce Documentation: add S2OPC documentation
add S2OPC documentation

Assisted-by: Claude Code
Signed-off-by: raiden00pl <raiden00@railab.me>
2026-09-14 18:30:38 -03:00

45 lines
1.2 KiB
ReStructuredText

==================================
``s2opc`` OPC UA server example
==================================
Overview
========
``s2opc`` runs an OPC UA server on NuttX. It provides an anonymous
``SecurityPolicy None`` endpoint and an address space generated as C source,
without XML files or embedded certificates.
Configuration
=============
Enable ``CONFIG_EXAMPLES_S2OPC``.
``CONFIG_EXAMPLES_S2OPC_ENDPOINT_URL`` selects the default endpoint URL.
Usage
=====
Start the server with the configured endpoint::
nsh> s2opc
S2OPC server: opc.tcp://10.0.0.2:4841
Press Ctrl-C to stop
An endpoint URL can be supplied on the command line::
nsh> s2opc opc.tcp://192.168.1.20:4841
The URL address must belong to a configured NuttX network interface. Press
Ctrl-C to stop the server.
Client test
===========
Connect an OPC UA client to the printed endpoint. The address space includes
the standard ``ServerStatus.CurrentTime`` node, ``i=2258``, and the test
variable ``ns=1;s=PubInt16``. For example, with the AsyncUA command-line
tools installed on the host::
$ uaread -u opc.tcp://10.0.0.2:4841 -n i=2258
This test needs no separate OPC UA server: NuttX is the server and the host
tool is the client.