RMM API 2.0.0
Loading...
Searching...
No Matches
RMMRails Class Reference

Class for managing power monitoring and temperature sensing on the RMM FPGA. More...

#include <RMMRails.h>

Collaboration diagram for RMMRails:

Public Member Functions

 RMMRails (RMMRegisterAccess &RMMRegs)
 Constructor of the RMMRails.
 
double getTemperature ()
 Gets the temperature of the RMM FPGA.
 
rmmStatus enablePowerMonitoring (int interval_ms)
 Enables the internal state machine to start reading out the Voltage, Current, and Power of various power rails on the VCU118.
 
rmmStatus disablePowerMonitoring ()
 Disables the internal state machine that reads out the power rail information.
 
rmmStatus getPowerVoltageCurrent (float voltageTolerancePercent, PowerResultsMap *result)
 Gets the power, voltage, and current for all INA226 sensors on the VCU118.
 

Public Attributes

RMMLog rmmLog
 Log handler for RMMRails messages.
 

Detailed Description

Class for managing power monitoring and temperature sensing on the RMM FPGA.

The RMMRails class provides methods for enabling and disabling power monitoring, retrieving temperature readings, and accessing power, voltage, and current data for various power rails.

Constructor & Destructor Documentation

◆ RMMRails()

RMMRails::RMMRails ( RMMRegisterAccess & RMMRegs)

Constructor of the RMMRails.

Initializes the RMMRails instance with a reference to an RMMRegisterAccess object for interacting with hardware registers. It also initializes the logging system and sets internal flags for power monitoring.

Parameters
RMMRegsReference to an RMMRegisterAccess instance for register access.

Member Function Documentation

◆ disablePowerMonitoring()

rmmStatus RMMRails::disablePowerMonitoring ( )

Disables the internal state machine that reads out the power rail information.

Returns
status.

◆ enablePowerMonitoring()

rmmStatus RMMRails::enablePowerMonitoring ( int interval_ms)

Enables the internal state machine to start reading out the Voltage, Current, and Power of various power rails on the VCU118.

Parameters
interval_msinterval between updates.
Returns
status.

◆ getPowerVoltageCurrent()

rmmStatus RMMRails::getPowerVoltageCurrent ( float voltageTolerancePercent,
PowerResultsMap * result )

Gets the power, voltage, and current for all INA226 sensors on the VCU118.

Internal power monitoring must be enabled first using enablePowerMonitoring(interval_ms) to set the internal polling interval.

Parameters
voltageTolerancePercentPercent tolerance of voltage from expected values (default = 1.0).
resultPointer to a PowerResultsMap that will be filled with power, voltage, and current data for all sensors.
Returns
Dictionary with the following entry for each sensor: "$sensor": { "V" : Voltage in Volts (float), "V_OK" : Voltage within tolerance (bool), "A" : Current in Amperes (float), "W" : Power in Watts (float) }

◆ getTemperature()

double RMMRails::getTemperature ( )

Gets the temperature of the RMM FPGA.

Returns
float Temperature in degrees Celsius of the hottest temperature sensor.

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