WPILibC++  2020.3.2
PDPData.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2017-2019 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 "NotifyListener.h"
11 #include "hal/Types.h"
12 
13 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 void HALSIM_ResetPDPData(int32_t index);
18 int32_t HALSIM_RegisterPDPInitializedCallback(int32_t index,
19  HAL_NotifyCallback callback,
20  void* param,
21  HAL_Bool initialNotify);
22 void HALSIM_CancelPDPInitializedCallback(int32_t index, int32_t uid);
23 HAL_Bool HALSIM_GetPDPInitialized(int32_t index);
24 void HALSIM_SetPDPInitialized(int32_t index, HAL_Bool initialized);
25 
26 int32_t HALSIM_RegisterPDPTemperatureCallback(int32_t index,
27  HAL_NotifyCallback callback,
28  void* param,
29  HAL_Bool initialNotify);
30 void HALSIM_CancelPDPTemperatureCallback(int32_t index, int32_t uid);
31 double HALSIM_GetPDPTemperature(int32_t index);
32 void HALSIM_SetPDPTemperature(int32_t index, double temperature);
33 
34 int32_t HALSIM_RegisterPDPVoltageCallback(int32_t index,
35  HAL_NotifyCallback callback,
36  void* param, HAL_Bool initialNotify);
37 void HALSIM_CancelPDPVoltageCallback(int32_t index, int32_t uid);
38 double HALSIM_GetPDPVoltage(int32_t index);
39 void HALSIM_SetPDPVoltage(int32_t index, double voltage);
40 
41 int32_t HALSIM_RegisterPDPCurrentCallback(int32_t index, int32_t channel,
42  HAL_NotifyCallback callback,
43  void* param, HAL_Bool initialNotify);
44 void HALSIM_CancelPDPCurrentCallback(int32_t index, int32_t channel,
45  int32_t uid);
46 double HALSIM_GetPDPCurrent(int32_t index, int32_t channel);
47 void HALSIM_SetPDPCurrent(int32_t index, int32_t channel, double current);
48 
49 void HALSIM_GetPDPAllCurrents(int32_t index, double* currents);
50 void HALSIM_SetPDPAllCurrents(int32_t index, const double* currents);
51 
52 void HALSIM_RegisterPDPAllNonCurrentCallbacks(int32_t index, int32_t channel,
53  HAL_NotifyCallback callback,
54  void* param,
55  HAL_Bool initialNotify);
56 
57 #ifdef __cplusplus
58 } // extern "C"
59 #endif