An application to log WiFi SSIDs for position lookup testing
Dependencies: C027_Support SWO mbed-rtos mbed picojson
Fork of lpc4088_ebb_ublox_Cellular_PubNubDemo_rtos by
device/DeviceConfiguration.h@1:cac9b2960637, 2015-02-15 (annotated)
- Committer:
- rosterloh84
- Date:
- Sun Feb 15 22:04:12 2015 +0000
- Revision:
- 1:cac9b2960637
First working version. Lots to do still.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
rosterloh84 | 1:cac9b2960637 | 1 | #pragma once |
rosterloh84 | 1:cac9b2960637 | 2 | |
rosterloh84 | 1:cac9b2960637 | 3 | #include <stddef.h> |
rosterloh84 | 1:cac9b2960637 | 4 | #include <stdint.h> |
rosterloh84 | 1:cac9b2960637 | 5 | |
rosterloh84 | 1:cac9b2960637 | 6 | #define DEVICE_CONFIGURATION_SIZE 8 |
rosterloh84 | 1:cac9b2960637 | 7 | |
rosterloh84 | 1:cac9b2960637 | 8 | class DeviceConfiguration |
rosterloh84 | 1:cac9b2960637 | 9 | { |
rosterloh84 | 1:cac9b2960637 | 10 | public: |
rosterloh84 | 1:cac9b2960637 | 11 | DeviceConfiguration(); |
rosterloh84 | 1:cac9b2960637 | 12 | ~DeviceConfiguration(); |
rosterloh84 | 1:cac9b2960637 | 13 | |
rosterloh84 | 1:cac9b2960637 | 14 | bool read(const char*); |
rosterloh84 | 1:cac9b2960637 | 15 | bool write(char*, size_t); |
rosterloh84 | 1:cac9b2960637 | 16 | |
rosterloh84 | 1:cac9b2960637 | 17 | bool set(const char*, const char*); |
rosterloh84 | 1:cac9b2960637 | 18 | const char * get(const char*); |
rosterloh84 | 1:cac9b2960637 | 19 | bool unset(const char*); |
rosterloh84 | 1:cac9b2960637 | 20 | bool has(const char*); |
rosterloh84 | 1:cac9b2960637 | 21 | void clear(); |
rosterloh84 | 1:cac9b2960637 | 22 | |
rosterloh84 | 1:cac9b2960637 | 23 | protected: |
rosterloh84 | 1:cac9b2960637 | 24 | struct KeyValue { |
rosterloh84 | 1:cac9b2960637 | 25 | char *key; |
rosterloh84 | 1:cac9b2960637 | 26 | char *value; |
rosterloh84 | 1:cac9b2960637 | 27 | }; |
rosterloh84 | 1:cac9b2960637 | 28 | |
rosterloh84 | 1:cac9b2960637 | 29 | KeyValue * search(const char*); |
rosterloh84 | 1:cac9b2960637 | 30 | |
rosterloh84 | 1:cac9b2960637 | 31 | private: |
rosterloh84 | 1:cac9b2960637 | 32 | KeyValue _items[DEVICE_CONFIGURATION_SIZE]; |
rosterloh84 | 1:cac9b2960637 | 33 | }; |