Core Base Classes for the Light Endpoints

Dependencies:   BufferedSerial

Dependents:   mbed_mqtt_endpoint_ublox_ethernet mbed_mqtt_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_cellular mbed_nsp_endpoint_ublox_ethernet ... more

Revision:
154:6e60f310ab78
Parent:
135:7f3f963cd159
Child:
155:582462821bd7
--- a/Preferences.h	Wed Apr 02 18:15:49 2014 +0000
+++ b/Preferences.h	Thu Apr 03 00:50:36 2014 +0000
@@ -22,10 +22,14 @@
 #include "mbed.h"
 #include "BaseClass.h"
 
+typedef struct {
+    char name[PREFERENCE_NAME_LEN+1];
+    char value[PREFERENCE_VALUE_LEN+1];
+} PreferenceEntry;
+
 class Preferences : public BaseClass {
-    private: 
-        char             m_names[MAX_NUM_PREFERENCES][PREFERENCE_NAME_LEN+1];
-        char             m_values[MAX_NUM_PREFERENCES][PREFERENCE_VALUE_LEN+1];
+    private:
+        PreferenceEntry  m_preferences[MAX_NUM_PREFERENCES]; 
         int              m_num_preferences;
          
     public:
@@ -43,7 +47,6 @@
         bool          initialize();   
          
         int           indexOfPreference(char *name);
-        int           min(int value1,int value2);
-};
+ };
 
 #endif // _PREFERENCES_H_
\ No newline at end of file