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.Bluetooth.BluetoothTransport Class Reference

Manager for Bluetooth connection. More...

Inheritance diagram for CommandMessenger.Bluetooth.BluetoothTransport:

List of all members.

## Public Member Functions
| BluetoothTransport ()
| Default constructor.
void | Initialize ()
| Initializes this object.
void | StartPolling ()
void | StopPolling ()
void | Poll ()
| Polls for bluetooth device for data.
bool | Connect ()
| Connects to a serial port defined through the current settings.
bool | Open ()
| Opens the serial port.
bool | IsConnected ()
bool | IsOpen ()
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.
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 .
BluetoothDeviceInfo | CurrentBluetoothDeviceInfo`[get, set]`
| Gets or sets the current serial port settings.
BluetoothClient | BluetoothClient`[get]`
## Events
EventHandler | NewDataReceived

## Detailed Description

Manager for Bluetooth connection.

## Constructor & Destructor Documentation

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

Default constructor.

## Member Function Documentation

int CommandMessenger.Bluetooth.BluetoothTransport.BytesInBuffer | ( |  | ) |

Gets the bytes in buffer.

Returns:
  Bytes in buffer

Implements CommandMessenger.TransportLayer.ITransport.

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

Closes the Bluetooth stream port.

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

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

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.Bluetooth.BluetoothTransport.Disconnect | ( |  | ) |

Disconnect the bluetooth stream.

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

Implements CommandMessenger.TransportLayer.ITransport.

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

Remove all references and remove children.

Parameters:

  disposing | If true, cleanup

Reimplemented from CommandMessenger.DisposableObject.

void CommandMessenger.Bluetooth.BluetoothTransport.Initialize | ( |  | ) |

Initializes this object.

bool CommandMessenger.Bluetooth.BluetoothTransport.Join | ( | int | millisecondsTimeout | ) |

Joins the thread.

Parameters:

  millisecondsTimeout | The milliseconds timeout.

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

void CommandMessenger.Bluetooth.BluetoothTransport.Kill | ( |  | ) |

Kills this object.

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

Opens the serial port.

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

void CommandMessenger.Bluetooth.BluetoothTransport.Poll | ( |  | ) |

Polls for bluetooth device for data.

Implements CommandMessenger.TransportLayer.ITransport.

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

Reads the serial buffer into the string buffer.

Implements CommandMessenger.TransportLayer.ITransport.

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

Retrieves the address of the local bluetooth radio.

Returns:
  The address of the local bluetooth radio.

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

Writes a byte array to the bluetooth stream.

Parameters:

  buffer | The buffer to write.

Implements CommandMessenger.TransportLayer.ITransport.

## Property Documentation

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

Gets or sets the current serial port settings.

The current serial settings.

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