WPILibC++  2020.3.2-60-g3011ebe
PDP Functions

Functions

HAL_PDPHandle HAL_InitializePDP (int32_t module, int32_t *status)
 Initializes a Power Distribution Panel. More...
 
void HAL_CleanPDP (HAL_PDPHandle handle)
 Cleans a PDP module. More...
 
HAL_Bool HAL_CheckPDPChannel (int32_t channel)
 Checks if a PDP channel is valid. More...
 
HAL_Bool HAL_CheckPDPModule (int32_t module)
 Checks if a PDP module is valid. More...
 
double HAL_GetPDPTemperature (HAL_PDPHandle handle, int32_t *status)
 Gets the temperature of the PDP. More...
 
double HAL_GetPDPVoltage (HAL_PDPHandle handle, int32_t *status)
 Gets the PDP input voltage. More...
 
double HAL_GetPDPChannelCurrent (HAL_PDPHandle handle, int32_t channel, int32_t *status)
 Gets the current of a specific PDP channel. More...
 
void HAL_GetPDPAllChannelCurrents (HAL_PDPHandle handle, double *currents, int32_t *status)
 Gets the current of all 16 channels on the PDP. More...
 
double HAL_GetPDPTotalCurrent (HAL_PDPHandle handle, int32_t *status)
 Gets the total current of the PDP. More...
 
double HAL_GetPDPTotalPower (HAL_PDPHandle handle, int32_t *status)
 Gets the total power of the PDP. More...
 
double HAL_GetPDPTotalEnergy (HAL_PDPHandle handle, int32_t *status)
 Gets the total energy of the PDP. More...
 
void HAL_ResetPDPTotalEnergy (HAL_PDPHandle handle, int32_t *status)
 Resets the PDP accumulated energy. More...
 
void HAL_ClearPDPStickyFaults (HAL_PDPHandle handle, int32_t *status)
 Clears any PDP sticky faults. More...
 

Detailed Description

Functions to control the Power Distribution Panel.

Function Documentation

◆ HAL_CheckPDPChannel()

HAL_Bool HAL_CheckPDPChannel ( int32_t  channel)

Checks if a PDP channel is valid.

Parameters
channelthe channel to check
Returns
true if the channel is valid, otherwise false

◆ HAL_CheckPDPModule()

HAL_Bool HAL_CheckPDPModule ( int32_t  module)

Checks if a PDP module is valid.

Parameters
channelthe module to check
Returns
true if the module is valid, otherwise false

◆ HAL_CleanPDP()

void HAL_CleanPDP ( HAL_PDPHandle  handle)

Cleans a PDP module.

Parameters
handlethe module handle

◆ HAL_ClearPDPStickyFaults()

void HAL_ClearPDPStickyFaults ( HAL_PDPHandle  handle,
int32_t *  status 
)

Clears any PDP sticky faults.

Parameters
handlethe module handle

◆ HAL_GetPDPAllChannelCurrents()

void HAL_GetPDPAllChannelCurrents ( HAL_PDPHandle  handle,
double *  currents,
int32_t *  status 
)

Gets the current of all 16 channels on the PDP.

The array must be large enough to hold all channels.

Parameters
handlethe module handle
currentthe currents (output)

◆ HAL_GetPDPChannelCurrent()

double HAL_GetPDPChannelCurrent ( HAL_PDPHandle  handle,
int32_t  channel,
int32_t *  status 
)

Gets the current of a specific PDP channel.

Parameters
modulethe module
channelthe channel
Returns
the channel current (amps)

◆ HAL_GetPDPTemperature()

double HAL_GetPDPTemperature ( HAL_PDPHandle  handle,
int32_t *  status 
)

Gets the temperature of the PDP.

Parameters
handlethe module handle
Returns
the module temperature (celsius)

◆ HAL_GetPDPTotalCurrent()

double HAL_GetPDPTotalCurrent ( HAL_PDPHandle  handle,
int32_t *  status 
)

Gets the total current of the PDP.

Parameters
handlethe module handle
Returns
the total current (amps)

◆ HAL_GetPDPTotalEnergy()

double HAL_GetPDPTotalEnergy ( HAL_PDPHandle  handle,
int32_t *  status 
)

Gets the total energy of the PDP.

Parameters
handlethe module handle
Returns
the total energy (joules)

◆ HAL_GetPDPTotalPower()

double HAL_GetPDPTotalPower ( HAL_PDPHandle  handle,
int32_t *  status 
)

Gets the total power of the PDP.

Parameters
handlethe module handle
Returns
the total power (watts)

◆ HAL_GetPDPVoltage()

double HAL_GetPDPVoltage ( HAL_PDPHandle  handle,
int32_t *  status 
)

Gets the PDP input voltage.

Parameters
handlethe module handle
Returns
the input voltage (volts)

◆ HAL_InitializePDP()

HAL_PDPHandle HAL_InitializePDP ( int32_t  module,
int32_t *  status 
)

Initializes a Power Distribution Panel.

Parameters
modulethe module number to initialize
Returns
the created PDP

◆ HAL_ResetPDPTotalEnergy()

void HAL_ResetPDPTotalEnergy ( HAL_PDPHandle  handle,
int32_t *  status 
)

Resets the PDP accumulated energy.

Parameters
handlethe module handle