C# Class RFID.RFIDInterface.PacketData

Datei anzeigen Open project: mti-rfid/RFID_Explorer Class Usage Examples

Public Methods

Method Description
AppendToNode ( XmlElement elm ) : XmlElement

XmlSerialize

CreatePacket ( PacketType packetType ) : PacketBase

Returns an uninitialized instance of the indicated packetType.

FullPacketBytes ( Byte Buffer, int PacketStartOffset ) : int
FullPacketBytes ( uint pkt_len ) : int

Caculate the size of a packet (including preamble) in bytes

GetPacketType ( PacketData packet ) : PacketType

Returns the packetType for a instance of one of the packet layouts classes.

GetPacketTypeFromBuffer ( byte buffer, int PacketStartOffset ) : PacketType
GetSafePacketType ( UInt16 pkt_type ) : PacketType
GetTypeFromPacketType ( PacketType packetType ) : Type
ParsePacket ( byte buffer, PacketBase &packet, string &errorMessage ) : PacketType

ParsePacket

pkt_len ( int totalBytes ) : UInt16

Private Methods

Method Description
Find_String_Length ( PacketBase body, System info ) : int
Parse_Fields ( PacketBase obj, byte buffer, int offset, int size ) : int

Parses a buffer that hold a packet data and updates the packet structure with data from the buffer.

Parse_String ( byte buffer, int offset, int strlen ) : string
Parse_UInt16 ( byte buffer, int offset ) : UInt16
Parse_UInt32 ( byte buffer, int offset ) : UInt32

Method Details

AppendToNode() public method

XmlSerialize
public AppendToNode ( XmlElement elm ) : XmlElement
elm System.Xml.XmlElement
return System.Xml.XmlElement

CreatePacket() public static method

Returns an uninitialized instance of the indicated packetType.
public static CreatePacket ( PacketType packetType ) : PacketBase
packetType PacketType Packet type to create.
return PacketBase

FullPacketBytes() public static method

public static FullPacketBytes ( Byte Buffer, int PacketStartOffset ) : int
Buffer Byte
PacketStartOffset int
return int

FullPacketBytes() public static method

Caculate the size of a packet (including preamble) in bytes
public static FullPacketBytes ( uint pkt_len ) : int
pkt_len uint value from pkt_len field of preamble
return int

GetPacketType() public static method

Returns the packetType for a instance of one of the packet layouts classes.
public static GetPacketType ( PacketData packet ) : PacketType
packet PacketData The packet instance
return PacketType

GetPacketTypeFromBuffer() public static method

public static GetPacketTypeFromBuffer ( byte buffer, int PacketStartOffset ) : PacketType
buffer byte
PacketStartOffset int
return PacketType

GetSafePacketType() public static method

public static GetSafePacketType ( UInt16 pkt_type ) : PacketType
pkt_type System.UInt16
return PacketType

GetTypeFromPacketType() public static method

public static GetTypeFromPacketType ( PacketType packetType ) : Type
packetType PacketType
return System.Type

ParsePacket() public static method

ParsePacket
public static ParsePacket ( byte buffer, PacketBase &packet, string &errorMessage ) : PacketType
buffer byte packet data to be parsed.
packet PacketBase
errorMessage string output parameter to hold any error message.
return PacketType

pkt_len() public static method

public static pkt_len ( int totalBytes ) : UInt16
totalBytes int
return System.UInt16