Subversion Repositories HomeAutomation

Rev

Rev 1326 | Blame | Compare with Previous | Last modification | View Log | SVN | RSS feed

  1. /*
  2.  * Monitor.cpp
  3.  *
  4.  *  Created on: Jul 22, 2009
  5.  *      Author: Mattias Runge
  6.  */
  7.  
  8. #include "Monitor.h"
  9.  
  10. namespace atom {
  11. namespace subscribers {
  12.  
  13. Monitor::Monitor() : Subscriber(true)
  14. {
  15.     LOG.setName("MonitorSubscriber");
  16.     this->Start();
  17. }
  18.  
  19. Monitor::~Monitor()
  20. {
  21.     this->Stop();
  22. }
  23.  
  24. void Monitor::OnMessage(Message::Pointer message)
  25. {
  26.     LOG.info(message->ToString());
  27.  
  28.     // TODO print origin of message also
  29. }
  30.  
  31. } // namespace subscribers
  32. } // namespace atom
  33.