VMX-pi C++ HAL Library for Raspberry Pi
VMX-pi Robotics Controller & Vision/Motion Processor
|
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 |
The VMXPower class provides access to VMX power management functions.
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.
[out] | overcurrent | An overcurrent condition in is currently being reported by the Power-distribution switch. |
[out] | errcode | Pointer to the VMXErrorCode to be returned in case of error; may be null |
bool VMXPower::GetOvercurrentLimitEnabled | ( | bool & | enabled, |
VMXErrorCode * | errcode = 0 |
||
) |
Retreives the Overcurrent Limiter enabled state.
See VMXPower::SetOvercurrentLimitEnabled() for more details.
[out] | enabled | If true, the overcurrent limiter is currently enabled. |
[out] | errcode | Pointer to the VMXErrorCode to be returned in case of error; may be null |
bool VMXPower::GetSystemVoltage | ( | float & | ext_power_volts, |
VMXErrorCode * | errcode = 0 |
||
) |
Retrieves the current VMX system voltage.
[out] | ext_power_volts | The 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] | errcode | Pointer to the VMXErrorCode to be returned in case of error; may be null |
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.
[out] | enabled | If true, the overcurrent limiter should be enabled. |
[out] | errcode | Pointer to the VMXErrorCode to be returned in case of error; may be null |