Rail Class

class RailClass : public Acroname::BrainStem::EntityClass

RailClass. Provides power rail functionality on certain modules. This entity is only available on certain modules. The RailClass can be used to control power to downstream devices, I has the ability to take current and voltage measurements, and depending on hardware, may have additional modes and capabilities.

Public Functions

RailClass(void)

Constructor.

~RailClass(void)

Destructor.

void init(Module *pModule, const uint8_t index)

Initialize the class.

Parameters
  • pModule: The module to which this entity belongs.
  • index: The index of the entity. Each rail index refers to a specific hardware voltage plane or “rail”. Refer to the module datasheet for definition of the hardware voltage planes and specific capabilities.

aErr getCurrent(int32_t *microamps)

Get the rail current.

Return
Returns common entity return values
Parameters
  • microamps: The current in micro-amps (1 == 1e-6A).

aErr setCurrentLimit(const int32_t microamps)

Set the rail current limit setting. (Check product datasheet to see if this feature is available)

Return
Returns common entity return values
Parameters
  • microamps: The current in micro-amps (1 == 1e-6A).

aErr getCurrentLimit(int32_t *microamps)

Get the rail current limit setting. (Check product datasheet to see if this feature is available)

Return
Returns common entity return values
Parameters
  • microamps: The current in micro-amps (1 == 1e-6A).

aErr getTemperature(int32_t *microcelsius)

Get the rail temperature.

Return
Returns common entity return values
Parameters
  • microcelsius: The measured temperature associated with the rail in micro-Celsius (1 == 1e-6˚C). The temperature may be associated with the module’s internal rail circuitry or an externally connected temperature sensors. Refer to the module datasheet for definition of the temperature measurement location and specific capabilities.

aErr getEnable(uint8_t *bEnable)

Get the state of the external rail switch. Not all rails can be switched on and off. Refer to the module datasheet for capability specification of the rails.

Return
Returns common entity return values
Parameters
  • bEnable: true: enabled: connected to the supply rail voltage; false: disabled: disconnected from the supply rail voltage

aErr setEnable(const uint8_t bEnable)

Set the state of the external rail switch. Not all rails can be switched on and off. Refer to the module datasheet for capability specification of the rails.

Return
Returns common entity return values
Parameters
  • bEnable: true: enable and connect to the supply rail voltage; false: disable and disconnect from the supply rail voltage

aErr setVoltage(const int32_t microvolts)

Set the rail supply voltage. Rail voltage control capabilities vary between modules. Refer to the module datasheet for definition of the rail voltage capabilities.

Return
Returns common entity return values
Parameters
  • microvolts: The voltage in micro-volts (1 == 1e-6V) to be supply by the rail.

aErr getVoltage(int32_t *microvolts)

Get the rail supply voltage. Rail voltage control capabilities vary between modules. Refer to the module datasheet for definition of the rail voltage capabilities.

Return
Returns common entity return values
Parameters
  • microvolts: The voltage in micro-volts (1 == 1e-6V) currently supplied by the rail. On some modules this is a measured value so may not exactly match what was previously set via the setVoltage interface. Refer to the module datasheet to to determine if this is a measured or stored value.

aErr getVoltageSetpoint(int32_t *microvolts)

Get the rail setpoint voltage. Rail voltage control capabilities vary between modules. Refer to the module datasheet for definition of the rail voltage capabilities.

Return
Returns common entity return values
Parameters
  • microvolts: The voltage in micro-volts (1 == 1e-6V) the rail is trying to achieve. On some modules this is a measured value so may not exactly match what was previously set via the setVoltage interface. Refer to the module datasheet to to determine if this is a measured or stored value.

aErr setKelvinSensingEnable(const uint8_t bEnable)

Enable or Disable kelvin sensing on the module. Refer to the module datasheet for definition of the rail kelvin sensing capabilities.

Return
Returns common entity return values
Parameters
  • bEnable: enable or disable kelvin sensing.

aErr getKelvinSensingEnable(uint8_t *bEnable)

Determine whether kelvin sensing is enabled or disabled. Refer to the module datasheet for definition of the rail kelvin sensing capabilities.

Return
Returns common entity return values
Parameters
  • bEnable: Kelvin sensing is enabled or disabled.

aErr getKelvinSensingState(uint8_t *state)

Determine whether kelvin sensing has been disabled by the system. Refer to the module datasheet for definition of the rail kelvin sensing capabilities.

Return
Returns common entity return values
Parameters
  • state: Kelvin sensing is enabled or disabled.

aErr setOperationalMode(const uint8_t mode)

Set the operational mode of the rail. Refer to the module datasheet for definition of the rail operational capabilities.

Return
Returns common entity return values
Parameters
  • mode: The operational mode to employ.

aErr getOperationalMode(uint8_t *mode)

Determine the current operational mode of the system. Refer to the module datasheet for definition of the rail operational mode capabilities.

Return
Returns common entity return values
Parameters
  • mode: The current operational mode setting.

aErr getOperationalState(uint8_t *state)

Determine the current operational state of the system. Refer to the module datasheet for definition of the rail operational states.

Return
Returns common entity return values
Parameters
  • state: The current operational state.