WPILibC++ 2023.4.3
|
Functions to control Power Distribution devices. More...
Classes | |
struct | HAL_PowerDistributionVersion |
struct | HAL_PowerDistributionFaults |
struct | HAL_PowerDistributionStickyFaults |
Storage for REV PDH Sticky Faults. More... | |
Macros | |
#define | HAL_DEFAULT_POWER_DISTRIBUTION_MODULE -1 |
Functions | |
HAL_ENUM (HAL_PowerDistributionType) | |
The acceptable accelerometer ranges. More... | |
HAL_PowerDistributionHandle | HAL_InitializePowerDistribution (int32_t moduleNumber, HAL_PowerDistributionType type, const char *allocationLocation, int32_t *status) |
Initializes a Power Distribution Panel. More... | |
int32_t | HAL_GetPowerDistributionModuleNumber (HAL_PowerDistributionHandle handle, int32_t *status) |
Gets the module number for a specific handle. More... | |
void | HAL_CleanPowerDistribution (HAL_PowerDistributionHandle handle) |
Cleans a PowerDistribution module. More... | |
HAL_Bool | HAL_CheckPowerDistributionChannel (HAL_PowerDistributionHandle handle, int32_t channel) |
Checks if a PowerDistribution channel is valid. More... | |
HAL_Bool | HAL_CheckPowerDistributionModule (int32_t module, HAL_PowerDistributionType type) |
Checks if a PowerDistribution module is valid. More... | |
HAL_PowerDistributionType | HAL_GetPowerDistributionType (HAL_PowerDistributionHandle handle, int32_t *status) |
Gets the type of PowerDistribution module. More... | |
int32_t | HAL_GetPowerDistributionNumChannels (HAL_PowerDistributionHandle handle, int32_t *status) |
Gets the number of channels for this handle. More... | |
double | HAL_GetPowerDistributionTemperature (HAL_PowerDistributionHandle handle, int32_t *status) |
Gets the temperature of the PowerDistribution. More... | |
double | HAL_GetPowerDistributionVoltage (HAL_PowerDistributionHandle handle, int32_t *status) |
Gets the PowerDistribution input voltage. More... | |
double | HAL_GetPowerDistributionChannelCurrent (HAL_PowerDistributionHandle handle, int32_t channel, int32_t *status) |
Gets the current of a specific PowerDistribution channel. More... | |
void | HAL_GetPowerDistributionAllChannelCurrents (HAL_PowerDistributionHandle handle, double *currents, int32_t currentsLength, int32_t *status) |
Gets the current of all 24 channels on the PowerDistribution. More... | |
double | HAL_GetPowerDistributionTotalCurrent (HAL_PowerDistributionHandle handle, int32_t *status) |
Gets the total current of the PowerDistribution. More... | |
double | HAL_GetPowerDistributionTotalPower (HAL_PowerDistributionHandle handle, int32_t *status) |
Gets the total power of the PowerDistribution. More... | |
double | HAL_GetPowerDistributionTotalEnergy (HAL_PowerDistributionHandle handle, int32_t *status) |
Gets the total energy of the PowerDistribution. More... | |
void | HAL_ResetPowerDistributionTotalEnergy (HAL_PowerDistributionHandle handle, int32_t *status) |
Resets the PowerDistribution accumulated energy. More... | |
void | HAL_ClearPowerDistributionStickyFaults (HAL_PowerDistributionHandle handle, int32_t *status) |
Clears any PowerDistribution sticky faults. More... | |
void | HAL_SetPowerDistributionSwitchableChannel (HAL_PowerDistributionHandle handle, HAL_Bool enabled, int32_t *status) |
Power on/off switchable channel. More... | |
HAL_Bool | HAL_GetPowerDistributionSwitchableChannel (HAL_PowerDistributionHandle handle, int32_t *status) |
Returns true if switchable channel is powered on. More... | |
void | HAL_GetPowerDistributionVersion (HAL_PowerDistributionHandle handle, HAL_PowerDistributionVersion *version, int32_t *status) |
void | HAL_GetPowerDistributionFaults (HAL_PowerDistributionHandle handle, HAL_PowerDistributionFaults *faults, int32_t *status) |
void | HAL_GetPowerDistributionStickyFaults (HAL_PowerDistributionHandle handle, HAL_PowerDistributionStickyFaults *stickyFaults, int32_t *status) |
Functions to control Power Distribution devices.
#define HAL_DEFAULT_POWER_DISTRIBUTION_MODULE -1 |
HAL_Bool HAL_CheckPowerDistributionChannel | ( | HAL_PowerDistributionHandle | handle, |
int32_t | channel | ||
) |
Checks if a PowerDistribution channel is valid.
handle | the module handle |
channel | the channel to check |
HAL_Bool HAL_CheckPowerDistributionModule | ( | int32_t | module, |
HAL_PowerDistributionType | type | ||
) |
Checks if a PowerDistribution module is valid.
module | the module to check |
type | the type of module |
void HAL_CleanPowerDistribution | ( | HAL_PowerDistributionHandle | handle | ) |
Cleans a PowerDistribution module.
handle | the module handle |
void HAL_ClearPowerDistributionStickyFaults | ( | HAL_PowerDistributionHandle | handle, |
int32_t * | status | ||
) |
Clears any PowerDistribution sticky faults.
[in] | handle | the module handle |
[out] | status | Error status variable. 0 on success. |
HAL_ENUM | ( | HAL_PowerDistributionType | ) |
The acceptable accelerometer ranges.
void HAL_GetPowerDistributionAllChannelCurrents | ( | HAL_PowerDistributionHandle | handle, |
double * | currents, | ||
int32_t | currentsLength, | ||
int32_t * | status | ||
) |
Gets the current of all 24 channels on the PowerDistribution.
The array must be large enough to hold all channels.
[in] | handle | the module handle |
[out] | currents | the currents |
[in] | currentsLength | the length of the currents array |
[out] | status | Error status variable. 0 on success. |
double HAL_GetPowerDistributionChannelCurrent | ( | HAL_PowerDistributionHandle | handle, |
int32_t | channel, | ||
int32_t * | status | ||
) |
Gets the current of a specific PowerDistribution channel.
[in] | handle | the module handle |
[in] | channel | the channel |
[out] | status | Error status variable. 0 on success. |
void HAL_GetPowerDistributionFaults | ( | HAL_PowerDistributionHandle | handle, |
HAL_PowerDistributionFaults * | faults, | ||
int32_t * | status | ||
) |
int32_t HAL_GetPowerDistributionModuleNumber | ( | HAL_PowerDistributionHandle | handle, |
int32_t * | status | ||
) |
Gets the module number for a specific handle.
[in] | handle | the module handle |
[out] | status | Error status variable. 0 on success. |
int32_t HAL_GetPowerDistributionNumChannels | ( | HAL_PowerDistributionHandle | handle, |
int32_t * | status | ||
) |
Gets the number of channels for this handle.
[in] | handle | the handle |
[out] | status | Error status variable. 0 on success. |
void HAL_GetPowerDistributionStickyFaults | ( | HAL_PowerDistributionHandle | handle, |
HAL_PowerDistributionStickyFaults * | stickyFaults, | ||
int32_t * | status | ||
) |
HAL_Bool HAL_GetPowerDistributionSwitchableChannel | ( | HAL_PowerDistributionHandle | handle, |
int32_t * | status | ||
) |
Returns true if switchable channel is powered on.
This is a REV PDH-specific function. This function will no-op on CTRE PDP.
[in] | handle | the module handle |
[out] | status | Error status variable. 0 on success. |
double HAL_GetPowerDistributionTemperature | ( | HAL_PowerDistributionHandle | handle, |
int32_t * | status | ||
) |
Gets the temperature of the PowerDistribution.
[in] | handle | the module handle |
[out] | status | Error status variable. 0 on success. |
double HAL_GetPowerDistributionTotalCurrent | ( | HAL_PowerDistributionHandle | handle, |
int32_t * | status | ||
) |
Gets the total current of the PowerDistribution.
[in] | handle | the module handle |
[out] | status | Error status variable. 0 on success. |
double HAL_GetPowerDistributionTotalEnergy | ( | HAL_PowerDistributionHandle | handle, |
int32_t * | status | ||
) |
Gets the total energy of the PowerDistribution.
[in] | handle | the module handle |
[out] | status | Error status variable. 0 on success. |
double HAL_GetPowerDistributionTotalPower | ( | HAL_PowerDistributionHandle | handle, |
int32_t * | status | ||
) |
Gets the total power of the PowerDistribution.
[in] | handle | the module handle |
[out] | status | Error status variable. 0 on success. |
HAL_PowerDistributionType HAL_GetPowerDistributionType | ( | HAL_PowerDistributionHandle | handle, |
int32_t * | status | ||
) |
Gets the type of PowerDistribution module.
[in] | handle | the module handle |
[out] | status | Error status variable. 0 on success. |
void HAL_GetPowerDistributionVersion | ( | HAL_PowerDistributionHandle | handle, |
HAL_PowerDistributionVersion * | version, | ||
int32_t * | status | ||
) |
double HAL_GetPowerDistributionVoltage | ( | HAL_PowerDistributionHandle | handle, |
int32_t * | status | ||
) |
Gets the PowerDistribution input voltage.
[in] | handle | the module handle |
[out] | status | Error status variable. 0 on success. |
HAL_PowerDistributionHandle HAL_InitializePowerDistribution | ( | int32_t | moduleNumber, |
HAL_PowerDistributionType | type, | ||
const char * | allocationLocation, | ||
int32_t * | status | ||
) |
Initializes a Power Distribution Panel.
[in] | moduleNumber | the module number to initialize |
[in] | type | the type of module to initialize |
[in] | allocationLocation | the location where the allocation is occurring |
[out] | status | Error status variable. 0 on success. |
void HAL_ResetPowerDistributionTotalEnergy | ( | HAL_PowerDistributionHandle | handle, |
int32_t * | status | ||
) |
Resets the PowerDistribution accumulated energy.
[in] | handle | the module handle |
[out] | status | Error status variable. 0 on success. |
void HAL_SetPowerDistributionSwitchableChannel | ( | HAL_PowerDistributionHandle | handle, |
HAL_Bool | enabled, | ||
int32_t * | status | ||
) |
Power on/off switchable channel.
This is a REV PDH-specific function. This function will no-op on CTRE PDP.
[in] | handle | the module handle |
[in] | enabled | true to turn on switchable channel |
[out] | status | Error status variable. 0 on success. |