![]() |
EduArt Sensor Ring Library 3.0.0
|
One communication interface (e.g. CAN) owning multiple SensorBoards and forwarding COM messages. More...
#include <SensorBus.hpp>
Public Member Functions | |
| SensorBus (com::ComInterfaceID interface, std::vector< std::unique_ptr< device::SensorBoard > > board_vec) | |
| Construct the bus with a communication interface and owned sensor boards. | |
| void | setBitRateSwitching (bool brs_enable) |
| Enable or disable bit rate switching on the bus interface. | |
| unsigned int | getSensorCount () const |
| Total number of sensor boards on this bus. | |
| com::ComInterface * | getInterface () const |
| Communication interface used by this bus. | |
| std::vector< device::SensorBoard * > | getSensorBoards () const |
| Non-owning pointers to all sensor boards on this bus. | |
Static Public Member Functions | |
| static std::vector< device::EnumerationInformation > | queryConnectedDevices (com::ComInterfaceID interface, std::chrono::milliseconds timeout=250ms) |
| Enumerate boards on an interface. | |
One communication interface (e.g. CAN) owning multiple SensorBoards and forwarding COM messages.
| eduart::ring::SensorBus::SensorBus | ( | com::ComInterfaceID | interface, |
| std::vector< std::unique_ptr< device::SensorBoard > > | board_vec ) |
Construct the bus with a communication interface and owned sensor boards.
| [in] | interface | Communication interface ID for this bus. |
| [in] | board_vec | Owned sensor boards. |
| com::ComInterface * eduart::ring::SensorBus::getInterface | ( | ) | const |
Communication interface used by this bus.
| std::vector< device::SensorBoard * > eduart::ring::SensorBus::getSensorBoards | ( | ) | const |
Non-owning pointers to all sensor boards on this bus.
| unsigned int eduart::ring::SensorBus::getSensorCount | ( | ) | const |
Total number of sensor boards on this bus.
|
static |
Enumerate boards on an interface.
| [in] | interface | Communication interface ID to enumerate. |
| [in] | timeout | Time to wait for responses before returning. |
| void eduart::ring::SensorBus::setBitRateSwitching | ( | bool | brs_enable | ) |
Enable or disable bit rate switching on the bus interface.
| [in] | brs_enable | Enable flag. |