6.7.2.2 Message Header

Every MessageChunk has a Message header with the fields defined in Table 57.

Table 57 – OPC UA Secure Conversation Message Header
NameData TypeDescription
MessageTypeByte [3]

A three byte ASCII code that identifies the Message type.

The following values are defined at this time:

MSG A Message secured with the keys associated with a channel.

OPN OpenSecureChannel Message.

CLO CloseSecureChannel Message.

IsFinalByte

A one byte ASCII code that indicates whether the MessageChunk is the final chunk in a Message.

The following values are defined at this time:

C An intermediate chunk.

F The final chunk.

A The final chunk (used when an error occurred and the Message is aborted).

This field is only meaningful for MessageType of ‘MSG’

This field is always ‘F’ for other MessageTypes.

MessageSizeUInt32

The length of the MessageChunk, in bytes.

The length starts from the beginning of the MessageType field.

SecureChannelIdUInt32

A unique identifier for the SecureChannel assigned by the Server.

If a Server receives a SecureChannelId which it does not recognize it shall return an appropriate transport layer error.

When a Server starts the first SecureChannelId used should be a value that is likely to be unique after each restart. This ensures that a Server restart does not cause previously connected Clients to accidently ‘reuse’ SecureChannels that did not belong to them.