|
Dawn Framework 1.0
Universal data acquisition framework for embedded systems
|
Object Transfer Service (OTS) for BLE Peripheral. More...
#include <prph_ots.hxx>
Classes | |
| struct | SProtoNimblePrphIOBindOts |
| Top-level OTS binding payload. More... | |
| struct | SProtoNimblePrphIOBindOtsObjid |
| Per-object descriptor entry. More... | |
Public Types | |
| enum | |
| Object Properties bits. | |
| enum | |
| OACP request opcodes (Bluetooth OTS spec Table 3.9). | |
| enum | { } |
| OACP result codes (Bluetooth OTS spec Table 3.10). More... | |
| enum | |
| OLCP request opcodes (Bluetooth OTS spec Table 3.16). | |
| enum | { } |
| OLCP result codes (Bluetooth OTS spec Table 3.17). More... | |
| enum | |
| OTS object kinds derived from descriptor cfg. | |
| enum | |
| Per-object access mode (descriptor-supplied). | |
Public Member Functions | |
| int | deinit () |
| Deinitialize service. | |
| int | init () |
| Initialize service. | |
| int | start () |
| Start service. | |
| int | stop () |
| Stop service. | |
Public Attributes | |
| IProtoNimblePrphCb * | cb |
| Callback interface to peripheral. | |
| const SObjectCfg::SObjectCfgItem * | desc |
| Configuration descriptor for this service. | |
| std::vector< SObjectId::ObjectId > | vio |
| Vector of I/O objects exposed by this service. | |
Static Public Attributes | |
| static uint8_t | CFG_TYPE_SHIFT = 0 |
Per-object cfg word layout (lower bits of obj.cfg). | |
| static uint16_t | L2CAP_MTU_OTS = 512 |
| L2CAP CoC MTU for OTS data channel. | |
| static uint16_t | L2CAP_PSM_OTS = 0x0025 |
| L2CAP PSM for OTS bulk data (Bluetooth SIG-assigned). | |
| static uint8_t | OBJ_NAME_MAX = 16 |
| OTS object name length (bytes, fixed). | |
| static uint16_t | OBJ_TYPE_CAPS = 0xffe1 |
| Object Type for a Dawn capabilities blob (Dawn-private UUID16). | |
| static uint16_t | OBJ_TYPE_DESCRIPTOR = 0xffe0 |
| Object Type for a Dawn descriptor blob (Dawn-private UUID16). | |
| static uint16_t | OBJ_TYPE_UNSPECIFIED = 0x2aca |
| Object Type for an "Unspecified" file (Bluetooth SIG). | |
| static uint16_t | UUID16_FEATURE = 0x2abd |
| OTS Feature characteristic. | |
| static uint16_t | UUID16_OACP = 0x2ac5 |
| Object Action Control Point characteristic. | |
| static uint16_t | UUID16_OBJ_ID = 0x2ac3 |
| Object ID characteristic (48-bit). | |
| static uint16_t | UUID16_OBJ_NAME = 0x2abe |
| Object Name characteristic. | |
| static uint16_t | UUID16_OBJ_PROPS = 0x2ac4 |
| Object Properties characteristic. | |
| static uint16_t | UUID16_OBJ_SIZE = 0x2ac0 |
| Object Size characteristic (current + allocated, 8 bytes). | |
| static uint16_t | UUID16_OBJ_TYPE = 0x2abf |
| Object Type characteristic. | |
| static uint16_t | UUID16_OLCP = 0x2ac6 |
| Object List Control Point characteristic. | |
| static uint16_t | UUID16_OTS = 0x1825 |
| OTS Service UUID (Bluetooth SIG). | |
Object Transfer Service (OTS) for BLE Peripheral.
Implements the Bluetooth SIG Object Transfer Service v1.0 (UUID 0x1825).
The service exposes one or more CIOCommon objects whose isSeekable() returns true (e.g. CIOFile, CIODescriptor, CIOCapabilities) as OTS Objects. Bulk data is carried over an L2CAP CoC channel (PSM 0x0025); the GATT side carries only metadata and the OACP/OLCP control points.
Supported OACP opcodes: Read, Write, Abort. Supported OLCP opcodes: First, Last, Previous, Next, Go To. Optional characteristics (List Filter, First-Created, Last-Modified, Object Changed) are not implemented in this revision.
BLE_HS_EBUSY at BLE_L2CAP_EVENT_COC_ACCEPT. The pre-allocated transfer buffer is shared and not safe for multi-client use. Definition at line 41 of file prph_ots.hxx.
| anonymous enum |
OACP result codes (Bluetooth OTS spec Table 3.10).
| Enumerator | |
|---|---|
| OACP_RES_OPCODE_NS | Opcode Not Supported. |
Definition at line 140 of file prph_ots.hxx.
| anonymous enum |
OLCP result codes (Bluetooth OTS spec Table 3.17).
| Enumerator | |
|---|---|
| OLCP_RES_OOR | Out Of Bounds. |
Definition at line 170 of file prph_ots.hxx.
|
virtual |
Deinitialize service.
Releases all allocated resources for this service.
Implements dawn::IProtoNimblePrphService.
Definition at line 363 of file prph_ots.cxx.
|
virtual |
Initialize service.
Allocates service resources and prepares characteristics.
Implements dawn::IProtoNimblePrphService.
Definition at line 341 of file prph_ots.cxx.
References dawn::IProtoNimblePrphService::cb, dawn::IProtoNimblePrphService::desc, and dawn::IProtoNimblePrphCb::serviceRegister().
|
virtual |
Start service.
Registers the service with the GATT database.
Implements dawn::IProtoNimblePrphService.
Definition at line 372 of file prph_ots.cxx.
References dawn::IProtoNimblePrphService::cb, L2CAP_MTU_OTS, L2CAP_PSM_OTS, and dawn::IProtoNimblePrphCb::startService().
|
virtual |
Stop service.
Removes the service from the GATT database.
Implements dawn::IProtoNimblePrphService.
Definition at line 402 of file prph_ots.cxx.
References dawn::IProtoNimblePrphService::cb, and dawn::IProtoNimblePrphCb::stopService().
|
inherited |
|
inherited |
|
static |
Object Type for a Dawn capabilities blob (Dawn-private UUID16).
Allocated in the unassigned 16-bit UUID range; same caveat as OBJ_TYPE_DESCRIPTOR.
Definition at line 101 of file prph_ots.hxx.
|
static |
Object Type for a Dawn descriptor blob (Dawn-private UUID16).
Allocated in the unassigned 16-bit UUID range. Subject to revision if the Bluetooth SIG ever assigns this value. Clients that don't recognise it should treat the object as opaque bytes.
Definition at line 92 of file prph_ots.hxx.
|
inherited |