Main Page | Class Hierarchy | Class List | File List | Class Members

SmartDeviceGUIClient::SegmentData Class Reference

List of all members.

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


byte[] Data
ushort DataLength
ushort Length

Detailed Description

<summary> Contains the data in the segment that will eventually be transmitted, along with some metadata </summary>

Definition at line 68 of file SmartDeviceGUIClient/Segment.cs.

Member Function Documentation

byte [] SmartDeviceGUIClient::SegmentData::ArrayToByteArray SegmentData[]  src  )  [inline, static]

<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 172 of file SmartDeviceGUIClient/Segment.cs.

References DataLength, and Length.

void SmartDeviceGUIClient::SegmentData::FromByteArray ref byte[]  src,
ref int  currentPos

<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 121 of file SmartDeviceGUIClient/Segment.cs.

SegmentData [] SmartDeviceGUIClient::SegmentData::FromMessage Message  msg  )  [inline, static]

<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 140 of file SmartDeviceGUIClient/Segment.cs.

Property Documentation

ushort SmartDeviceGUIClient::SegmentData::DataLength [get]

<summary> size of data in data segment (ie minus length field) </summary>

Definition at line 93 of file SmartDeviceGUIClient/Segment.cs.

Referenced by ArrayToByteArray().

ushort SmartDeviceGUIClient::SegmentData::Length [get]

<summary> Length of entire object when converted to byte array for transmission </summary>

Definition at line 105 of file SmartDeviceGUIClient/Segment.cs.

Referenced by ArrayToByteArray().

The documentation for this class was generated from the following file:
Generated on Mon May 8 22:07:29 2006 by  doxygen