Kris Scholte Lubberink
/
SSS_Ble
Ble for smart sOlutions
source/InterestService.h@7:9cda1b0f25ae, 2019-05-20 (annotated)
- Committer:
- kris@kris-X682X
- Date:
- Mon May 20 13:20:35 2019 +0200
- Revision:
- 7:9cda1b0f25ae
- Parent:
- 6:ee9c86f06eae
- Child:
- 9:92d861703f96
Working broadcast & advertise
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
kris@kris-X682X | 6:ee9c86f06eae | 1 | // |
kris@kris-X682X | 6:ee9c86f06eae | 2 | // Created by kris on 7-5-19. |
kris@kris-X682X | 6:ee9c86f06eae | 3 | // |
kris@kris-X682X | 6:ee9c86f06eae | 4 | |
kris@kris-X682X | 6:ee9c86f06eae | 5 | #ifndef SSS_BLE_INTERESTSERVICE_H |
kris@kris-X682X | 6:ee9c86f06eae | 6 | #define SSS_BLE_INTERESTSERVICE_H |
kris@kris-X682X | 6:ee9c86f06eae | 7 | |
kris@kris-X682X | 6:ee9c86f06eae | 8 | #include "FlashIAP.h" |
kris@kris-X682X | 6:ee9c86f06eae | 9 | |
kris@kris-X682X | 6:ee9c86f06eae | 10 | #include "ble/BLE.h" |
kris@kris-X682X | 6:ee9c86f06eae | 11 | #include "CustomUUIDs.h" |
kris@kris-X682X | 6:ee9c86f06eae | 12 | |
kris@kris-X682X | 6:ee9c86f06eae | 13 | class InterestService { |
kris@kris-X682X | 6:ee9c86f06eae | 14 | //TODO: Constructor |
kris@kris-X682X | 6:ee9c86f06eae | 15 | //TODO: Color Characteristic |
kris@kris-X682X | 6:ee9c86f06eae | 16 | |
kris@kris-X682X | 6:ee9c86f06eae | 17 | |
kris@kris-X682X | 6:ee9c86f06eae | 18 | //TODO: Array van 5 bytes om interesses op te slaan |
kris@kris-X682X | 6:ee9c86f06eae | 19 | |
kris@kris-X682X | 6:ee9c86f06eae | 20 | //TODO: Filesystem support voor het opslaan van interesses |
kris@kris-X682X | 6:ee9c86f06eae | 21 | public: |
kris@kris-X682X | 6:ee9c86f06eae | 22 | virtual ~InterestService(); |
kris@kris-X682X | 6:ee9c86f06eae | 23 | |
kris@kris-X682X | 7:9cda1b0f25ae | 24 | typedef int interests_T[20]; |
kris@kris-X682X | 6:ee9c86f06eae | 25 | InterestService(BLE &ble); |
kris@kris-X682X | 6:ee9c86f06eae | 26 | virtual void onDataWritten(const GattWriteCallbackParams *writeParams); |
kris@kris-X682X | 6:ee9c86f06eae | 27 | int readFromFs(); |
kris@kris-X682X | 6:ee9c86f06eae | 28 | int writeToFs(); |
kris@kris-X682X | 6:ee9c86f06eae | 29 | int createFs(); |
kris@kris-X682X | 6:ee9c86f06eae | 30 | private: |
kris@kris-X682X | 6:ee9c86f06eae | 31 | BLE& ble; |
kris@kris-X682X | 6:ee9c86f06eae | 32 | |
kris@kris-X682X | 6:ee9c86f06eae | 33 | interests_T interests; |
kris@kris-X682X | 6:ee9c86f06eae | 34 | ReadWriteGattCharacteristic<interests_T> interestCharacteristic; |
kris@kris-X682X | 6:ee9c86f06eae | 35 | }; |
kris@kris-X682X | 6:ee9c86f06eae | 36 | |
kris@kris-X682X | 6:ee9c86f06eae | 37 | |
kris@kris-X682X | 6:ee9c86f06eae | 38 | #endif //SSS_BLE_INTERESTSERVICE_H |