3rd Eye Scene C#
3rd Eye Scene C# documentation
|
The header for an incoming 3ES data packet. More...
Public Member Functions | |
bool | Write (BinaryWriter writer) |
Write this packet to a network writer. | |
bool | Read (BinaryReader reader) |
Attempt to reader a packet header. | |
Static Public Member Functions | |
static PacketHeader | Create (ushort routingID, ushort messageID) |
Create a default header with the given routingID . | |
Public Attributes | |
UInt32 | Marker |
Marker bytes. | |
UInt16 | VersionMajor |
Packet major version number. | |
UInt16 | VersionMinor |
Packet major version number. | |
UInt16 | RoutingID |
Identifies the main packet receiver. | |
UInt16 | MessageID |
Identifies the message ID or message type. | |
UInt16 | PayloadSize |
Size of the payload (bytes) following this header. | |
byte | PayloadOffset |
A byte offset from the end of the packet header to the payload data. | |
byte | Flags |
PacketFlag values. | |
Static Public Attributes | |
static readonly UInt32 | PacketMarker = 0x03e55e30u |
A four byte sequence used to identify a 3rd Eye Scene packet. | |
static readonly UInt16 | PacketVersionMajor = (UInt16)0x0u |
The current major version number for a 3rd Eye Scene packet. | |
static readonly UInt16 | PacketVersionMinor = (UInt16)0x1u |
The current minor version number for a 3rd Eye Scene packet. | |
Properties | |
static int | Size [get] |
Returns type byte size of a PacketHeader. | |
static int | PayloadSizeOffset [get] |
Returns the byte offset to the PayloadSize member. | |
static int | FlagsOffset [get] |
Returns the byte offset to the Flags member. | |
static PacketHeader | Default [get] |
Create a new header with the default values set. | |
int | PacketSize [get] |
Calculate and return the size of this packet, including the payload, but not CRC. | |
int | DataSize [get] |
Calculate the size of the data in the packet, without the header. |
The header for an incoming 3ES data packet.
All packet data, including payload bytes, must be in network endian which is big endian.
A two byte CRC value is to appear immediately after the Packet
header and payload.
static PacketHeader Tes::IO::PacketHeader::Create | ( | ushort | routingID, |
ushort | messageID | ||
) | [inline, static] |
bool Tes::IO::PacketHeader::Read | ( | BinaryReader | reader | ) | [inline] |
Attempt to reader a packet header.
reader | The reader to read from. |
bool Tes::IO::PacketHeader::Write | ( | BinaryWriter | writer | ) | [inline] |
Write this packet to a network writer.
writer | The network writer. |
Marker bytes.
Identifies the packet start.
A byte offset from the end of the packet header to the payload data.
Typically, the offset is zero and the payload begins immediately after the PacketHeader. However, this value serves in part as future proofing, to support additional information in the PacketHeader immediately following the core data presented here.
Packet major version number.
May be used to control decoding.
Packet major version number.
May be used to control decoding.
int Tes::IO::PacketHeader::DataSize [get] |
Calculate the size of the data in the packet, without the header.
This is the number of bytes following the header.
PacketHeader Tes::IO::PacketHeader::Default [static, get] |
Create a new header with the default values set.
This includes the default marker and version number.
int Tes::IO::PacketHeader::FlagsOffset [static, get] |
Returns the byte offset to the Flags member.
The byte offset to the packet flags member.
int Tes::IO::PacketHeader::PacketSize [get] |
Calculate and return the size of this packet, including the payload, but not CRC.
The size is calculated as the sum of the this header size, the payload offset (additional header size) and the payload size.
The size of the packet in bytes.
int Tes::IO::PacketHeader::PayloadSizeOffset [static, get] |
Returns the byte offset to the PayloadSize member.
The byte offset to the payload size member.
int Tes::IO::PacketHeader::Size [static, get] |
Returns type byte size of a PacketHeader.
The byte size of this structure type.