Client Class
|
Previous Top Next |
QuatViewClient Properties
IPEndPoint ServerIP
|
Stores server IP address and port number
|
string TransmitFilePath
|
Path to the quaternion file to be transmitted
|
int TransmitDelay
|
The delay time between transmissions
|
string ErrorMsg
|
Readonly. Client error message.
|
string StatusMsg
|
Readonly. Client status message
|
QuatMessage CurrentMessage
|
Readonly. Current message being transmitted.
|
int NumMessagesSent
|
Readonly. Value that indicates the number of
messages transmitted.
|
bool IsConnected
|
Readonly. Flag that indicates if a connection has
been made.
|
bool IsTransmitting
|
Readonly. Flag that indicates if transmission is
in progress.
|
QuatViewClient Methods
bool Connect(IPEndPoint serverAddress)
|
Establishes connection to QuatView server. Returns true on success.
|
bool Connect()
|
Establishes connection to QuatView server. Returns true on success.
|
bool Disconnect()
|
Disconnects from QuatView server. Returns true on success.
|
bool TransmitFileStart(string FilePath)
|
Begins quaternion file transmission. Returns true on success.
|
bool TransmitFileStart()
|
Begins quaternion file transmission. Returns true on success.
|
bool TransmitFileStop()
|
Stops quaternion file transmission. Returns true on success.
|
bool TransmitQuaternion(cQuaternion quatOut)
|
Transmits a single quaternion object. Returns true on success.
|
Events
event TransmitEvent(object
sender, TransmitEventArgs eventArgs)
|
This event fires after every quaternion message transmission.
|
QuatMessage Class Listing
[Serializable]
public class QuatMessage
{
public uint
Num; // state number or message code if negative
public double
Time; // time
public double
q0,q1,q2,q3; // quaternion
public QuatMessage()
{
Num = 0;
Time = 0.0;
q0 = 1.00;
q1 = 0.00;
q2 = 0.00;
q3 = 0.00;
}
}
|
TransmitEventArgs Class Listing
public class TransmitEventArgs : EventArgs
{
public TransmitMsgType
MsgType;
public TransmitEventArgs()
{
// set the default type
MsgType = TransmitMsgType.Sent;
}
public TransmitEventArgs(TransmitMsgType
msgType)
{
MsgType = msgType;
}
}
|
TransmitMsgType Enumeration
public enum TransmitMsgType
{
Sent = 0, //
message was sent
StopUser = -1, //
premature stop (user commanded)
StopError = -2, //
premature stop (error condition)
StopEnd = -3, //
normal stop at end of playback file
Disconnect = -4, //
disconnect
};
|