CmdMessenger
3.0
CmdMessenger is a serial port messaging library for the Arduino
|
Fas Manager for serial port data More...
Public Member Functions | |
SerialPortManager () | |
Default constructor. More... | |
SerialPortManager (char eolSeparator, char escapeCharacter) | |
Constructor. More... | |
void | Initialize (char eolSeparator, char escapeCharacter) |
Initializes this object. More... | |
bool | StartListening () |
Connects to a serial port defined through the current settings. More... | |
bool | Open () |
Opens the serial port. More... | |
bool | PortExists () |
Queries if a given port exists. More... | |
bool | Close () |
Closes the serial port. More... | |
bool | IsOpen () |
Query ifthe serial port is open. More... | |
bool | StopListening () |
Stops listening to the serial port. More... | |
void | WriteLine (string value) |
Writes a string to the serial port. More... | |
void | WriteLine< T > (T value) |
Writes a parameter to the serial port followed by a NewLine. More... | |
void | Write< T > (T value) |
Writes a parameter to the serial port. More... | |
bool | UpdateBaudRateCollection () |
Retrieves the possible baud rates for the currently selected serial port. More... | |
string | ReadLine () |
Reads a line from the string buffer. More... | |
void | Dispose () |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More... | |
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. More... | |
Properties | |
char | EolDelimiter [get, set] |
Gets or sets the End-Of-Line delimiter. More... | |
long | LastLineTimeStamp [get, set] |
Gets or sets the time stamp of the last received line. More... | |
SerialSettings | CurrentSerialSettings [get, set] |
Gets or sets the current serial port settings. More... | |
SerialPort | SerialPort [get] |
Gets the serial port. More... | |
Events | |
EventHandler | NewLineReceived |
Fas Manager for serial port data
|
inline |
Default constructor.
References CommandMessenger.SerialPortManager.Initialize().
|
inline |
Constructor.
eolSeparator | The End-Of-Line separator. |
escapeCharacter | The escape character. |
References CommandMessenger.SerialPortManager.Initialize().
|
inline |
Closes the serial port.
References CommandMessenger.SerialPortManager.PortExists(), and CommandMessenger.SerialPortManager.SerialPort.
Referenced by CommandMessenger.SerialPortManager.Dispose(), CommandMessenger.SerialPortManager.StartListening(), CommandMessenger.SerialPortManager.StopListening(), and CommandMessenger.SerialPortManager.UpdateBaudRateCollection().
|
inline |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
|
inlineprotectedvirtual |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
disposing | true if resources should be disposed, false if not. |
References CommandMessenger.SerialPortManager.Close(), and CommandMessenger.SerialPortManager.IsOpen().
|
inline |
Initializes this object.
eolSeparator | The End-Of-Line separator. |
escapeCharacter | The escape character. |
References CommandMessenger.SerialPortManager.EolDelimiter, and CommandMessenger.SerialSettings.PortNameCollection.
Referenced by CommandMessenger.SerialPortManager.SerialPortManager().
|
inline |
Query ifthe serial port is open.
References CommandMessenger.SerialPortManager.PortExists().
Referenced by CommandMessenger.SerialPortManager.Dispose(), and CommandMessenger.SerialPortManager.StartListening().
|
inline |
Opens the serial port.
References CommandMessenger.SerialPortManager.PortExists(), and CommandMessenger.SerialPortManager.SerialPort.
Referenced by CommandMessenger.SerialPortManager.StartListening(), and CommandMessenger.SerialPortManager.UpdateBaudRateCollection().
|
inline |
Queries if a given port exists.
Referenced by CommandMessenger.SerialPortManager.Close(), CommandMessenger.SerialPortManager.IsOpen(), and CommandMessenger.SerialPortManager.Open().
|
inline |
Reads a line from the string buffer.
References CommandMessenger.SerialPortManager.LastLineTimeStamp, and CommandMessenger.TimeUtils.Millis.
|
inline |
Connects to a serial port defined through the current settings.
References CommandMessenger.SerialSettings.BaudRate, CommandMessenger.SerialPortManager.Close(), CommandMessenger.SerialSettings.DataBits, CommandMessenger.SerialPortManager.IsOpen(), CommandMessenger.SerialPortManager.Open(), CommandMessenger.SerialSettings.Parity, CommandMessenger.SerialSettings.PortName, CommandMessenger.SerialPortManager.SerialPort, and CommandMessenger.SerialSettings.StopBits.
Referenced by CommandMessenger.CmdMessenger.StartListening().
|
inline |
Stops listening to the serial port.
References CommandMessenger.SerialPortManager.Close().
|
inline |
Retrieves the possible baud rates for the currently selected serial port.
References CommandMessenger.SerialPortManager.Close(), CommandMessenger.SerialPortManager.Open(), CommandMessenger.SerialSettings.PortName, and CommandMessenger.SerialPortManager.SerialPort.
|
inline |
Writes a parameter to the serial port.
T | Generic type parameter. |
value | The value. |
|
inline |
|
inline |
Writes a parameter to the serial port followed by a NewLine.
T | Generic type parameter. |
value | The value. |
|
getset |
Gets or sets the current serial port settings.
The current serial settings.
|
getset |
Gets or sets the End-Of-Line delimiter.
The End-Of-Line delimiter.
Referenced by CommandMessenger.SerialPortManager.Initialize().
|
getset |
Gets or sets the time stamp of the last received line.
time stamp of the last received line.
Referenced by CommandMessenger.SerialPortManager.ReadLine().
|
get |
Gets the serial port.
The serial port.
Referenced by CommandMessenger.SerialPortManager.Close(), CommandMessenger.SerialPortManager.Open(), CommandMessenger.SerialPortManager.StartListening(), and CommandMessenger.SerialPortManager.UpdateBaudRateCollection().