|
DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
|
OPC UA Binary server: handshake + SecureChannel + Session + Read/Write + Browse (DETWS_ENABLE_OPCUA). More...
Go to the source code of this file.
OPC UA Binary server: handshake + SecureChannel + Session + Read/Write + Browse (DETWS_ENABLE_OPCUA).
OPC UA (IEC 62541) is large; this is built in increments. Increment 1 is the foundation every OPC UA server needs:
MessageType + chunk byte + MessageSize), andHEL, negotiate buffer sizes, emit an ACK.The codec + framing + handshake are pure and host-tested; opcua_rx() is the ConnProto::PROTO_OPCUA TCP data handler (ESP32) - listen(4840, ConnProto::PROTO_OPCUA) and a client gets through the handshake. Session and the Read service are later increments. SecurityPolicy is None (no encryption) for now.
Increment 2 adds the SecureChannel: NodeId / ExtensionObject / DateTime encoding on top of the increment-1 codec, then parsing an OpenSecureChannel (OPN) request and answering with an OpenSecureChannelResponse - the server assigns a SecureChannelId + security token (SecurityPolicy None, OPC UA Part 6 §7.1.3 / Part 4 §5.5.2).
Increment 3 adds the Session: MSG (secure conversation) service calls dispatched by their body TypeId - CreateSession (the server assigns a SessionId and AuthenticationToken) and ActivateSession (OPC UA Part 4 §5.6).
Increment 4 adds the Read service (OPC UA Part 4 §5.10): scalar Variant + DataValue encoding and a registered resolver that maps a NodeId/attribute to a value - the first service that returns live data.
Increment 5 adds the Browse service (OPC UA Part 4 §5.8.2) via a registered resolver (ReferenceDescription / QualifiedName / LocalizedText encoding) and CloseSession; CloseSecureChannel arrives as a CLO message and closes the slot.
Later increments add GetEndpoints + a ServiceFault fallback (so standard clients interoperate) and the Write service (DataValue/Variant decode + a registered write resolver). Verified end to end with python asyncua.
No heap, no stdlib.
Definition in file opcua.h.