Skip to main content

Crate zerodds_opcua_uacp

Crate zerodds_opcua_uacp 

Source
Expand description

OPC-UA Connection Protocol (UACP, OPC Foundation Part 6 §7.1) — the opc.tcp:// binary message framing that carries OPC-UA Client/Server traffic.

Crate zerodds-opcua-uacp. Safety classification: STANDARD. Spec: OPC-UA Part 6 — Mappings §7.1 (Connection Protocol).

§Scope and relationship to the rest of the OPC-UA stack

This is the wire foundation for a native OPC-UA Client/Server stack (the request/response counterpart to the native UADP PubSub stack in zerodds-opcua-pubsub). The layers build up:

  1. UACP (this crate) — the TCP message framing: every message starts with an 8-byte header (MessageType + ChunkType + MessageSize), then a body. The connection-setup messages — Hello / Acknowledge / Error / ReverseHello — are handled here in full.
  2. SecureChannel (OPN/CLO/MSG messages + symmetric/asymmetric crypto) — next.
  3. Session + Service dispatch (Part 4) over the SecureChannel.
  4. Server (serving the zerodds-opcua-gateway AddressSpace + the zerodds-opcua-pubsub Information Model) and Client.

The OPC-UA Part 6 §5 binary encoding is reused from zerodds_opcua_pubsub::binary (UaReader/UaWriter).

Re-exports§

pub use connection::AcknowledgeMessage;
pub use connection::ChunkType;
pub use connection::ErrorMessage;
pub use connection::HelloMessage;
pub use connection::MessageHeader;
pub use connection::MessageType;
pub use connection::ReverseHelloMessage;
pub use securechannel::AsymmetricAlgorithmSecurityHeader;
pub use securechannel::ChannelSecurityToken;
pub use securechannel::OpenSecureChannelRequest;
pub use securechannel::OpenSecureChannelResponse;
pub use securechannel::ParsedChunk;
pub use securechannel::RequestHeader;
pub use securechannel::ResponseHeader;
pub use securechannel::SecureChannel;
pub use securechannel::SequenceHeader;
pub use securechannel::parse_chunk;

Modules§

connection
UACP connection-setup messages (OPC-UA Part 6 §7.1.2): the message header plus Hello / Acknowledge / Error / ReverseHello.
securechannel
OPC-UA SecureChannel (Part 6 §6.7) on top of the UACP framing — the OPN / MSG / CLO message chunks, their security/sequence headers, the common service RequestHeader/ResponseHeader, and the OpenSecureChannel service.

Structs§

UaReader
Cursor-based little-endian byte reader over a borrowed slice.
UaWriter
Append-only little-endian byte writer backed by a growable Vec.

Enums§

DecodeError
Error while decoding an OPC-UA / UADP value.
EncodeError
Error while encoding an OPC-UA / UADP value.