You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.4 KiB

7 years ago
​
​
​
7 years ago
​
​
​
​
​
​
​
​
​
​
7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
7 years ago
​
​
7 years ago
​
7 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. #ifndef __BASICENGINE_H_INCL__
  2. #define __BASICENGINE_H_INCL__
  3. #include "basicObject.h"
  4. #include "basicMutex.h"
  5. /**
  6. * TODO: Add class description
  7. *
  8. * @author Gagua
  9. */
  10. class basicEngine: public basicObject {
  11. private:
  12. basicMutex m_mWMProtector;
  13. uint8_t m_bWM;
  14. public:
  15. // Constructor
  16. basicEngine();
  17. // Destructor
  18. virtual ~basicEngine();
  19. virtual bool startService(){ return false; };
  20. virtual bool stopService(){ return true; };
  21. void setWM( uint8_t s ){
  22. m_mWMProtector.lock();
  23. m_bWM = s;
  24. m_mWMProtector.unlock();
  25. };
  26. uint8_t getWM( void ){
  27. uint8_t s;
  28. m_mWMProtector.lock();
  29. s = m_bWM;
  30. m_mWMProtector.unlock();
  31. return s;
  32. };
  33. };
  34. // Constructor implementation
  35. inline basicEngine::basicEngine():basicObject(){};
  36. // Destructor implementation
  37. inline basicEngine::~basicEngine(){};
  38. // TODO: Uncomment the copy constructor when you need it.
  39. //inline basicEngine::basicEngine(const basicEngine& src)
  40. //{
  41. // // TODO: copy
  42. //}
  43. // TODO: Uncomment the assignment operator when you need it.
  44. //inline basicEngine& basicEngine::operator=(const basicEngine& rhs)
  45. //{
  46. // if (this == &rhs) {
  47. // return *this;
  48. // }
  49. //
  50. // // TODO: assignment
  51. //
  52. // return *this;
  53. //}
  54. #endif // __BASICENGINE_H_INCL__