EduArt Sensor Ring Library 4.0.0
Loading...
Searching...
No Matches
eduart::sensorring::SensorBus Class Reference

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< board::SensorBoard > > board_vec)
 Construct the bus with a communication interface and owned sensor boards.
unsigned int getSensorCount () const
 Total number of sensor boards on this bus.
com::ComInterface * getInterface () const
 Communication interface used by this bus.
std::vector< board::SensorBoard * > getSensorBoards () const
 Non-owning pointers to all sensor boards on this bus.

Static Public Member Functions

static std::vector< board::EnumerationInformation > queryConnectedDevices (com::ComInterfaceID interface, unsigned int timeout_ms=250)
 Enumerate boards on an interface.

Detailed Description

One communication interface (e.g. CAN) owning multiple SensorBoards and forwarding COM messages.

Constructor & Destructor Documentation

◆ SensorBus()

eduart::sensorring::SensorBus::SensorBus ( com::ComInterfaceID interface,
std::vector< std::unique_ptr< board::SensorBoard > > board_vec )

Construct the bus with a communication interface and owned sensor boards.

Parameters
[in]interfaceCommunication interface ID for this bus.
[in]board_vecOwned sensor boards.

Member Function Documentation

◆ getInterface()

com::ComInterface * eduart::sensorring::SensorBus::getInterface ( ) const

Communication interface used by this bus.

Returns
Pointer to the ComInterface.

◆ getSensorBoards()

std::vector< board::SensorBoard * > eduart::sensorring::SensorBus::getSensorBoards ( ) const

Non-owning pointers to all sensor boards on this bus.

Returns
Vector of SensorBoard pointers.

◆ getSensorCount()

unsigned int eduart::sensorring::SensorBus::getSensorCount ( ) const

Total number of sensor boards on this bus.

Returns
Number of boards.

◆ queryConnectedDevices()

std::vector< board::EnumerationInformation > eduart::sensorring::SensorBus::queryConnectedDevices ( com::ComInterfaceID interface,
unsigned int timeout_ms = 250 )
static

Enumerate boards on an interface.

Parameters
[in]interfaceCommunication interface ID to enumerate.
[in]timeout_msTime to wait for responses before returning in milliseconds.
Returns
Vector of enumeration info. May be empty if none or on error.

The documentation for this class was generated from the following file: