VMX-pi C++ HAL Library for Raspberry Pi
VMX-pi Robotics Controller & Vision/Motion Processor
Public Member Functions | Friends | List of all members
VMXPower Class Reference

The VMXPower class provides access to VMX power management functions. More...

#include <VMXPower.h>

Public Member Functions

bool GetOvercurrent (bool &overcurrent, VMXErrorCode *errcode=0)
 Retrieves the current VMX Current Limiting Power-distribution Switch overcurrent condition warning status. More...
 
bool GetSystemVoltage (float &ext_power_volts, VMXErrorCode *errcode=0)
 Retrieves the current VMX system voltage. More...
 
bool GetOvercurrentLimitEnabled (bool &enabled, VMXErrorCode *errcode=0)
 Retreives the Overcurrent Limiter enabled state. More...
 
bool SetOvercurrentLimitEnabled (bool enabled, VMXErrorCode *errcode=0)
 Sets the Overcurrent Limiter enabled state. More...
 

Friends

class VMXPi
 

Detailed Description

The VMXPower class provides access to VMX power management functions.

Member Function Documentation

◆ GetOvercurrent()

bool VMXPower::GetOvercurrent ( bool &  overcurrent,
VMXErrorCode *  errcode = 0 
)

Retrieves the current VMX Current Limiting Power-distribution Switch overcurrent condition warning status.

If true, the external IO device current limit has been reached. In this condition, the external IO devices may be consuming more than the current limit, or a short-circuit condition may exist.

Parameters
[out]overcurrentAn overcurrent condition in is currently being reported by the Power-distribution switch.
[out]errcodePointer to the VMXErrorCode to be returned in case of error; may be null
Returns
Returns true if the message succesfully enqueued for transfer. If false, the error code will be returned via the errcode parameter.

◆ GetOvercurrentLimitEnabled()

bool VMXPower::GetOvercurrentLimitEnabled ( bool &  enabled,
VMXErrorCode *  errcode = 0 
)

Retreives the Overcurrent Limiter enabled state.

See VMXPower::SetOvercurrentLimitEnabled() for more details.

Parameters
[out]enabledIf true, the overcurrent limiter is currently enabled.
[out]errcodePointer to the VMXErrorCode to be returned in case of error; may be null
Returns
Returns true if the overcurrent limiter enabled state was retreived. If false, the error code will be returned via the errcode parameter.

◆ GetSystemVoltage()

bool VMXPower::GetSystemVoltage ( float &  ext_power_volts,
VMXErrorCode *  errcode = 0 
)

Retrieves the current VMX system voltage.

Parameters
[out]ext_power_voltsThe current VMX system input voltage. This voltage must be at least 6 volts in order to provide sufficient voltage to power the Raspberry-pi host, the VMX real-time microcontroller and any external devices.
[out]errcodePointer to the VMXErrorCode to be returned in case of error; may be null
Returns
Returns true if the current VMX system voltage was retrieved. If false, the error code will be returned via the errcode parameter.

◆ SetOvercurrentLimitEnabled()

bool VMXPower::SetOvercurrentLimitEnabled ( bool  enabled,
VMXErrorCode *  errcode = 0 
)

Sets the Overcurrent Limiter enabled state.

If the Overcurrent limiter is enabled, the VMX microcontroller will automatically disable power to all external devices (not including the Raspberry-pi host) when an overcurrent condition exists; when the overcurrent condition no longer exists, the VMX microcontroller will automatically re-enable power to all external devices.

Parameters
[out]enabledIf true, the overcurrent limiter should be enabled.
[out]errcodePointer to the VMXErrorCode to be returned in case of error; may be null
Returns
Returns true if the overcurrent limiter enabled state was modified. If false, the error code will be returned via the errcode parameter.

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