HeaderParser class

Packet Rx Meta Parser Buffer Rx Packet Buffer and the state of the PacketTransformer

Inheritance

Constructors

HeaderParser(PacketFormat<Packet> packetInterface, [int? size])

Properties

bufferAsBytes Uint8List
finalinherited
bufferAsStruct Packet
full Struct view using a main struct type, max length buffer, with keyed fields, build functions unconstrained.
finalinherited
hashCode int
The hash code for this object.
no setterinherited
isEmpty bool
Whether the buffer is empty.
no setterinherited
isNotEmpty bool
Whether the buffer is non-empty.
no setterinherited
length int
The number of bytes in this builder.
no setterinherited
lengthMax int
no setterinherited
packetClass PacketFormat<Packet>
finalinherited
payloadLength int
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
status HeaderStatus
no setter
structCaster TypedDataCaster<Packet>
finalinherited
trailing Uint8List
getter/setter pair
viewAsBytes Uint8List
no setterinherited
viewAsPacket Packet
no setterinherited
viewAsStruct Packet
no setterinherited
viewLength int
getter/setter pairinherited

Methods

add(covariant Uint8List bytes) → void
start at current length
inherited
addByte(int byte) → void
Appends byte to the current contents of this builder.
inherited
buildRequest<V>(PacketIdRequest<V, dynamic> packetId, V requestArgs) PayloadMeta
build functions mutate viewLength
inherited
buildSync(PacketId packetId) → void
inherited
clear() → void
Clears the contents of this builder.
inherited
completePacket() → void
copy(Uint8List bytes, [int offset = 0]) → void
start at offset, or 0
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parseResponse<V>(PacketIdRequest<dynamic, V> packetId, [PayloadMeta? reqStateMeta]) → V
parse functions redirect, socket call packet directly
inherited
parseSyncId() PacketSyncId?
inherited
receive(Uint8List bytes) → void
seekStart() → void
seekTrailing() → void
takeBytes() Uint8List
return must be processed before next add
inherited
toBytes() Uint8List
Returns a copy of the current byte contents of this builder.
inherited
toString() String
A string representation of this object.
inherited
viewAs<S>(TypedDataCaster<S> caster) → S
view as ByteStruct view as length available in buffer, maybe a partial or incomplete view nullable accessors in effect, length is set in contents
inherited
viewBufferAsStruct<S extends Struct>(TypedDataCaster<S> caster) → S?
view as ffi.Struct must be on full length or Struct.create will throw view as full length, including invalid data. a buffer backing larger than all potential calls is expected to be allocated at initialization
inherited

Operators

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