CmdMessenger 4.0.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 | Protected Attributes | Properties | Events
CommandMessenger.ConnectionManager Class Reference
Inheritance diagram for CommandMessenger.ConnectionManager:

List of all members.

## Public Member Functions
virtual void | StartConnectionManager ()
| Start connection manager.
virtual void | StopConnectionManager ()
| Stop connection manager.
void | Dispose ()
## Protected Member Functions
| ConnectionManager (CmdMessenger cmdMessenger, int identifyCommandId=0, string uniqueDeviceId=null)
virtual void | ConnectionFoundEvent ()
virtual void | ConnectionTimeoutEvent ()
virtual void | Log (int level, string logMessage)
virtual void | OnIdentifyResponse (ReceivedCommand responseCommand)
DeviceStatus | ArduinoAvailable (int timeOut)
| Check if Arduino is available.
DeviceStatus | ArduinoAvailable (int timeOut, int tries)
| Check if Arduino is available.
virtual bool | ValidateDeviceUniqueId (ReceivedCommand responseCommand)
abstract void | DoWorkConnect ()
abstract void | DoWorkScan ()
virtual void | DoWorkWatchdog ()
virtual void | StartWatchDog ()
| Start watchdog. Will check if connection gets interrupted.
virtual void | StopWatchDog ()
| Stop watchdog.
virtual void | StartScan ()
| Start scanning for devices.
virtual void | StopScan ()
| Stop scanning for devices.
virtual void | StartConnect ()
| Start connect to device.
virtual void | StopConnect ()
| Stop connect to device.
virtual void | StoreSettings ()
virtual void | ReadSettings ()
virtual void | Dispose (bool disposing)
## Protected Attributes
Mode | ConnectionManagerMode = Mode.Wait
## Properties
bool | Connected`[get, set]`
| Is connection manager currently connected to device.
int | WatchdogTimeout`[get, set]`
int | WatchdogRetryTimeout`[get, set]`
uint | WatchdogTries`[get, set]`
bool | WatchdogEnabled`[get, set]`
| Enables or disables connection watchdog functionality using identify command and unique device id.
bool | DeviceScanEnabled`[get, set]`
| Enables or disables device scanning. When disabled, connection manager will try to open connection to the device configured in the setting.
bool | PersistentSettings`[get, set]`
| Enables or disables storing of last connection configuration in persistent file.
## Events
EventHandler< EventArgs > | ConnectionTimeout
EventHandler< EventArgs > | ConnectionFound
EventHandler < ConnectionManagerProgressEventArgs > | Progress

## Member Function Documentation

DeviceStatus CommandMessenger.ConnectionManager.ArduinoAvailable | ( | int | timeOut | ) | `[protected]`

Check if Arduino is available.

Parameters:

  timeOut | Timout for waiting on response

Returns:
  Check result.

DeviceStatus CommandMessenger.ConnectionManager.ArduinoAvailable | ( | int | timeOut,
|  | int | tries
| ) |  | `[protected]`

Check if Arduino is available.

Parameters:

  timeOut | Timout for waiting on response
  tries | Number of tries

Returns:
  Check result.

virtual void CommandMessenger.ConnectionManager.StartConnect | ( |  | ) | `[protected, virtual]`

Start connect to device.

virtual void CommandMessenger.ConnectionManager.StartConnectionManager | ( |  | ) | `[virtual]`

Start connection manager.

virtual void CommandMessenger.ConnectionManager.StartScan | ( |  | ) | `[protected, virtual]`

Start scanning for devices.

Reimplemented in CommandMessenger.Transport.Bluetooth.BluetoothConnectionManager, and CommandMessenger.Transport.Serial.SerialConnectionManager.

virtual void CommandMessenger.ConnectionManager.StartWatchDog | ( |  | ) | `[protected, virtual]`

Start watchdog. Will check if connection gets interrupted.

virtual void CommandMessenger.ConnectionManager.StopConnect | ( |  | ) | `[protected, virtual]`

Stop connect to device.

virtual void CommandMessenger.ConnectionManager.StopConnectionManager | ( |  | ) | `[virtual]`

Stop connection manager.

virtual void CommandMessenger.ConnectionManager.StopScan | ( |  | ) | `[protected, virtual]`

Stop scanning for devices.

virtual void CommandMessenger.ConnectionManager.StopWatchDog | ( |  | ) | `[protected, virtual]`

Stop watchdog.

## Property Documentation

bool CommandMessenger.ConnectionManager.Connected`[get, set]`

Is connection manager currently connected to device.

bool CommandMessenger.ConnectionManager.DeviceScanEnabled`[get, set]`

Enables or disables device scanning. When disabled, connection manager will try to open connection to the device configured in the setting.

- For SerialConnection this means scanning for (virtual) serial ports,
- For BluetoothConnection this means scanning for a device on RFCOMM level

bool CommandMessenger.ConnectionManager.PersistentSettings`[get, set]`

Enables or disables storing of last connection configuration in persistent file.

bool CommandMessenger.ConnectionManager.WatchdogEnabled`[get, set]`

Enables or disables connection watchdog functionality using identify command and unique device id.

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

- D:/My Documents/Github/Arduino/Own Arduino libraries/CmdMessenger/Arduino-CmdMessenger/extras/CSharp/CommandMessenger/ConnectionManager.cs