CmdMessenger 4.0.0 CmdMessenger is a serial port messaging library for the .Net / Mono Platform.

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

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 |
  boardType | The Board Type.
  commandSeparator | The End-Of-Line separator.
  fieldSeparator |
  escapeCharacter | The escape character.
  transport | The Transport Layer

## Member Function Documentation

bool CommandMessenger.CommunicationManager.Connect | ( |  | ) |

Connects to a transport layer defined through the current settings.

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

bool CommandMessenger.CommunicationManager.Disconnect | ( |  | ) |

Stops listening to the transport layer.

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

ReceivedCommand CommandMessenger.CommunicationManager.ExecuteSendCommand | ( | SendCommand | sendCommand,
|  | SendQueue | sendQueueState
| ) |  |

Directly executes the send command operation.

Parameters:

  sendCommand | The command to sent.
  sendQueueState | Property 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:

  commandString | The string to sent.
  sendQueueState | Property to optionally clear the send and receive queues.

Returns:
  The received command is added for compatibility. It will not yield a response.

void CommandMessenger.CommunicationManager.Write | ( | string | value | ) |

Writes a string to the transport layer.

Parameters:

  value | The string to write.

void CommandMessenger.CommunicationManager.Write< T > | ( | T | value | ) |

Writes a parameter to the transport layer.

Template Parameters:

  T | Generic type parameter.

Parameters:

  value | The value.

void CommandMessenger.CommunicationManager.WriteLine | ( | string | value | ) |

Writes a string to the transport layer.

Parameters:

  value | The string to write.

void CommandMessenger.CommunicationManager.WriteLine< T > | ( | T | value | ) |

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

Template Parameters:

  T | Generic type parameter.

Parameters:

  value | The value.

## Property Documentation

char CommandMessenger.CommunicationManager.CommandSeparator`[get, set]`

The command separator.

char CommandMessenger.CommunicationManager.EscapeCharacter`[get, set]`

The escape character.

char CommandMessenger.CommunicationManager.FieldSeparator`[get, set]`

The field separator.

long CommandMessenger.CommunicationManager.LastLineTimeStamp`[get, set]`

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

time stamp of the last received line.

bool CommandMessenger.CommunicationManager.PrintLfCr`[get, set]`

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:

- D:/My Documents/Github/Arduino/Own Arduino libraries/CmdMessenger/Arduino-CmdMessenger/extras/CSharp/CommandMessenger/CommunicationManager.cs