OssFrameCodec class

Turns a message into the bytes that go on the wire and back.

The frame is LEN(2) || HEADER(19) || BODY, where LEN counts the header and body but not itself. HEXMessageLenCodec(2) in the Java hex-encodes the length and converts it back to bytes, which is a plain two-byte big-endian integer.

Constructors

OssFrameCodec(IsoMsgPackager packager, {int maxMessageSize = 9999})

Properties

hashCode → int
The hash code for this object.
no setterinherited
maxMessageSize → int
final
packager → IsoMsgPackager
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

decode(Uint8List payload) → IsoMsg
Decodes one frame body — the bytes after the length prefix. A rejected message carries its reject code in the header and no ISO body.
encode(IsoMsg message) → Uint8List
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

messageKey(IsoMsg message) → String
The mux key: the four sequence bytes of the link header, in hex. Ported from OssMessageKeyProvider.

Constants

headerLength → const int
lengthBytes → const int