HeaderParser class
Packet Rx Meta Parser Buffer
Rx Packet Buffer and the state of the PacketTransformer
- Inheritance
-
- Object
- TypedDataBuffer
- ByteStructBuffer<
Packet> - PacketBuffer<
Packet> - HeaderParser
Constructors
-
HeaderParser(PacketFormat<
Packet> packetInterface, [int? size])
Properties
- bufferAsBytes → Uint8List
-
finalinherited
- bufferAsStruct → Packet
-
full Struct viewusing 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
byteto 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 ByteStructview aslength availablein buffer, maybe a partial or incomplete view nullable accessors in effect, length is set in contentsinherited -
viewBufferAsStruct<
S extends Struct> (TypedDataCaster< S> caster) → S? -
view as ffi.Structmust be on full length or Struct.create will throw view asfull length,including invalid data.a buffer backing larger than all potential calls is expected to be allocated at initializationinherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited