Own fork of MbedSmartRestMain
Dependencies: C027_Support C12832 LM75B MMA7660 MbedSmartRest mbed-rtos mbed
Fork of MbedSmartRestMain by
Diff: operation/ControlParser.h
- Revision:
- 98:e369fc75c000
- Parent:
- 95:5dfdc8568e9f
- Child:
- 100:dbcd3bc51758
--- a/operation/ControlParser.h Mon Apr 27 13:30:21 2015 +0000 +++ b/operation/ControlParser.h Thu May 07 09:57:55 2015 +0000 @@ -3,24 +3,22 @@ #include "Operation.h" #include "lex.h" #include "DeviceFeedback.h" -#include "ConfigurationSynchronization.h" +#include "ConfigSync.h" enum BayeuxAdvice{ BA_RETRY, BA_HANDSHAKE, BA_NONE }; -class ControlParser; -typedef void (ControlParser::*PtrParseFunc)(Token&); class ControlParser { public: ControlParser(OperationPool& pool, - ConfigurationSynchronization& configSync): opType(0), + ConfigSync& configSync): opType(0), bayeuxAdvice(BA_RETRY), bayeuxTimeout(-1), bayeuxInterval(0), opool(pool), _configSync(configSync) {} virtual ~ControlParser() {} BayeuxAdvice getBayeuxAdvice() const { return bayeuxAdvice; } int getBayeuxInterval() const { return bayeuxInterval; } int getBayeuxTimeout() const { return bayeuxTimeout; } - void handleControlMessage(const char*); + void parse(const char*); protected: void parseAdviceInterval(Token& tok); void parseAdvicePolicy(Token& tok); @@ -37,6 +35,7 @@ void parseRecover(Token& tok); void parseUnknownInt(Token& tok); private: + typedef void (ControlParser::*PtrParseFunc)(Token&); unsigned short opType; Operation op; BayeuxAdvice bayeuxAdvice; @@ -44,7 +43,7 @@ int bayeuxInterval; PtrParseFunc ptrPF; OperationPool& opool; - ConfigurationSynchronization& _configSync; + ConfigSync& _configSync; }; #endif /* CONTROLPARSER_H */