Checksum of prev fields in header.
This field is automatically computed during serialization and verified during deserialization.
Payload size.
Destination socket ID.
See SlpSocketId.
3-byte SLP signature. Must always be SLP_SIGNATURE.
Source socket ID.
See SlpSocketId.
Packet type -- see SlpPacketType.
Transaction ID.
Assign properties to this object from a JSON object.
Conceptually equivalent to Object.assign(), but recursively hydrates SObjects / SArrays / SerializableWrappers etc and invokes their assignJSON() to process JSON values. For example:
class A extends SObject {
@field(SUInt8) prop1: number;
}
class B extends SObject {
@field() a = new A();
}
const b1 = new B();
b1.assignJSON({a: {prop1: 300}});
Assign properties to this object from a map of Serializables.
Conceptually equivalent to Object.assign(), but automatically unwraps
wrapped properties. Fields defined with @field()
are directly assigned,
and fields defined with @field(wrapper)
are assigned by unwrapping the
corresponding SerializableWrapper. Unknown fields are considered an error.
Computes header checksum based on other header fields.
Optional
opts: DeserializeOptionsComputes the serialized length of this value.
Optional
opts: SerializeOptionsOptional
opts: SerializeOptionsMap values of this object to Serializable.
Fields defined with @field()
are preserved as-is, and field defined with
@field(wrapper)
are wrapped in their respective wrapper types.
Static
fromStatic
withStatic
withJSON
SLP datagram header.