This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 2a34f57dce8 Documentation: add S2OPC documentation
2a34f57dce8 is described below

commit 2a34f57dce87fae8585561827272a5cf080770b3
Author: raiden00pl <[email protected]>
AuthorDate: Thu Aug 20 14:41:04 2026 +0200

    Documentation: add S2OPC documentation
    
    add S2OPC documentation
    
    Assisted-by: Claude Code
    Signed-off-by: raiden00pl <[email protected]>
---
 .../applications/examples/s2opc/index.rst          | 45 ++++++++++++++
 .../applications/netutils/s2opc/index.rst          | 72 ++++++++++++++++++++++
 Documentation/applications/system/expat/index.rst  | 12 ++++
 3 files changed, 129 insertions(+)

diff --git a/Documentation/applications/examples/s2opc/index.rst 
b/Documentation/applications/examples/s2opc/index.rst
new file mode 100644
index 00000000000..48f59d3de92
--- /dev/null
+++ b/Documentation/applications/examples/s2opc/index.rst
@@ -0,0 +1,45 @@
+==================================
+``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.
diff --git a/Documentation/applications/netutils/s2opc/index.rst 
b/Documentation/applications/netutils/s2opc/index.rst
new file mode 100644
index 00000000000..abcfce2bec8
--- /dev/null
+++ b/Documentation/applications/netutils/s2opc/index.rst
@@ -0,0 +1,72 @@
+================================
+``s2opc`` OPC UA toolkit library
+================================
+
+Overview
+========
+
+S2OPC is an OPC UA toolkit from Systerel.  The NuttX package builds the OPC UA
+client/server and UADP PubSub components with mbedTLS.  UDP, MQTT, and
+raw-Ethernet PubSub transports are supported.  Optional XML loaders use Expat.
+The package supports the NuttX Make and CMake build systems.
+
+Configuration
+=============
+
+Enable ``CONFIG_NETUTILS_S2OPC``.  Its Kconfig dependencies require the
+following facilities:
+
+* mbedTLS
+* IPv4 or IPv6 networking with TCP, UDP, socket options, and TCP keepalive
+* socket binding to a named network device
+* the network database interfaces
+* POSIX recursive mutexes and a nonzero round-robin scheduler interval
+* ``/dev/urandom`` backed by a suitable random-number generator
+
+``CONFIG_S2OPC_THREAD_STACKSIZE`` controls the S2OPC worker-thread stack size.
+Secure OPC UA processing needs significantly more stack than a small utility.
+
+XML configuration is optional.  ``CONFIG_S2OPC_XML_LOADERS`` requires Expat and
+builds the S2OPC client, server, user, NodeSet, and PubSub XML loaders.  
Without
+this option, applications configure PubSub through ``sopc_pubsub_conf.h`` and
+configure client/server operation through the custom configuration APIs.
+Address spaces can be generated as C source or constructed with the address
+space API.  This avoids an XML parser and runtime XML files on constrained
+targets.  ``CONFIG_ALLOW_MIT_COMPONENTS`` is required only when enabling the
+Expat-backed XML loaders.
+
+Optional client/server facilities are controlled by:
+
+* ``CONFIG_S2OPC_NODE_MANAGEMENT`` for AddNodes and DeleteNodes
+* ``CONFIG_S2OPC_NODE_ADD_OPTIONAL`` for optional type children
+* ``CONFIG_S2OPC_HISTORY_READ`` for an application-provided raw-history store
+* ``CONFIG_S2OPC_EVENT_MANAGEMENT`` for server events
+* ``CONFIG_S2OPC_AUDITING`` for S2OPC 1.7.3 security audit events
+
+The application must load a mutable address space before using node
+management.  History reads require an application callback and history store.
+Event management requires the corresponding event types in the address space.
+
+PubSub transports
+=================
+
+UDP is always included with ``CONFIG_NETUTILS_S2OPC``.  UDP multicast requires
+the corresponding NuttX IGMP or MLD configuration.  A named multicast
+interface requires ``CONFIG_NETDEV_IFINDEX``.  Binding a socket to a named
+device requires ``CONFIG_NET_BINDTODEVICE``.
+
+``CONFIG_S2OPC_MQTT`` enables the Eclipse Paho MQTT Async backend and requires
+``CONFIG_LIB_MQTT5``.  The NuttX Paho package uses its high-performance mode to
+avoid host-oriented heap and call-stack tracing tables.  This does not disable
+MQTT protocol operation.
+
+``CONFIG_S2OPC_ETHERNET`` enables UADP over NuttX ``AF_PACKET`` sockets and
+requires ``CONFIG_NET_PKT``, packet-protocol socket options, and multicast
+group support through IGMP, MLD, or ICMPv6.  The network driver must implement
+multicast MAC filtering.  The NuttX backend requires an interface name and,
+for multicast reception, a destination multicast MAC address.  A process that
+opens simultaneous publisher and subscriber packet sockets needs at least two
+packet connections, for example
+``CONFIG_NET_PKT_PREALLOC_CONNS=2``.
+
+See :doc:`/applications/examples/s2opc/index` for the OPC UA server example.
diff --git a/Documentation/applications/system/expat/index.rst 
b/Documentation/applications/system/expat/index.rst
new file mode 100644
index 00000000000..1723809470d
--- /dev/null
+++ b/Documentation/applications/system/expat/index.rst
@@ -0,0 +1,12 @@
+============================
+``expat`` XML parser library
+============================
+
+``CONFIG_LIB_EXPAT`` provides the Expat streaming XML parser as a reusable
+NuttX applications library.
+
+General entity expansion and DTD processing are disabled by default.  Enable
+``CONFIG_LIB_EXPAT_GENERAL_ENTITIES`` or ``CONFIG_LIB_EXPAT_DTD`` only when an
+application requires them and its XML input policy has been reviewed.
+
+Expat uses the MIT license, so ``CONFIG_ALLOW_MIT_COMPONENTS`` must be enabled.

Reply via email to