|
TNB Library
|
Bluetooth(CE) 仮想COMポート管理クラス. [詳解]
#include <TnbCeBluetoothCom.h>
CBluetoothVirtualComPort の継承関係図公開メンバ関数 | |
| CBluetoothVirtualComPort (void) | |
| コンストラクタ [詳解] | |
| bool | CreateClientPort (CRs232c::CPort portNo, const BT_ADDR &btAddr, int channel=-1, GUID service=SerialPortServiceClass_UUID) |
| [作成] クライアントポート作成. [詳解] | |
| bool | CreateServerPort (CRs232c::CPort portNo, int portFlag=RFCOMM_PORT_FLAGS_AUTHENTICATE|RFCOMM_PORT_FLAGS_ENCRYPT) |
| [作成] サーバポート作成. [詳解] | |
| void | Delete (void) |
| [破棄] ポート破棄. [詳解] | |
| const CRs232c::CPort & | GetCreatedPort (void) const |
| [取得] 作成ポート名取得. [詳解] | |
| bool | GetPeerAddress (BT_ADDR &_btAddr) const |
| [取得] 相手アドレス取得. [詳解] | |
| bool | IsValid (void) const |
| [確認] 有効確認. [詳解] | |
| ~CBluetoothVirtualComPort (void) | |
| デストラクタ [詳解] | |
Bluetooth(CE) 仮想COMポート管理クラス.
Bluetoothの仮想COMポートを管理します。実際の通信は行いません。
TnbCeBluetoothCom.h の 42 行目に定義があります。
| CBluetoothVirtualComPort | ( | void | ) |
コンストラクタ
TnbCeBluetoothCom.h の 47 行目に定義があります。
| ~CBluetoothVirtualComPort | ( | void | ) |
デストラクタ
TnbCeBluetoothCom.h の 53 行目に定義があります。
| bool CreateClientPort | ( | CRs232c::CPort | portNo, |
| const BT_ADDR & | btAddr, | ||
| int | channel = -1, |
||
| GUID | service = SerialPortServiceClass_UUID |
||
| ) |
[作成] クライアントポート作成.
クライアント側の仮想ポートを作成します。既にポートがあれば一度破棄します。
| portNo | COMポートナンバー。 数値でも文字列でも指定可能です。 |
| btAddr | サーバの Bluetoothアドレス。ペアリング接続しているものを指定します。 |
| channel | チャネル。省略すると自動で選択されます(最初に見つけたデバイスになる)。 |
| service | サービス。省略すると SerialPortServiceClass_UUID になります。 |
| true | 成功. |
| false | 失敗 |
TnbCeBluetoothCom.h の 70 行目に定義があります。
| bool CreateServerPort | ( | CRs232c::CPort | portNo, |
| int | portFlag = RFCOMM_PORT_FLAGS_AUTHENTICATE | RFCOMM_PORT_FLAGS_ENCRYPT |
||
| ) |
[作成] サーバポート作成.
サーバ側の仮想ポートを作成します。既にポートがあれば一度破棄します。
| portNo | COMポートナンバー。 数値でも文字列でも指定可能です。 |
| portFlag | ポートフラグ。省略すると 「RFCOMM_PORT_FLAGS_AUTHENTICATE | RFCOMM_PORT_FLAGS_ENCRYPT」になります。 |
| true | 成功. |
| false | 失敗 |
TnbCeBluetoothCom.h の 89 行目に定義があります。
| void Delete | ( | void | ) |
[破棄] ポート破棄.
CreateServerPort() , CreateClientPort() で作成したポートを破棄します。
TnbCeBluetoothCom.h の 151 行目に定義があります。
| const CRs232c::CPort & GetCreatedPort | ( | void | ) | const |
| bool GetPeerAddress | ( | BT_ADDR & | _btAddr | ) | const |
[取得] 相手アドレス取得.
クライアントポートの場合、 CreateClientPort() で渡した、サーバのアドレスが返ります。 サーバの場合、接続されたデバイスのアドレスを返します。
| [out] | _btAddr | アドレスが格納されます。 |
| true | 成功。クライアントポートの場合、常に成功します。 |
| false | 失敗。サーバポートに他のデバイスが接続していない場合、失敗します。 |
TnbCeBluetoothCom.h の 134 行目に定義があります。
| bool IsValid | ( | void | ) | const |