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

ProtocolStack::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 69 of file ProtocolStack/Segment.cs.

Member Function Documentation

byte [] ProtocolStack::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 173 of file ProtocolStack/Segment.cs.

References DataLength, and Length.

void ProtocolStack::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 122 of file ProtocolStack/Segment.cs.

SegmentData [] ProtocolStack::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 141 of file ProtocolStack/Segment.cs.

Property Documentation

ushort ProtocolStack::SegmentData::DataLength [get]

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

Definition at line 94 of file ProtocolStack/Segment.cs.

Referenced by ArrayToByteArray().

ushort ProtocolStack::SegmentData::Length [get]

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

Definition at line 106 of file ProtocolStack/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