Motion Master
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mm::comm::base::DeviceManager Class Referenceabstract

Manages devices and performs cyclic process data exchange. More...

#include <base.h>

Public Member Functions

virtual bool setState (uint8_t state, const std::chrono::steady_clock::duration expiryTime)=0
 Sets the operational state of all managed devices. More...
 
virtual std::vector< uint8_t > exchangeProcessData (const std::vector< uint8_t > &data, const std::chrono::steady_clock::duration expiryTime)=0
 Exchanges process data with devices. More...
 
virtual void exchangeProcessDataAndUpdateParameters (uint64_t missedCycles, const std::chrono::steady_clock::duration expiryTime)=0
 Exchanges process data and updates internal parameters for each device. More...
 
virtual std::vector< Device > & devices ()=0
 

Detailed Description

Manages devices and performs cyclic process data exchange.

This abstract interface defines methods for controlling device states, exchanging process data, and managing the device list. The implementation can use various industrial communication protocols (e.g., EtherCAT, SPoE, or others).

Member Function Documentation

◆ devices()

virtual std::vector< Device > & mm::comm::base::DeviceManager::devices ( )
pure virtual

◆ exchangeProcessData()

virtual std::vector< uint8_t > mm::comm::base::DeviceManager::exchangeProcessData ( const std::vector< uint8_t > &  data,
const std::chrono::steady_clock::duration  expiryTime 
)
pure virtual

Exchanges process data with devices.

Sends process data to devices and receives their response in a single communication cycle. The exact transport mechanism depends on the underlying protocol.

Parameters
dataProcess data to send.
expiryTimeMaximum allowed duration for the exchange before timing out.
Returns
The received process data from devices.

◆ exchangeProcessDataAndUpdateParameters()

virtual void mm::comm::base::DeviceManager::exchangeProcessDataAndUpdateParameters ( uint64_t  missedCycles,
const std::chrono::steady_clock::duration  expiryTime 
)
pure virtual

Exchanges process data and updates internal parameters for each device.

Performs a process data exchange with all managed devices, then updates the internal parameter set for each device based on the received data.

Parameters
missedCyclesNumber of cyclic exchanges missed since the last call.
expiryTimeMaximum allowed duration for the exchange before timing out.

◆ setState()

virtual bool mm::comm::base::DeviceManager::setState ( uint8_t  state,
const std::chrono::steady_clock::duration  expiryTime 
)
pure virtual

Sets the operational state of all managed devices.

Requests a transition of all devices to the specified state, as defined by the underlying network protocol. The operation will fail if the transition cannot be completed within the given time limit.

Parameters
stateTarget state value, interpreted according to the active protocol.
expiryTimeMaximum allowed duration for the state transition before timing out.
Returns
true if the state was successfully set within the timeout, false otherwise.

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