CmdMessenger 3.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 | Public Attributes | Protected Member Functions | Properties
CommandMessenger.CommunicationManager Class Reference

Manager for data over transport layer. More...

Inheritance diagram for CommandMessenger.CommunicationManager:

List of all members.

## Public Member Functions
| CommunicationManager (DisposeStack disposeStack, ITransport transport, ReceiveCommandQueue receiveCommandQueue)
| Default constructor.
| CommunicationManager (DisposeStack disposeStack, ITransport transport, ReceiveCommandQueue receiveCommandQueue, char commandSeparator, char fieldSeparator, char escapeCharacter)
| Constructor.
void | Initialize (DisposeStack disposeStack, ITransport transport, ReceiveCommandQueue receiveCommandQueue, char commandSeparator, char fieldSeparator, char escapeCharacter)
| Initializes this object.
bool | Connect ()
| Connects to a transport layer defined through the current settings.
bool | Disconnect ()
| Stops listening to the transport layer.
void | StartPolling ()
| Starts polling.
void | StopPolling ()
| Stop polling.
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 | UpdateTransportBuffer ()
void | ProcessLine (string line)
| Processes the byte message and add to queue.
## Public Attributes
readonly Encoding | StringEncoder = Encoding.GetEncoding("ISO-8859-1")
## Protected Member Functions
override void | Dispose (bool disposing)
| Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
## Properties
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 | ( | DisposeStack | disposeStack,
|  | ITransport | transport,
|  | ReceiveCommandQueue | receiveCommandQueue
| ) |  |

Default constructor.

/

Parameters:

  disposeStack | The DisposeStack
  transport | The Transport Layer
  receiveCommandQueue |

CommandMessenger.CommunicationManager.CommunicationManager | ( | DisposeStack | disposeStack,
|  | ITransport | transport,
|  | ReceiveCommandQueue | receiveCommandQueue,
|  | char | commandSeparator,
|  | char | fieldSeparator,
|  | char | escapeCharacter
| ) |  |

Constructor.

Parameters:

  receiveCommandQueue |
  commandSeparator | The End-Of-Line separator.
  fieldSeparator |
  escapeCharacter | The escape character.
  disposeStack | The DisposeStack
  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.

override void CommandMessenger.CommunicationManager.Dispose | ( | bool | disposing | ) | `[protected, virtual]`

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Parameters:

  disposing | true if resources should be disposed, false if not.

Reimplemented from CommandMessenger.DisposableObject.

void CommandMessenger.CommunicationManager.Initialize | ( | DisposeStack | disposeStack,
|  | ITransport | transport,
|  | ReceiveCommandQueue | receiveCommandQueue,
|  | char | commandSeparator,
|  | char | fieldSeparator,
|  | char | escapeCharacter
| ) |  |

Initializes this object.

Parameters:

  receiveCommandQueue |
  commandSeparator | The End-Of-Line separator.
  fieldSeparator |
  escapeCharacter | The escape character.
  disposeStack | The DisposeStack

/

Parameters:

  transport | The Transport Layer

void CommandMessenger.CommunicationManager.ProcessLine | ( | string | line | ) |

Processes the byte message and add to queue.

void CommandMessenger.CommunicationManager.StartPolling | ( |  | ) |

Starts polling.

void CommandMessenger.CommunicationManager.StopPolling | ( |  | ) |

Stop polling.

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

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

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

time stamp of the last received line.

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

- D:/My Documents/Github/Arduino-Code-and-Libraries/Libraries/CmdMessenger/CSharp/CommandMessenger/CommunicationManager.cs