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 | Properties | Events
CommandMessenger.Transport.Bluetooth.BluetoothTransport Class Reference

Manager for Bluetooth connection. More...

Inheritance diagram for CommandMessenger.Transport.Bluetooth.BluetoothTransport:

List of all members.

## Public Member Functions
| BluetoothTransport ()
| Bluetooth transport constructor.
bool | Connect ()
| Connects to a serial port defined through the current settings.
bool | Open ()
| Opens the serial port.
bool | IsConnected ()
| Returns connection status.
bool | IsOpen ()
| Returns opened stream status.
bool | Close ()
| Closes the Bluetooth stream port.
bool | Disconnect ()
| Disconnect the bluetooth stream.
void | Write (byte[] buffer)
| Writes a byte array to the bluetooth stream.
BluetoothAddress | RetreiveLocalBluetoothAddress ()
| Retrieves the address of the local bluetooth radio.
void | Dispose ()
byte[] | Read ()
| Reads the serial buffer into the string buffer.
## Protected Member Functions
virtual void | Dispose (bool disposing)
## Properties
BluetoothDeviceInfo | CurrentBluetoothDeviceInfo`[get, set]`
| Gets or sets Bluetooth device info.
bool | LazyReconnect`[get, set]`
| Get or set Lazy reconnection status. Only reconnect if really necessary.
BluetoothClient | BluetoothClient`[get]`
| Return local Bluetooth client.
## Events
EventHandler | DataReceived
| Bytes have been received event.

## Detailed Description

Manager for Bluetooth connection.

## Constructor & Destructor Documentation

CommandMessenger.Transport.Bluetooth.BluetoothTransport.BluetoothTransport | ( |  | ) |

Bluetooth transport constructor.

## Member Function Documentation

bool CommandMessenger.Transport.Bluetooth.BluetoothTransport.Close | ( |  | ) |

Closes the Bluetooth stream port.

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

bool CommandMessenger.Transport.Bluetooth.BluetoothTransport.Connect | ( |  | ) |

Connects to a serial port defined through the current settings.

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

Implements CommandMessenger.Transport.ITransport.

bool CommandMessenger.Transport.Bluetooth.BluetoothTransport.Disconnect | ( |  | ) |

Disconnect the bluetooth stream.

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

Implements CommandMessenger.Transport.ITransport.

bool CommandMessenger.Transport.Bluetooth.BluetoothTransport.IsConnected | ( |  | ) |

Returns connection status.

Returns:
  true when connected

Implements CommandMessenger.Transport.ITransport.

bool CommandMessenger.Transport.Bluetooth.BluetoothTransport.IsOpen | ( |  | ) |

Returns opened stream status.

Returns:
  true when open

bool CommandMessenger.Transport.Bluetooth.BluetoothTransport.Open | ( |  | ) |

Opens the serial port.

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

byte [] CommandMessenger.Transport.Bluetooth.BluetoothTransport.Read | ( |  | ) |

Reads the serial buffer into the string buffer.

Implements CommandMessenger.Transport.ITransport.

BluetoothAddress CommandMessenger.Transport.Bluetooth.BluetoothTransport.RetreiveLocalBluetoothAddress | ( |  | ) |

Retrieves the address of the local bluetooth radio.

Returns:
  The address of the local bluetooth radio.

void CommandMessenger.Transport.Bluetooth.BluetoothTransport.Write | ( | byte[] | buffer | ) |

Writes a byte array to the bluetooth stream.

Parameters:

  buffer | The buffer to write.

Implements CommandMessenger.Transport.ITransport.

## Property Documentation

BluetoothClient CommandMessenger.Transport.Bluetooth.BluetoothTransport.BluetoothClient`[get]`

Return local Bluetooth client.

BluetoothDeviceInfo CommandMessenger.Transport.Bluetooth.BluetoothTransport.CurrentBluetoothDeviceInfo`[get, set]`

Gets or sets Bluetooth device info.

bool CommandMessenger.Transport.Bluetooth.BluetoothTransport.LazyReconnect`[get, set]`

Get or set Lazy reconnection status. Only reconnect if really necessary.

## Event Documentation

EventHandler CommandMessenger.Transport.Bluetooth.BluetoothTransport.DataReceived

Bytes have been received event.

Implements CommandMessenger.Transport.ITransport.

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.Transport.Bluetooth/BluetoothTransport.cs