WPILibC++  2018.4.1-20180729123227-1139-ga11fcb6
 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 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
24 HAL_PDPHandle HAL_InitializePDP(int32_t module, int32_t* status);
25 
31 void HAL_CleanPDP(HAL_PDPHandle handle);
32 
39 HAL_Bool HAL_CheckPDPChannel(int32_t channel);
40 
47 HAL_Bool HAL_CheckPDPModule(int32_t module);
48 
55 double HAL_GetPDPTemperature(HAL_PDPHandle handle, int32_t* status);
56 
63 double HAL_GetPDPVoltage(HAL_PDPHandle handle, int32_t* status);
64 
72 double HAL_GetPDPChannelCurrent(HAL_PDPHandle handle, int32_t channel,
73  int32_t* status);
74 
81 double HAL_GetPDPTotalCurrent(HAL_PDPHandle handle, int32_t* status);
82 
89 double HAL_GetPDPTotalPower(HAL_PDPHandle handle, int32_t* status);
90 
97 double HAL_GetPDPTotalEnergy(HAL_PDPHandle handle, int32_t* status);
98 
104 void HAL_ResetPDPTotalEnergy(HAL_PDPHandle handle, int32_t* status);
105 
111 void HAL_ClearPDPStickyFaults(HAL_PDPHandle handle, int32_t* status);
112 #ifdef __cplusplus
113 } // extern "C"
114 #endif