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 | Protected Member Functions | Properties | Events
CommandMessenger.TransportLayer.SerialTransport Class Reference

Fas Manager for serial port data. More...

Inheritance diagram for CommandMessenger.TransportLayer.SerialTransport:

List of all members.

## Public Member Functions

| SerialTransport ()
| Default constructor.
void | Initialize ()
| Initializes this object.
bool | StartListening ()
| Connects to a serial port defined through the current settings.
bool | Open ()
| Opens the serial port.
bool | IsConnected ()
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 | Write (byte[] buffer)
| Writes a parameter to the serial port.
bool | UpdateBaudRateCollection ()
| Retrieves the possible baud rates for the currently selected serial port.
byte[] | Read ()
| Reads the serial buffer into the string buffer.
int | BytesInBuffer ()
| Gets the bytes in buffer.
void | Kill ()
| Kills this object.
bool | Join (int millisecondsTimeout)
| Joins the thread.

## Protected Member Functions

void | ProcessQueue ()
override void | Dispose (bool disposing)
| Remove all references and remove children.

## Properties

ThreadRunStates | ThreadRunState `[get, set]`
| Gets or sets the run state of the thread .
SerialSettings | CurrentSerialSettings `[get, set]`
| Gets or sets the current serial port settings.
SerialPort | SerialPort `[get]`
| Gets the serial port.

## Events

EventHandler | NewDataReceived

## Detailed Description

Fas Manager for serial port data.

## Constructor & Destructor Documentation

CommandMessenger.TransportLayer.SerialTransport.SerialTransport | ( |  | ) |

Default constructor.

## Member Function Documentation

int CommandMessenger.TransportLayer.SerialTransport.BytesInBuffer | ( |  | ) |

Gets the bytes in buffer.

Returns:
  Bytes in buffer

Implements CommandMessenger.TransportLayer.ITransport.

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

Closes the serial port.

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

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

Remove all references and remove children.

Parameters:

  disposing | If true, cleanup

Reimplemented from CommandMessenger.DisposableObject.

void CommandMessenger.TransportLayer.SerialTransport.Initialize | ( |  | ) |

Initializes this object.

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

Query ifthe serial port is open.

Returns:
  true if open, false if not.

bool CommandMessenger.TransportLayer.SerialTransport.Join | ( | int | millisecondsTimeout | ) |

Joins the thread.

Parameters:

  millisecondsTimeout | The milliseconds timeout.

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

void CommandMessenger.TransportLayer.SerialTransport.Kill | ( |  | ) |

Kills this object.

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

Opens the serial port.

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

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

Queries if a given port exists.

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

byte [] CommandMessenger.TransportLayer.SerialTransport.Read | ( |  | ) |

Reads the serial buffer into the string buffer.

Implements CommandMessenger.TransportLayer.ITransport.

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

Connects to a serial port defined through the current settings.

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

Implements CommandMessenger.TransportLayer.ITransport.

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

Stops listening to the serial port.

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

Implements CommandMessenger.TransportLayer.ITransport.

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

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

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

void CommandMessenger.TransportLayer.SerialTransport.Write | ( | byte[] | buffer | ) |

Writes a parameter to the serial port.

Parameters:

  buffer | The buffer to write.

Implements CommandMessenger.TransportLayer.ITransport.

## Property Documentation

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

Gets or sets the current serial port settings.

The current serial settings.

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

Gets the serial port.

The serial port.

ThreadRunStates CommandMessenger.TransportLayer.SerialTransport.ThreadRunState `[get, set]`

Gets or sets the run state of the thread .

The thread run state.

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

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