WPILibC++  2019.1.1-beta-4-32-g6bdd7ce
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
PDP.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2016-2018 FIRST. All Rights Reserved. */
3 /* Open Source Software - may be modified and shared by FRC teams. The code */
4 /* must be accompanied by the FIRST BSD license file in the root directory of */
5 /* the project. */
6 /*----------------------------------------------------------------------------*/
7 
8 #pragma once
9 
10 #include <stdint.h>
11 
12 #include "hal/Types.h"
13 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
31 HAL_PDPHandle HAL_InitializePDP(int32_t module, int32_t* status);
32 
38 void HAL_CleanPDP(HAL_PDPHandle handle);
39 
46 HAL_Bool HAL_CheckPDPChannel(int32_t channel);
47 
54 HAL_Bool HAL_CheckPDPModule(int32_t module);
55 
62 double HAL_GetPDPTemperature(HAL_PDPHandle handle, int32_t* status);
63 
70 double HAL_GetPDPVoltage(HAL_PDPHandle handle, int32_t* status);
71 
79 double HAL_GetPDPChannelCurrent(HAL_PDPHandle handle, int32_t channel,
80  int32_t* status);
81 
88 double HAL_GetPDPTotalCurrent(HAL_PDPHandle handle, int32_t* status);
89 
96 double HAL_GetPDPTotalPower(HAL_PDPHandle handle, int32_t* status);
97 
104 double HAL_GetPDPTotalEnergy(HAL_PDPHandle handle, int32_t* status);
105 
111 void HAL_ResetPDPTotalEnergy(HAL_PDPHandle handle, int32_t* status);
112 
118 void HAL_ClearPDPStickyFaults(HAL_PDPHandle handle, int32_t* status);
119 #ifdef __cplusplus
120 } // extern "C"
121 #endif
122 
HAL_Bool HAL_CheckPDPModule(int32_t module)
Checks if a PDP module is valid.
double HAL_GetPDPVoltage(HAL_PDPHandle handle, int32_t *status)
Gets the PDP input voltage.
HAL_PDPHandle HAL_InitializePDP(int32_t module, int32_t *status)
Initializes a Power Distribution Panel.
double HAL_GetPDPTotalEnergy(HAL_PDPHandle handle, int32_t *status)
Gets the total energy of the PDP.
double HAL_GetPDPTemperature(HAL_PDPHandle handle, int32_t *status)
Gets the temperature of the PDP.
void HAL_ClearPDPStickyFaults(HAL_PDPHandle handle, int32_t *status)
Clears any PDP sticky faults.
double HAL_GetPDPTotalCurrent(HAL_PDPHandle handle, int32_t *status)
Gets the total current of the PDP.
double HAL_GetPDPTotalPower(HAL_PDPHandle handle, int32_t *status)
Gets the total power of the PDP.
double HAL_GetPDPChannelCurrent(HAL_PDPHandle handle, int32_t channel, int32_t *status)
Gets the current of a specific PDP channel.
void HAL_CleanPDP(HAL_PDPHandle handle)
Cleans a PDP module.
void HAL_ResetPDPTotalEnergy(HAL_PDPHandle handle, int32_t *status)
Resets the PDP accumulated energy.
HAL_Bool HAL_CheckPDPChannel(int32_t channel)
Checks if a PDP channel is valid.