Sony's LANC camera control protocol project.
Dependencies: aconno_LANC aconno_bsp aconno_SEGGER_RTT
AckService.h@12:69dbd9ef58e8, 2018-08-28 (annotated)
- Committer:
- jurica238814
- Date:
- Tue Aug 28 11:11:12 2018 +0000
- Revision:
- 12:69dbd9ef58e8
- Parent:
- 6:8cf24e946b0b
Work in progress.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
jurica238814 | 6:8cf24e946b0b | 1 | |
jurica238814 | 6:8cf24e946b0b | 2 | // Template allows you to use 'constant' values on non-constant places (XD) |
jurica238814 | 6:8cf24e946b0b | 3 | template<uint8_t dataSize> |
jurica238814 | 6:8cf24e946b0b | 4 | |
jurica238814 | 6:8cf24e946b0b | 5 | class ACKService{ |
jurica238814 | 6:8cf24e946b0b | 6 | public: |
jurica238814 | 6:8cf24e946b0b | 7 | const static uint16_t ACK_SERVICE_UUID = 0xA000; |
jurica238814 | 6:8cf24e946b0b | 8 | const static uint16_t ACK_CHARA_UUID = 0xA001; |
jurica238814 | 6:8cf24e946b0b | 9 | |
jurica238814 | 6:8cf24e946b0b | 10 | ACKService(BLEDevice &_ble, uint8_t *_initValues) : ble(_ble), ACK(ACK_CHARA_UUID, _initValues){ |
jurica238814 | 6:8cf24e946b0b | 11 | GattCharacteristic *charTable[] = {&ACK}; // Add characteristick in table |
jurica238814 | 6:8cf24e946b0b | 12 | GattService AckService(ACK_SERVICE_UUID, charTable, sizeof(charTable)/sizeof(GattCharacteristic *)); |
jurica238814 | 6:8cf24e946b0b | 13 | ble.addService(AckService); // Add service in the BLE |
jurica238814 | 6:8cf24e946b0b | 14 | } |
jurica238814 | 6:8cf24e946b0b | 15 | private: |
jurica238814 | 6:8cf24e946b0b | 16 | BLEDevice &ble; |
jurica238814 | 6:8cf24e946b0b | 17 | // Create new characteristic |
jurica238814 | 6:8cf24e946b0b | 18 | WriteOnlyArrayGattCharacteristic<uint8_t, dataSize> ACK; |
jurica238814 | 6:8cf24e946b0b | 19 | }; |