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
Diff: device/DeviceConfiguration.h
- Revision:
- 1:cac9b2960637
diff -r 713518ea5028 -r cac9b2960637 device/DeviceConfiguration.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/device/DeviceConfiguration.h Sun Feb 15 22:04:12 2015 +0000 @@ -0,0 +1,33 @@ +#pragma once + +#include <stddef.h> +#include <stdint.h> + +#define DEVICE_CONFIGURATION_SIZE 8 + +class DeviceConfiguration +{ +public: + DeviceConfiguration(); + ~DeviceConfiguration(); + + bool read(const char*); + bool write(char*, size_t); + + bool set(const char*, const char*); + const char * get(const char*); + bool unset(const char*); + bool has(const char*); + void clear(); + +protected: + struct KeyValue { + char *key; + char *value; + }; + + KeyValue * search(const char*); + +private: + KeyValue _items[DEVICE_CONFIGURATION_SIZE]; +};