Rail Entity

group RailEntity

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. It has the ability to take current and voltage measurements, and depending on hardware, may have additional modes and capabilities.

void rail_getCurrent(unsigned int *id, struct Result *result, const int index)

Get the rail current.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The current in micro-amps (1 == 1e-6A).

  • index – The index of the entity in question.

void rail_setCurrentSetpoint(unsigned int *id, struct Result *result, const int index, const int microamps)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • microamps – The current in micro-amps (1 == 1e-6A) to be supply by the rail.

void rail_getCurrentSetpoint(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The current in micro-amps (1 == 1e-6A) the rail is trying to achieve. On some modules this is a measured value so it may not exactly match what was previously set via the setCurrent interface. Refer to the module datasheet to to determine if this is a measured or stored value.

  • index – The index of the entity in question.

void rail_setCurrentLimit(unsigned int *id, struct Result *result, const int index, const int microamps)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • microamps – The current in micro-amps (1 == 1e-6A).

void rail_getCurrentLimit(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The current in micro-amps (1 == 1e-6A).

  • index – The index of the entity in question.

void rail_getTemperature(unsigned int *id, struct Result *result, const int index)

Get the rail temperature.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. 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.

  • index – The index of the entity in question.

void rail_getEnable(unsigned int *id, struct Result *result, const int index)

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.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. true: enabled: connected to the supply rail voltage; false: disabled: disconnected from the supply rail voltage

  • index – The index of the entity in question.

void rail_setEnable(unsigned int *id, struct Result *result, const int index, const unsigned char 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.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • bEnable – true: enable and connect to the supply rail voltage; false: disable and disconnect from the supply rail voltage

void rail_getVoltage(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The voltage in micro-volts (1 == 1e-6V) currently supplied by the rail. On some modules this is a measured value so it 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.

  • index – The index of the entity in question.

void rail_setVoltageSetpoint(unsigned int *id, struct Result *result, const int index, const int 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.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • microvolts – The voltage in micro-volts (1 == 1e-6V) to be supplied by the rail.

void rail_getVoltageSetpoint(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The voltage in micro-volts (1 == 1e-6V) the rail is trying to achieve. On some modules this is a measured value so it 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.

  • index – The index of the entity in question.

void rail_setVoltageMinLimit(unsigned int *id, struct Result *result, const int index, const int microvolts)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • microvolts – The voltage in micro-volts (1 == 1e-6V).

void rail_getVoltageMinLimit(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The voltage in micro-volts (1 == 1e-6V).

  • index – The index of the entity in question.

void rail_setVoltageMaxLimit(unsigned int *id, struct Result *result, const int index, const int microvolts)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • microvolts – The voltage in micro-volts (1 == 1e-6V).

void rail_getVoltageMaxLimit(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The voltage in micro-volts (1 == 1e-6V).

  • index – The index of the entity in question.

void rail_getPower(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The power in milli-watts (1 == 1e-3W) currently supplied by the rail. On some modules this is a measured value so it may not exactly match what was previously set via the setPower interface. Refer to the module datasheet to to determine if this is a measured or stored value.

  • index – The index of the entity in question.

void rail_setPowerSetpoint(unsigned int *id, struct Result *result, const int index, const int milliwatts)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • milliwatts – The power in milli-watts (1 == 1e-3W) to be supplied by the rail.

void rail_getPowerSetpoint(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The power in milli-watts (1 == 1e-3W) the rail is trying to achieve. On some modules this is a measured value so it may not exactly match what was previously set via the setPower interface. Refer to the module datasheet to to determine if this is a measured or stored value.

  • index – The index of the entity in question.

void rail_setPowerLimit(unsigned int *id, struct Result *result, const int index, const int milliwatts)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • milliwatts – The power in milli-watts (mW).

void rail_getPowerLimit(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The power in milli-watts (mW).

  • index – The index of the entity in question.

void rail_getResistance(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The resistance in milli-ohms (1 == 1e-3Ohms) currently drawn by the rail. On some modules this is a measured value so it may not exactly match what was previously set via the setResistance interface. Refer to the module datasheet to to determine if this is a measured or stored value.

  • index – The index of the entity in question.

void rail_setResistanceSetpoint(unsigned int *id, struct Result *result, const int index, const int milliohms)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • milliohms – The resistance in milli-ohms (1 == 1e-3Ohms) to be drawn by the rail.

void rail_getResistanceSetpoint(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The resistance in milli-ohms (1 == 1e-3Ohms) the rail is trying to achieve. On some modules this is a measured value so it may not exactly match what was previously set via the setResistance interface. Refer to the module datasheet to to determine if this is a measured or stored value.

  • index – The index of the entity in question.

void rail_setKelvinSensingEnable(unsigned int *id, struct Result *result, const int index, const unsigned char bEnable)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • bEnable – enable or disable kelvin sensing.

void rail_getKelvinSensingEnable(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Kelvin sensing is enabled or disabled.

  • index – The index of the entity in question.

void rail_getKelvinSensingState(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. Kelvin sensing is enabled or disabled.

  • index – The index of the entity in question.

void rail_setOperationalMode(unsigned int *id, struct Result *result, const int index, const unsigned char mode)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.

  • mode – The operational mode to employ.

void rail_getOperationalMode(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The current operational mode setting.

  • index – The index of the entity in question.

void rail_getOperationalState(unsigned int *id, struct Result *result, const int index)

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

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone and the requested value on success. Non-zero error code on failure. The current operational state, hardware configuration, faults, and operating mode.

  • index – The index of the entity in question.

void rail_clearFaults(unsigned int *id, struct Result *result, const int index)

Clears the current fault state of the rail. Refer to the module datasheet for definition of the rail faults.

Returns common entity return values

Parameters:
  • id – ID assigned through “module_createStem”

  • result – Object containing aErrNone on success. Non-zero error code on failure.

  • index – The index of the entity in question.