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

One sensor board on a bus: holds configured devices and receives COM callbacks for enumeration and data. More...

#include <SensorBoard.hpp>

Public Member Functions

 SensorBoard (SensorBoardParams params, com::ComInterfaceID interface, unsigned int idx, std::vector< std::unique_ptr< device::Device > > devices)
 Construct the board with parameters, communication interface, index, and owned devices.
 ~SensorBoard ()
 Destructor.
bool isEnumerated () const
 Report whether this board has completed enumeration.
const board::EnumerationInformation & getEnumInfo () const
 Return the enumeration info received from the hardware.
SensorBoardType getBoardType () const
 Board type from configuration (undefined if not set). Used for topology enforcement.
std::vector< device::Device * > getDevices () const
 Return non-owning pointers to all devices on this board.
bool configure ()
 Re-apply runtime configuration after a board reset.

Static Public Member Functions

static bool resetBoards ()
 Reset all boards on all interfaces (broadcast reset command).
static void cmdEnumerateBoards (com::ComInterfaceID interface)
 Send enumeration command on the given interface so boards respond with CMD_ACTIVE_DEVICE_RESPONSE.

Friends

struct SensorBoardTestAccess

Detailed Description

One sensor board on a bus: holds configured devices and receives COM callbacks for enumeration and data.

Constructor & Destructor Documentation

◆ SensorBoard()

eduart::sensorring::board::SensorBoard::SensorBoard ( SensorBoardParams params,
com::ComInterfaceID interface,
unsigned int idx,
std::vector< std::unique_ptr< device::Device > > devices )

Construct the board with parameters, communication interface, index, and owned devices.

Parameters
[in]paramsBoard configuration (pose, device params).
[in]interfaceCommunication interface ID for this board.
[in]idxBoard index on the bus.
[in]devicesOwned devices (sensors/actuators) on this board.

Member Function Documentation

◆ cmdEnumerateBoards()

void eduart::sensorring::board::SensorBoard::cmdEnumerateBoards ( com::ComInterfaceID interface)
static

Send enumeration command on the given interface so boards respond with CMD_ACTIVE_DEVICE_RESPONSE.

Parameters
[in]interfaceCommunication interface ID to enumerate.

◆ configure()

bool eduart::sensorring::board::SensorBoard::configure ( )

Re-apply runtime configuration after a board reset.

Returns
true on success.

◆ getBoardType()

SensorBoardType eduart::sensorring::board::SensorBoard::getBoardType ( ) const

Board type from configuration (undefined if not set). Used for topology enforcement.

Returns
Board type.

◆ getDevices()

std::vector< device::Device * > eduart::sensorring::board::SensorBoard::getDevices ( ) const

Return non-owning pointers to all devices on this board.

Returns
Vector of Device pointers.

◆ getEnumInfo()

const board::EnumerationInformation & eduart::sensorring::board::SensorBoard::getEnumInfo ( ) const

Return the enumeration info received from the hardware.

Returns
Const reference to enumeration information.

◆ isEnumerated()

bool eduart::sensorring::board::SensorBoard::isEnumerated ( ) const

Report whether this board has completed enumeration.

Returns
true if enumeration response has been received.

◆ resetBoards()

bool eduart::sensorring::board::SensorBoard::resetBoards ( )
static

Reset all boards on all interfaces (broadcast reset command).

Returns
true on success.

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