WPILibC++ 2024.3.2
PowerDistribution.h File Reference
#include <stdint.h>
#include "hal/Types.h"

Go to the source code of this file.

Classes

struct  HAL_PowerDistributionVersion
 Power distribution version. More...
 
struct  HAL_PowerDistributionFaults
 
struct  HAL_PowerDistributionStickyFaults
 Storage for REV PDH Sticky Faults. More...
 
struct  HAL_PowerDistributionChannelData
 

Macros

#define HAL_DEFAULT_POWER_DISTRIBUTION_MODULE   -1
 

Typedefs

typedef struct HAL_PowerDistributionChannelData HAL_PowerDistributionChannelData
 

Enumerations

enum  HAL_PowerDistributionType : int32_t { HAL_PowerDistributionType_kAutomatic = 0 , HAL_PowerDistributionType_kCTRE = 1 , HAL_PowerDistributionType_kRev = 2 }
 The types of power distribution devices. More...
 

Functions

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 Power Distribution Panel. 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 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 Power Distribution Panel. More...
 
double HAL_GetPowerDistributionTotalEnergy (HAL_PowerDistributionHandle handle, int32_t *status)
 Gets the total energy of the Power Distribution Panel. 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)
 Get the version of the PowerDistribution. More...
 
void HAL_GetPowerDistributionFaults (HAL_PowerDistributionHandle handle, HAL_PowerDistributionFaults *faults, int32_t *status)
 Get the current faults of the PowerDistribution. More...
 
void HAL_GetPowerDistributionStickyFaults (HAL_PowerDistributionHandle handle, HAL_PowerDistributionStickyFaults *stickyFaults, int32_t *status)
 Gets the sticky faults of the PowerDistribution. More...
 
void HAL_StartPowerDistributionStream (HAL_PowerDistributionHandle handle, int32_t *status)
 
HAL_PowerDistributionChannelDataHAL_GetPowerDistributionStreamData (HAL_PowerDistributionHandle handle, int32_t *count, int32_t *status)
 
void HAL_FreePowerDistributionStreamData (HAL_PowerDistributionChannelData *data, int32_t count)
 
void HAL_StopPowerDistributionStream (HAL_PowerDistributionHandle handle, int32_t *status)