CubeChar
Hierarchy
- CubeChar 
Implements
Index
Constructors
Properties
Methods
Constructors
constructor
+ new CubeChar(service: BluetoothRemoteGATTService): CubeChar
Defined in cube/char/char.ts:19
Parameters:
| Name | Type | 
|---|---|
| service | BluetoothRemoteGATTService | 
Returns: CubeChar
Properties
Protected characteristic
• characteristic: BluetoothRemoteGATTCharacteristic
Defined in cube/char/char.ts:10
Protected errStrInProgress
• errStrInProgress: string = "GATT operation already in progress."
Defined in cube/char/char.ts:12
Protected uuid
• uuid: string = ""
Defined in cube/char/char.ts:9
Methods
prepare
▸ prepare(): Promise‹string | Error›
Implementation of CubeCharIF
Defined in cube/char/char.ts:30
Prepare for using characteristic function.
Returns: Promise‹string | Error›
Promise. resolve handler says that methods are available in this class.
readValue
▸ readValue(): Promise‹DataView›
Implementation of CubeCharIF
Defined in cube/char/char.ts:110
Read value from remote GATT Characteristics.
Returns: Promise‹DataView›
Promise. resolve handler include data.
setFrameRate
▸ setFrameRate(fps: number): void
Implementation of CubeCharIF
Defined in cube/char/char.ts:134
Set framerate.
Parameters:
| Name | Type | 
|---|---|
| fps | number | 
Returns: void
writeValue
▸ writeValue(buf: ArrayBuffer): Promise‹string | Error›
Implementation of CubeCharIF
Defined in cube/char/char.ts:55
Write value to remote GATT Characteristics.
Parameters:
| Name | Type | Description | 
|---|---|---|
| buf | ArrayBuffer | data buffer including command for Cube. | 
Returns: Promise‹string | Error›
Promise. resolve handler says that write command executed correctly.
writeValueCore
▸ writeValueCore(buf: ArrayBuffer, countRetry: number): Promise‹string | Error›
Defined in cube/char/char.ts:78
Write value to remote GATT Characteristics. Core function.
Parameters:
| Name | Type | Description | 
|---|---|---|
| buf | ArrayBuffer | data buffer including command for Cube. | 
| countRetry | number | Counter for retry. | 
Returns: Promise‹string | Error›
Promise. resolve handler says that write command executed correctly.