Advertisement
Guest User

Untitled

a guest
May 19th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. /*
  2. * REFLEX - Real-time Event FLow EXecutive
  3. *
  4. * A lightweight operating system for deeply embedded systems.
  5. *
  6. */
  7. #include "msgInterpreter.h"
  8. #include "NodeConfiguration.h"
  9.  
  10. using namespace reflex;
  11.  
  12. msgInterpreter::msgInterpreter(Pool& pool)
  13. : timeoutFunctor(*this)
  14. , timer(VirtualTimer::ONESHOT)
  15. , pool(pool)
  16. {
  17. timeoutEvent.init(&timeoutFunctor);
  18. input.init(this);
  19. timer.init(timeoutEvent);
  20.  
  21.  
  22. }
  23.  
  24.  
  25.  
  26.  
  27. void msgInterpreter::init(Sink1<Buffer*>* application, Sink1<Buffer*>* radio)
  28. {
  29. this->application = application;
  30. this->radio = radio;
  31. }
  32.  
  33.  
  34. void msgInterpreter::timeout()
  35. {
  36.  
  37. }
  38.  
  39.  
  40. void msgInterpreter::run()
  41. {
  42. Buffer* msgData = input.get();
  43. uint8 type;
  44.  
  45.  
  46. msgData->read(type);
  47. // getApplication().display.writeLower(type);
  48. msgData->downRef();
  49.  
  50.  
  51.  
  52. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement