C# Class Xedia.Protocol.VSCP.EventHelper

Mostrar archivo Open project: grodansparadis/vscp_firmware

Public Methods

Method Description
CalcCRC ( byte packet, int length ) : short
EncodeData ( long value, byte dataBytes ) : byte[]
EncodeData ( long value, string data ) : byte[]
EncodeData ( long value, string data, byte dataBytes ) : byte[]
FromHex ( string hexString ) : byte[]
GetByte ( long value, int index ) : byte
GetCRC ( byte packet ) : short
GetDataBuffer ( byte packet ) : byte[]
GetDataCode ( byte packet ) : long
GetDataSize ( byte packet ) : short
GetDataString ( byte packet ) : string
GetEventCode ( byte packet ) : EventCode
HasCRC ( byte packet ) : bool
InZone ( long zone, byte mainZone, byte subZone ) : bool

Check to see if the specified zone covers the main and sub zones If zone is 0xFF then it encompases all zones

IsValidCRC ( byte packet ) : bool
ReadAddress ( byte packet ) : string
ReadPriority ( byte packet ) : EVENT_PRIORITY
SplitData ( string data, int unitSize ) : object[]
ToHex ( byte byteArray, int offset, int length ) : string

Method Details

CalcCRC() public static method

public static CalcCRC ( byte packet, int length ) : short
packet byte
length int
return short

EncodeData() public static method

public static EncodeData ( long value, byte dataBytes ) : byte[]
value long
dataBytes byte
return byte[]

EncodeData() public static method

public static EncodeData ( long value, string data ) : byte[]
value long
data string
return byte[]

EncodeData() public static method

public static EncodeData ( long value, string data, byte dataBytes ) : byte[]
value long
data string
dataBytes byte
return byte[]

FromHex() public static method

public static FromHex ( string hexString ) : byte[]
hexString string
return byte[]

GetByte() public static method

public static GetByte ( long value, int index ) : byte
value long
index int
return byte

GetCRC() public static method

public static GetCRC ( byte packet ) : short
packet byte
return short

GetDataBuffer() public static method

public static GetDataBuffer ( byte packet ) : byte[]
packet byte
return byte[]

GetDataCode() public static method

public static GetDataCode ( byte packet ) : long
packet byte
return long

GetDataSize() public static method

public static GetDataSize ( byte packet ) : short
packet byte
return short

GetDataString() public static method

public static GetDataString ( byte packet ) : string
packet byte
return string

GetEventCode() public static method

public static GetEventCode ( byte packet ) : EventCode
packet byte
return EventCode

HasCRC() public static method

public static HasCRC ( byte packet ) : bool
packet byte
return bool

InZone() public static method

Check to see if the specified zone covers the main and sub zones If zone is 0xFF then it encompases all zones
public static InZone ( long zone, byte mainZone, byte subZone ) : bool
zone long
mainZone byte
subZone byte
return bool

IsValidCRC() public static method

public static IsValidCRC ( byte packet ) : bool
packet byte
return bool

ReadAddress() public static method

public static ReadAddress ( byte packet ) : string
packet byte
return string

ReadPriority() public static method

public static ReadPriority ( byte packet ) : EVENT_PRIORITY
packet byte
return EVENT_PRIORITY

SplitData() public static method

public static SplitData ( string data, int unitSize ) : object[]
data string
unitSize int
return object[]

ToHex() public static method

public static ToHex ( byte byteArray, int offset, int length ) : string
byteArray byte
offset int
length int
return string