mbed Weather Platform firmware http://mbed.org/users/okini3939/notebook/mbed-weather-platform-firmware/
Dependencies: EthernetNetIf SDHCFileSystem I2CLEDDisp Agentbed NTPClient_NetServices mbed BMP085 HTTPClient ConfigFile I2CLCD
ConfigFile.h
- Committer:
- okini3939
- Date:
- 2010-12-10
- Revision:
- 0:4265d973a98f
- Child:
- 1:86d4b7431fbe
File content as of revision 0:4265d973a98f:
#include "mbed.h" #include "EthernetNetIf.h" #define CF_ACTION_EXPS 10 #define CF_ACTION_NUM 10 enum eEXPRESSION { EXP_NULL, EXP_EQ, EXP_NE, EXP_LE, EXP_LT, EXP_GE, EXP_GT, }; struct tExpression { char key; enum eEXPRESSION expression; float value; }; struct tAction { int action; int count; struct tExpression exps[CF_ACTION_EXPS]; }; class ConfigFile { public: int interval; IpAddr ipaddr, netmask, gateway, nameserver; char ntpserver[32]; int filetype, actionscount; struct tAction actions[CF_ACTION_NUM]; char pachube_apikey[70], pachube_feedid[8]; char twitter_user[20], twitter_pwd[20]; ConfigFile (); void load (char *); private: void addsub (struct tExpression *, char *); void add (char *); char* chop (char *); };