| 12345678910111213141516171819202122232425262728293031323334353637 |
- /*
- * NbusBridge.h
- *
- * Created on: Mar 7, 2025
- * Author: juraj
- */
- #ifndef SRC_NBUSBRIDGE_H_
- #define SRC_NBUSBRIDGE_H_
- #include "NbusSlave.h"
- #define MAX_SLAVES 16
- class NbusBridge {
- private:
- NbusCommunicator *_communicator;
- NbusSlave *_slaves[MAX_SLAVES];
- uint8_t _num_slaves;
- void transmit(DataFrame *packet);
- public:
- NbusBridge(NbusCommunicator *);
- bool addSlave(NbusSlave *slave);
- virtual ~NbusBridge();
- void scan();
- uint8_t getNumSlaves();
- bool call_echo(uint8_t slave);
- NbusSlave * getSlave(uint8_t index);
- void sendResponseToMaster(DataFrame *response_frame);
- };
- #endif /* SRC_NBUSBRIDGE_H_ */
|