NbusSlave.h 639 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * AppBridge.h
  3. *
  4. * Created on: Mar 3, 2025
  5. * Author: juraj
  6. */
  7. #ifndef SRC_APPSLAVE_H_
  8. #define SRC_APPSLAVE_H_
  9. #include "inttypes.h"
  10. #include "dataframe.h"
  11. #include "NbusCommunicator.h"
  12. /** Adresa slave modulu, bez špecifikácie adresy konktrétneho senzora. */
  13. #define SLAVE_ADDRESS_MODULE 0
  14. class NbusSlave {
  15. private:
  16. uint8_t _address;
  17. NbusCommunicator* _communicator;
  18. Nbus_pdu _pdu;
  19. uint8_t sensor_cache[16];
  20. public:
  21. NbusSlave(uint8_t, NbusCommunicator*);
  22. DataFrame* nbus_echo();
  23. virtual ~NbusSlave();
  24. };
  25. #ifdef __cplusplus
  26. extern "C"
  27. {
  28. #endif
  29. #ifdef __cplusplus
  30. }
  31. #endif
  32. #endif /* SRC_APPSLAVE_H_ */