| 12345678910111213141516171819202122232425262728293031323334353637 |
- /*
- * NbusBridge.h
- *
- * Created on: Mar 7, 2025
- * Author: juraj
- */
- #ifndef SRC_NBUSBRIDGE_H_
- #define SRC_NBUSBRIDGE_H_
- #include "NbusSlave.h"
- #define MAX_SLAVES 8
- class NbusBridge {
- private:
- UART_HandleTypeDef *_uartUbus;
- uint8_t _data_packet_rx[32];
- NbusSlave *_slaves[MAX_SLAVES];
- uint8_t _num_slaves;
- void transmit(DataFrame *packet);
- public:
- NbusBridge(UART_HandleTypeDef *uartUbus);
- bool addSlave(NbusSlave *slave);
- virtual ~NbusBridge();
- uint8_t send(DataFrame *);
- bool call_echo(uint8_t slave);
- };
- #endif /* SRC_NBUSBRIDGE_H_ */
|