Public Member Functions | |
SegmentData (byte[] data) | |
byte[] | ToByteArray () |
void | FromByteArray (ref byte[] src, ref int currentPos) |
void | Test () |
Static Public Member Functions | |
SegmentData[] | FromMessage (Message msg) |
SegmentData[] | FromMessage (Message msg, int maxDataSize) |
byte[] | ArrayToByteArray (SegmentData[] src) |
Static Public Attributes | |
readonly int | MAX_DATA_SIZE = 471 |
Properties | |
byte[] | Data |
ushort | DataLength |
ushort | Length |
Definition at line 73 of file SmartDeviceClient/SmartProtocolStack/Segment.cs.
|
<summary> Converts an ordered array of segment data into a byte array </summary> <param name="src">Array of segment data to convert</param> <returns>byte array representation of segment data</returns> Definition at line 177 of file SmartDeviceClient/SmartProtocolStack/Segment.cs. References DataLength, and Length. |
|
<summary> Constructs a SegmentData object from position in a byte array, </summary> <param name="src">Byte array to reconstruct from</param> <param name="currentPos">position in byte stream to start from. Updated after calling to point to 1st index after data</param> Definition at line 126 of file SmartDeviceClient/SmartProtocolStack/Segment.cs. |
|
<summary> Converts a message into a segment data array </summary> <param name="msg">The message to convert</param> <returns>A segment data array representing the message</returns> Definition at line 145 of file SmartDeviceClient/SmartProtocolStack/Segment.cs. |
|
<summary> size of data in data segment (ie minus length field) </summary> Definition at line 98 of file SmartDeviceClient/SmartProtocolStack/Segment.cs. Referenced by ArrayToByteArray(). |
|
<summary> Length of entire object when converted to byte array for transmission </summary> Definition at line 110 of file SmartDeviceClient/SmartProtocolStack/Segment.cs. Referenced by ArrayToByteArray(). |