Message extensions

These commands are used to manipulate message objects in Tcl.

The Tcl extensions in the message category perform operations on hci message objects that can contain large amounts of arbitrary data. Metadata that is associated with each message can reflect and affect how the message proceeds through the engine.

Message objects support data with null characters embedded within them.

Message objects can read and write data directly to and from open file handles and support three types of message boundary determination:

  • len10: 10-byte length-encoded
  • nl: Newline-terminated
  • raw: No externally visible message boundary

In some commands, use offset and length values to specify message regions.

If the offset is not specified, then the beginning of the message is assumed. Offsets beyond the end of the message refer to the character beyond the end of the existing data.

If the length is not specified, then the remainder of the message is used. Lengths that exceed the remainder of the message data encompass the remainder of the message. A length value of end also encompasses the remainder of the message.

Lock message objects to prevent updates or removal. Attempts to modify or remove locked objects generate error conditions. See Locking message objects

A -binary option is available for msgcreate, msgset, msginsert, and msgappend. When this is set, the message data is handled as binary data.