CmdMessenger  3.0
CmdMessenger is a serial port messaging library for the .Net / Mono Platform.
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

Default constructor.

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

Constructor.

Parameters:
eolSeparatorThe End-Of-Line separator.
escapeCharacterThe escape character.

Member Function Documentation

Closes the serial port.

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

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:
disposingtrue if resources should be disposed, false if not.
void CommandMessenger.SerialPortManager.Initialize ( char  eolSeparator,
char  escapeCharacter 
)

Initializes this object.

Parameters:
eolSeparatorThe End-Of-Line separator.
escapeCharacterThe escape character.

Query ifthe serial port is open.

Returns:
true if open, false if not.

Opens the serial port.

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

Queries if a given port exists.

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

Reads a line from the string buffer.

Returns:
The read line.

Connects to a serial port defined through the current settings.

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

Stops listening to the serial port.

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

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 > ( value)

Writes a parameter to the serial port.

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

Writes a string to the serial port.

Parameters:
valueThe string to write.

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

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

Property Documentation

Gets or sets the current serial port settings.

The current serial settings.

Gets or sets the End-Of-Line delimiter.

The End-Of-Line delimiter.

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

time stamp of the last received line.

Gets the serial port.

The serial port.


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