CmdMessenger  4.0.0
CmdMessenger is a serial port messaging library for the .Net / Mono Platform.
Public Member Functions | Protected Member Functions | Properties
CommandMessenger.CommunicationManager Class Reference

Manager for data over transport layer. More...

List of all members.

Public Member Functions

 CommunicationManager (ITransport transport, ReceiveCommandQueue receiveCommandQueue, BoardType boardType, char commandSeparator, char fieldSeparator, char escapeCharacter)
 Constructor.
void Dispose ()
bool Connect ()
 Connects to a transport layer defined through the current settings.
bool Disconnect ()
 Stops listening to the transport layer.
void WriteLine (string value)
 Writes a string to the transport layer.
void WriteLine< T > (T value)
 Writes a parameter to the transport layer followed by a NewLine.
void Write< T > (T value)
 Writes a parameter to the transport layer.
void Write (string value)
 Writes a string to the transport layer.
ReceivedCommand ExecuteSendCommand (SendCommand sendCommand, SendQueue sendQueueState)
 Directly executes the send command operation.
ReceivedCommand ExecuteSendString (String commandString, SendQueue sendQueueState)
 Directly executes the send string operation.

Protected Member Functions

virtual void Dispose (bool disposing)

Properties

char FieldSeparator [get, set]
 The field separator.
char CommandSeparator [get, set]
 The command separator.
char EscapeCharacter [get, set]
 The escape character.
bool PrintLfCr [get, set]
 Gets or sets a whether to print a line feed carriage return after each command.
BoardType BoardType [get, set]
long LastLineTimeStamp [get, set]
 Gets or sets the time stamp of the last received line.

Detailed Description

Manager for data over transport layer.


Constructor & Destructor Documentation

CommandMessenger.CommunicationManager.CommunicationManager ( ITransport  transport,
ReceiveCommandQueue  receiveCommandQueue,
BoardType  boardType,
char  commandSeparator,
char  fieldSeparator,
char  escapeCharacter 
)

Constructor.

Parameters:
receiveCommandQueue
boardTypeThe Board Type.
commandSeparatorThe End-Of-Line separator.
fieldSeparator
escapeCharacterThe escape character.
transportThe Transport Layer

Member Function Documentation

Connects to a transport layer defined through the current settings.

Returns:
true if it succeeds, false if it fails.

Stops listening to the transport layer.

Returns:
true if it succeeds, false if it fails.

Directly executes the send command operation.

Parameters:
sendCommandThe command to sent.
sendQueueStateProperty to optionally clear the send and receive queues.
Returns:
A received command. The received command will only be valid if the ReqAc of the command is true.
ReceivedCommand CommandMessenger.CommunicationManager.ExecuteSendString ( String  commandString,
SendQueue  sendQueueState 
)

Directly executes the send string operation.

Parameters:
commandStringThe string to sent.
sendQueueStateProperty to optionally clear the send and receive queues.
Returns:
The received command is added for compatibility. It will not yield a response.

Writes a string to the transport layer.

Parameters:
valueThe string to write.

Writes a parameter to the transport layer.

Template Parameters:
TGeneric type parameter.
Parameters:
valueThe value.

Writes a string to the transport layer.

Parameters:
valueThe string to write.

Writes a parameter to the transport layer followed by a NewLine.

Template Parameters:
TGeneric type parameter.
Parameters:
valueThe value.

Property Documentation

The command separator.

The escape character.

The field separator.

Gets or sets the time stamp of the last received line.

time stamp of the last received line.

Gets or sets a whether to print a line feed carriage return after each command.

true if print line feed carriage return, false if not.


The documentation for this class was generated from the following file: