31#define HAL_DEFAULT_POWER_DISTRIBUTION_MODULE -1
49 const char* allocationLocation, int32_t* status);
153 int32_t currentsLength, int32_t* status);
double HAL_GetPowerDistributionChannelCurrent(HAL_PowerDistributionHandle handle, int32_t channel, int32_t *status)
Gets the current of a specific PowerDistribution channel.
double HAL_GetPowerDistributionTemperature(HAL_PowerDistributionHandle handle, int32_t *status)
Gets the temperature of the Power Distribution Panel.
void HAL_CleanPowerDistribution(HAL_PowerDistributionHandle handle)
Cleans a PowerDistribution module.
void HAL_StopPowerDistributionStream(HAL_PowerDistributionHandle handle, int32_t *status)
double HAL_GetPowerDistributionTotalPower(HAL_PowerDistributionHandle handle, int32_t *status)
Gets the total power of the Power Distribution Panel.
void HAL_GetPowerDistributionAllChannelCurrents(HAL_PowerDistributionHandle handle, double *currents, int32_t currentsLength, int32_t *status)
Gets the current of all channels on the PowerDistribution.
HAL_PowerDistributionType
The types of power distribution devices.
Definition PowerDistribution.h:21
HAL_PowerDistributionHandle HAL_InitializePowerDistribution(int32_t busId, int32_t moduleNumber, HAL_PowerDistributionType type, const char *allocationLocation, int32_t *status)
Initializes a Power Distribution Panel.
void HAL_FreePowerDistributionStreamData(HAL_PowerDistributionChannelData *data, int32_t count)
void HAL_ClearPowerDistributionStickyFaults(HAL_PowerDistributionHandle handle, int32_t *status)
Clears any PowerDistribution sticky faults.
HAL_Bool HAL_CheckPowerDistributionModule(int32_t module, HAL_PowerDistributionType type)
Checks if a PowerDistribution module is valid.
int32_t HAL_GetPowerDistributionNumChannels(HAL_PowerDistributionHandle handle, int32_t *status)
Gets the number of channels for this handle.
double HAL_GetPowerDistributionTotalEnergy(HAL_PowerDistributionHandle handle, int32_t *status)
Gets the total energy of the Power Distribution Panel.
int32_t HAL_GetPowerDistributionModuleNumber(HAL_PowerDistributionHandle handle, int32_t *status)
Gets the module number for a specific handle.
void HAL_GetPowerDistributionFaults(HAL_PowerDistributionHandle handle, HAL_PowerDistributionFaults *faults, int32_t *status)
Get the current faults of the PowerDistribution.
HAL_Bool HAL_GetPowerDistributionSwitchableChannel(HAL_PowerDistributionHandle handle, int32_t *status)
Returns true if switchable channel is powered on.
HAL_PowerDistributionChannelData * HAL_GetPowerDistributionStreamData(HAL_PowerDistributionHandle handle, int32_t *count, int32_t *status)
void HAL_GetPowerDistributionVersion(HAL_PowerDistributionHandle handle, HAL_PowerDistributionVersion *version, int32_t *status)
Get the version of the PowerDistribution.
void HAL_GetPowerDistributionStickyFaults(HAL_PowerDistributionHandle handle, HAL_PowerDistributionStickyFaults *stickyFaults, int32_t *status)
Gets the sticky faults of the PowerDistribution.
HAL_Bool HAL_CheckPowerDistributionChannel(HAL_PowerDistributionHandle handle, int32_t channel)
Checks if a PowerDistribution channel is valid.
double HAL_GetPowerDistributionVoltage(HAL_PowerDistributionHandle handle, int32_t *status)
Gets the PowerDistribution input voltage.
void HAL_StartPowerDistributionStream(HAL_PowerDistributionHandle handle, int32_t *status)
void HAL_SetPowerDistributionSwitchableChannel(HAL_PowerDistributionHandle handle, HAL_Bool enabled, int32_t *status)
Power on/off switchable channel.
HAL_PowerDistributionType HAL_GetPowerDistributionType(HAL_PowerDistributionHandle handle, int32_t *status)
Gets the type of PowerDistribution module.
void HAL_ResetPowerDistributionTotalEnergy(HAL_PowerDistributionHandle handle, int32_t *status)
Resets the PowerDistribution accumulated energy.
double HAL_GetPowerDistributionTotalCurrent(HAL_PowerDistributionHandle handle, int32_t *status)
Gets the total current of the PowerDistribution.
@ HAL_PowerDistributionType_kAutomatic
Automatically determines the module type.
Definition PowerDistribution.h:23
@ HAL_PowerDistributionType_kCTRE
CTRE (Cross The Road Electronics) Power Distribution Panel (PDP).
Definition PowerDistribution.h:25
@ HAL_PowerDistributionType_kRev
REV Power Distribution Hub (PDH).
Definition PowerDistribution.h:27
int32_t HAL_Bool
Definition Types.h:75
HAL_Handle HAL_PowerDistributionHandle
Definition Types.h:65
#define HAL_ENUM(name)
Definition Types.h:90
Definition PowerDistribution.h:413
float current
Definition PowerDistribution.h:414
int32_t channel
Definition PowerDistribution.h:415
uint64_t timestamp
Definition PowerDistribution.h:416
Definition PowerDistribution.h:251
uint32_t channel21BreakerFault
Breaker fault on channel 22.
Definition PowerDistribution.h:295
uint32_t channel4BreakerFault
Breaker fault on channel 4.
Definition PowerDistribution.h:261
uint32_t brownout
The input voltage is below the minimum voltage.
Definition PowerDistribution.h:301
uint32_t channel3BreakerFault
Breaker fault on channel 3.
Definition PowerDistribution.h:259
uint32_t channel0BreakerFault
Breaker fault on channel 0.
Definition PowerDistribution.h:253
uint32_t channel11BreakerFault
Breaker fault on channel 12.
Definition PowerDistribution.h:275
uint32_t hardwareFault
The hardware on the device has malfunctioned.
Definition PowerDistribution.h:305
uint32_t channel16BreakerFault
Breaker fault on channel 17.
Definition PowerDistribution.h:285
uint32_t channel22BreakerFault
Breaker fault on channel 23.
Definition PowerDistribution.h:297
uint32_t channel10BreakerFault
Breaker fault on channel 10.
Definition PowerDistribution.h:273
uint32_t channel14BreakerFault
Breaker fault on channel 15.
Definition PowerDistribution.h:281
uint32_t channel20BreakerFault
Breaker fault on channel 21.
Definition PowerDistribution.h:293
uint32_t channel9BreakerFault
Breaker fault on channel 9.
Definition PowerDistribution.h:271
uint32_t channel1BreakerFault
Breaker fault on channel 1.
Definition PowerDistribution.h:255
uint32_t channel12BreakerFault
Breaker fault on channel 13.
Definition PowerDistribution.h:277
uint32_t channel2BreakerFault
Breaker fault on channel 2.
Definition PowerDistribution.h:257
uint32_t channel7BreakerFault
Breaker fault on channel 7.
Definition PowerDistribution.h:267
uint32_t channel23BreakerFault
Breaker fault on channel 24.
Definition PowerDistribution.h:299
uint32_t channel19BreakerFault
Breaker fault on channel 20.
Definition PowerDistribution.h:291
uint32_t canWarning
A warning was raised by the device's CAN controller.
Definition PowerDistribution.h:303
uint32_t channel5BreakerFault
Breaker fault on channel 5.
Definition PowerDistribution.h:263
uint32_t channel17BreakerFault
Breaker fault on channel 18.
Definition PowerDistribution.h:287
uint32_t channel15BreakerFault
Breaker fault on channel 16.
Definition PowerDistribution.h:283
uint32_t channel8BreakerFault
Breaker fault on channel 8.
Definition PowerDistribution.h:269
uint32_t channel18BreakerFault
Breaker fault on channel 19.
Definition PowerDistribution.h:289
uint32_t channel13BreakerFault
Breaker fault on channel 14.
Definition PowerDistribution.h:279
uint32_t channel6BreakerFault
Breaker fault on channel 6.
Definition PowerDistribution.h:265
Storage for REV PDH Sticky Faults.
Definition PowerDistribution.h:311
uint32_t channel14BreakerFault
Breaker fault on channel 15.
Definition PowerDistribution.h:341
uint32_t channel11BreakerFault
Breaker fault on channel 12.
Definition PowerDistribution.h:335
uint32_t canWarning
A warning was raised by the device's CAN controller.
Definition PowerDistribution.h:363
uint32_t channel15BreakerFault
Breaker fault on channel 16.
Definition PowerDistribution.h:343
uint32_t channel19BreakerFault
Breaker fault on channel 20.
Definition PowerDistribution.h:351
uint32_t brownout
The input voltage is below the minimum voltage.
Definition PowerDistribution.h:361
uint32_t channel23BreakerFault
Breaker fault on channel 24.
Definition PowerDistribution.h:359
uint32_t channel2BreakerFault
Breaker fault on channel 2.
Definition PowerDistribution.h:317
uint32_t channel5BreakerFault
Breaker fault on channel 5.
Definition PowerDistribution.h:323
uint32_t channel9BreakerFault
Breaker fault on channel 9.
Definition PowerDistribution.h:331
uint32_t channel7BreakerFault
Breaker fault on channel 7.
Definition PowerDistribution.h:327
uint32_t firmwareFault
The firmware on the device has malfunctioned.
Definition PowerDistribution.h:369
uint32_t channel16BreakerFault
Breaker fault on channel 17.
Definition PowerDistribution.h:345
uint32_t channel21BreakerFault
Breaker fault on channel 22.
Definition PowerDistribution.h:355
uint32_t hardwareFault
The hardware on the device has malfunctioned.
Definition PowerDistribution.h:367
uint32_t channel6BreakerFault
Breaker fault on channel 6.
Definition PowerDistribution.h:325
uint32_t channel17BreakerFault
Breaker fault on channel 18.
Definition PowerDistribution.h:347
uint32_t channel8BreakerFault
Breaker fault on channel 8.
Definition PowerDistribution.h:329
uint32_t channel3BreakerFault
Breaker fault on channel 3.
Definition PowerDistribution.h:319
uint32_t channel10BreakerFault
Breaker fault on channel 10.
Definition PowerDistribution.h:333
uint32_t hasReset
The device has rebooted.
Definition PowerDistribution.h:371
uint32_t channel1BreakerFault
Breaker fault on channel 1.
Definition PowerDistribution.h:315
uint32_t channel12BreakerFault
Breaker fault on channel 13.
Definition PowerDistribution.h:337
uint32_t channel22BreakerFault
Breaker fault on channel 23.
Definition PowerDistribution.h:357
uint32_t channel13BreakerFault
Breaker fault on channel 14.
Definition PowerDistribution.h:339
uint32_t channel0BreakerFault
Breaker fault on channel 0.
Definition PowerDistribution.h:313
uint32_t channel18BreakerFault
Breaker fault on channel 19.
Definition PowerDistribution.h:349
uint32_t channel4BreakerFault
Breaker fault on channel 4.
Definition PowerDistribution.h:321
uint32_t channel20BreakerFault
Breaker fault on channel 21.
Definition PowerDistribution.h:353
uint32_t canBusOff
The device's CAN controller experienced a "Bus Off" event.
Definition PowerDistribution.h:365
Power distribution version.
Definition PowerDistribution.h:236
uint32_t hardwareMajor
Hardware major version number.
Definition PowerDistribution.h:246
uint32_t firmwareMinor
Firmware minor version number.
Definition PowerDistribution.h:240
uint32_t firmwareMajor
Firmware major version number.
Definition PowerDistribution.h:238
uint32_t hardwareMinor
Hardware minor version number.
Definition PowerDistribution.h:244
uint32_t firmwareFix
Firmware fix version number.
Definition PowerDistribution.h:242
uint32_t uniqueId
Unique ID.
Definition PowerDistribution.h:248