Download the file
  1. #ifndef PROTOCOL_H
  2. #define PROTOCOL_H
  3.  
  4. #include <RF12.h>
  5. #include <Ports.h>
  6. #include "heater_controller_slave.h"
  7. #include "relay.h"
  8. #include "temperature.h"
  9. #include "speaker.h"
  10. #include "current.h"
  11.  
  12. class Protocol {
  13. public:
  14. Protocol(Speaker* speaker);
  15.  
  16. void handle(uint8_t * buffer, uint8_t buffer_len);
  17. void got_ack();
  18.  
  19. protected:
  20. void status();
  21. void error(uint8_t faulty_command);
  22.  
  23. private:
  24. Speaker* speaker;
  25. Relay relay;
  26. Temperature temperature;
  27. Current current;
  28. };
  29. #endif
  30. // vim:ft=arduino
  31.