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 | Events
CommandMessenger.TransportLayer.CommunicationManager Class Reference

Fas Manager for serial port data. More...

List of all members.

## Public Member Functions
| CommunicationManager ()
| Default constructor.
| CommunicationManager (char eolSeparator, char escapeCharacter)
| Constructor.
void | Initialize (char eolSeparator, char escapeCharacter)
| Initializes this object.
bool | StartListening ()
| Connects to a serial port defined through the current settings.
bool | Open ()
| Opens the serial port.
bool | PortExists ()
| Queries if a given port exists.
bool | Close ()
| Closes the serial port.
bool | IsOpen ()
| Query ifthe serial port is open.
bool | StopListening ()
| Stops listening to the serial port.
void | WriteLine (string value)
| Writes a string to the serial port.
void | WriteLine< T > (T value)
| Writes a parameter to the serial port followed by a NewLine.
void | Write< T > (T value)
| Writes a parameter to the serial port.
bool | UpdateBaudRateCollection ()
| Retrieves the possible baud rates for the currently selected serial port.
string | ReadLine ()
| Reads a line from the string buffer.
void | Dispose ()
| Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
## Public Attributes
readonly Encoding | StringEncoder = Encoding.GetEncoding("ISO-8859-1")
## Protected Member Functions
virtual void | Dispose (bool disposing)
| Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
## Properties
char | EolDelimiter`[get, set]`
| Gets or sets the End-Of-Line delimiter.
long | LastLineTimeStamp`[get, set]`
| Gets or sets the time stamp of the last received line.
SerialSettings | CurrentSerialSettings`[get, set]`
| Gets or sets the current serial port settings.
SerialPort | SerialPort`[get]`
| Gets the serial port.
## Events
EventHandler | NewLineReceived

## Detailed Description

Fas Manager for serial port data.

## Constructor & Destructor Documentation

CommandMessenger.TransportLayer.CommunicationManager.CommunicationManager | ( |  | ) |

Default constructor.

CommandMessenger.TransportLayer.CommunicationManager.CommunicationManager | ( | char | eolSeparator,
|  | char | escapeCharacter
| ) |  |

Constructor.

Parameters:

  eolSeparator | The End-Of-Line separator.
  escapeCharacter | The escape character.

## Member Function Documentation

bool CommandMessenger.TransportLayer.CommunicationManager.Close | ( |  | ) |

Closes the serial port.

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

void CommandMessenger.TransportLayer.CommunicationManager.Dispose | ( |  | ) |

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

virtual void CommandMessenger.TransportLayer.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.

void CommandMessenger.TransportLayer.CommunicationManager.Initialize | ( | char | eolSeparator,
|  | char | escapeCharacter
| ) |  |

Initializes this object.

Parameters:

  eolSeparator | The End-Of-Line separator.
  escapeCharacter | The escape character.

bool CommandMessenger.TransportLayer.CommunicationManager.IsOpen | ( |  | ) |

Query ifthe serial port is open.

Returns:
  true if open, false if not.

bool CommandMessenger.TransportLayer.CommunicationManager.Open | ( |  | ) |

Opens the serial port.

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

bool CommandMessenger.TransportLayer.CommunicationManager.PortExists | ( |  | ) |

Queries if a given port exists.

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

string CommandMessenger.TransportLayer.CommunicationManager.ReadLine | ( |  | ) |

Reads a line from the string buffer.

Returns:
  The read line.

bool CommandMessenger.TransportLayer.CommunicationManager.StartListening | ( |  | ) |

Connects to a serial port defined through the current settings.

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

bool CommandMessenger.TransportLayer.CommunicationManager.StopListening | ( |  | ) |

Stops listening to the serial port.

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

bool CommandMessenger.TransportLayer.CommunicationManager.UpdateBaudRateCollection | ( |  | ) |

Retrieves the possible baud rates for the currently selected serial port.

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

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

Writes a parameter to the serial port.

Template Parameters:

  T | Generic type parameter.

Parameters:

  value | The value.

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

Writes a string to the serial port.

Parameters:

  value | The string to write.

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

Writes a parameter to the serial port followed by a NewLine.

Template Parameters:

  T | Generic type parameter.

Parameters:

  value | The value.

## Property Documentation

SerialSettings CommandMessenger.TransportLayer.CommunicationManager.CurrentSerialSettings`[get, set]`

Gets or sets the current serial port settings.

The current serial settings.

char CommandMessenger.TransportLayer.CommunicationManager.EolDelimiter`[get, set]`

Gets or sets the End-Of-Line delimiter.

The End-Of-Line delimiter.

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

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

time stamp of the last received line.

SerialPort CommandMessenger.TransportLayer.CommunicationManager.SerialPort`[get]`

Gets the serial port.

The serial port.

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