Subversion Repositories HomeAutomation

Rev

Rev 1310 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. /*
  2.  * Variable.h
  3.  *
  4.  *  Created on: Jul 21, 2009
  5.  *      Author: Mattias Runge
  6.  */
  7.  
  8. #ifndef VARIABLE_H_
  9. #define VARIABLE_H_
  10.  
  11. #include <string>
  12. #include <boost/make_shared.hpp>
  13. #include "Datatype.h"
  14. #include "../utils/BitBuffer.h"
  15.  
  16. namespace atom {
  17. namespace message {
  18.  
  19. using namespace std;
  20. using namespace atom::utils;
  21.  
  22. class Variable
  23. {
  24. public:
  25.     Variable();
  26.     Variable(string datatype, bool required, string unit);
  27.     virtual ~Variable();
  28.  
  29.     void readBits(BitBuffer & buffer);
  30.  
  31. private:
  32.     boost::shared_ptr<Datatype> myDatatype;
  33.     bool myRequired;
  34.     string myUnit;
  35.     unsigned int myLength;
  36. };
  37.  
  38. }
  39. }
  40.  
  41. #endif /* VARIABLE_H_ */
  42.