Codec
for handling the primary fields of both ObjectCreateMessage
packets and ObjectCreateDetailedMessage
packets.
Take bit data and transform it into an object that expresses the important information of a game piece.
Take bit data and transform it into an object that expresses the important information of a game piece.
This function is fail-safe because it catches errors involving bad parsing of the bitstream data.
Generally, the Exception
messages themselves are not useful here.
The important parts are what the packet thought the object class should be and what it actually processed.
the code for the type of object being constructed
the bitstream data
a lookup function that returns a Codec
for this object class
the optional constructed object
ObjectClass
Take the important information of a game piece and transform it into bit data.
Take the important information of a game piece and transform it into bit data.
This function is fail-safe because it catches errors involving bad parsing of the object data.
Generally, the Exception
messages themselves are not useful here.
the code for the type of object being deconstructed
the object data
a lookup function that returns a Codec
for this object class
the bitstream data
ObjectClass
Calculate the stream length in number of bits by factoring in the whole message in two portions.
Calculate the stream length in number of bits by factoring in the whole message in two portions.
This process automates for: object encoding.
Ignoring the parent data, constant field lengths have already been factored into the results.
That includes:
the length of the stream length field (32u),
the object's class (11u),
the object's GUID (16u),
and the bit to determine if there will be parent data.
In total, these fields form a known fixed length of 60u.
if defined, the relationship between this object and another object (its parent); information about the parent adds either 24u or 32u
if defined, the data used to construct this type of object;
the data length is indeterminate until it is walked-through;
note: the type is StreamBitSize
as opposed to ConstructorData
the total length of the resulting data stream in bits