|
RMM API 2.0.0
|
Class to manage the configuration and data handling of side channels. More...
#include <RMMSideChannels.h>

Public Member Functions | |
| RMMSideChannels (RMMRegisterAccess &RMMRegs) | |
| Constructor for the RMMSideChannels class. | |
| rmmStatus | fillSideChannelsfromJson (json &settings) |
| Populates side channel configurations from a JSON object. | |
| rmmStatus | configSideChannels () |
| Configures all side channels based on stored settings. | |
| rmmStatus | getSideChannelStats (SideChannelStatsData &stats) |
| Retrieves statistics for the side channels. | |
| rmmStatus | fetchSideChannelData (uint8_t sideChIdx, SideChannelsData &data) |
| Fetches and populates the data for a specific side channel. | |
Public Attributes | |
| RMMLog | rmmLog |
| Log handler for RMMSideChannel messages. | |
Class to manage the configuration and data handling of side channels.
The RMMSideChannels class provides methods to configure, manage, and retrieve statistics for side channels. It supports reading configurations from JSON, enabling/disabling side channels, and fetching real-time side channel data.
| RMMSideChannels::RMMSideChannels | ( | RMMRegisterAccess & | RMMRegs | ) |
Constructor for the RMMSideChannels class.
| [in] | RMMRegs | Reference to an RMMRegisterAccess object for register access. |
| rmmStatus RMMSideChannels::configSideChannels | ( | ) |
Configures all side channels based on stored settings.
This method disables both side channels before applying configurations to ensure synchronization with the JSON configuration file. It then iterates through all side channels and applies their respective settings.
rmmSuccess on successful configuration, or rmmError if any side channel fails to configure. | rmmStatus RMMSideChannels::fetchSideChannelData | ( | uint8_t | sideChIdx, |
| SideChannelsData & | data ) |
Fetches and populates the data for a specific side channel.
| [in] | sideChIdx | The index of the side channel to fetch data for (0-based). Valid range is 0 to NUMBER_SIDE_CHANNELS - 1. |
| [out] | data | A reference to a SideChannelsData structure where the fetched data will be stored. |
sideChIdx is out of the valid range or any other error occurs. | rmmStatus RMMSideChannels::fillSideChannelsfromJson | ( | json & | settings | ) |
Populates side channel configurations from a JSON object.
This method parses a JSON object containing side channel settings and initializes the sideChannels structure with the extracted values. It validates the number of configured side channels and ensures that side channel IDs are within the allowed range.
| [in] | settings | A reference to a JSON object containing the side channel configuration. |
rmmSuccess upon successful configuration. | std::invalid_argument | if no side channel configurations are found or if the number of defined side channels exceeds NUMBER_SIDE_CHANNELS. |
| std::runtime_error | if a side channel ID is invalid or out of range. |
| rmmStatus RMMSideChannels::getSideChannelStats | ( | SideChannelStatsData & | stats | ) |
Retrieves statistics for the side channels.
This method reads the frequency and overflow status for each side channel.
| [out] | stats | A reference to a SideChannelStatsData structure where the retrieved statistics will be stored. |
rmmSuccess upon successful retrieval of statistics.