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

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Members

Public Member Functions | Public Attributes | Protected Member Functions | Properties | Events
CommandMessenger.SerialPortManager Class Reference

Fas Manager for serial port data. More...

List of all members.

## Public Member Functions
| SerialPortManager ()
| Default constructor.
| SerialPortManager (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.SerialPortManager.SerialPortManager | ( |  | ) |

Default constructor.

CommandMessenger.SerialPortManager.SerialPortManager | ( | char | eolSeparator,
|  | char | escapeCharacter
| ) |  |

Constructor.

Parameters:

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

## Member Function Documentation

bool CommandMessenger.SerialPortManager.Close | ( |  | ) |

Closes the serial port.

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

void CommandMessenger.SerialPortManager.Dispose | ( |  | ) |

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

virtual void CommandMessenger.SerialPortManager.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.SerialPortManager.Initialize | ( | char | eolSeparator,
|  | char | escapeCharacter
| ) |  |

Initializes this object.

Parameters:

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

bool CommandMessenger.SerialPortManager.IsOpen | ( |  | ) |

Query ifthe serial port is open.

Returns:
  true if open, false if not.

bool CommandMessenger.SerialPortManager.Open | ( |  | ) |

Opens the serial port.

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

bool CommandMessenger.SerialPortManager.PortExists | ( |  | ) |

Queries if a given port exists.

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

string CommandMessenger.SerialPortManager.ReadLine | ( |  | ) |

Reads a line from the string buffer.

Returns:
  The read line.

bool CommandMessenger.SerialPortManager.StartListening | ( |  | ) |

Connects to a serial port defined through the current settings.

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

bool CommandMessenger.SerialPortManager.StopListening | ( |  | ) |

Stops listening to the serial port.

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

bool CommandMessenger.SerialPortManager.UpdateBaudRateCollection | ( |  | ) |

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

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

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

Writes a parameter to the serial port.

Template Parameters:

  T | Generic type parameter.

Parameters:

  value | The value.

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

Writes a string to the serial port.

Parameters:

  value | The string to write.

void CommandMessenger.SerialPortManager.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.SerialPortManager.CurrentSerialSettings`[get, set]`

Gets or sets the current serial port settings.

The current serial settings.

char CommandMessenger.SerialPortManager.EolDelimiter`[get, set]`

Gets or sets the End-Of-Line delimiter.

The End-Of-Line delimiter.

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

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

time stamp of the last received line.

SerialPort CommandMessenger.SerialPortManager.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/SerialPortManager.cs