WPILibC++  2020.3.2
PCMData.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_ResetPCMData(int32_t index);
18 int32_t HALSIM_RegisterPCMSolenoidInitializedCallback(
19  int32_t index, int32_t channel, HAL_NotifyCallback callback, void* param,
20  HAL_Bool initialNotify);
21 void HALSIM_CancelPCMSolenoidInitializedCallback(int32_t index, int32_t channel,
22  int32_t uid);
23 HAL_Bool HALSIM_GetPCMSolenoidInitialized(int32_t index, int32_t channel);
24 void HALSIM_SetPCMSolenoidInitialized(int32_t index, int32_t channel,
25  HAL_Bool solenoidInitialized);
26 
27 int32_t HALSIM_RegisterPCMSolenoidOutputCallback(int32_t index, int32_t channel,
28  HAL_NotifyCallback callback,
29  void* param,
30  HAL_Bool initialNotify);
31 void HALSIM_CancelPCMSolenoidOutputCallback(int32_t index, int32_t channel,
32  int32_t uid);
33 HAL_Bool HALSIM_GetPCMSolenoidOutput(int32_t index, int32_t channel);
34 void HALSIM_SetPCMSolenoidOutput(int32_t index, int32_t channel,
35  HAL_Bool solenoidOutput);
36 
37 int32_t HALSIM_RegisterPCMCompressorInitializedCallback(
38  int32_t index, HAL_NotifyCallback callback, void* param,
39  HAL_Bool initialNotify);
40 void HALSIM_CancelPCMCompressorInitializedCallback(int32_t index, int32_t uid);
41 HAL_Bool HALSIM_GetPCMCompressorInitialized(int32_t index);
42 void HALSIM_SetPCMCompressorInitialized(int32_t index,
43  HAL_Bool compressorInitialized);
44 
45 int32_t HALSIM_RegisterPCMCompressorOnCallback(int32_t index,
46  HAL_NotifyCallback callback,
47  void* param,
48  HAL_Bool initialNotify);
49 void HALSIM_CancelPCMCompressorOnCallback(int32_t index, int32_t uid);
50 HAL_Bool HALSIM_GetPCMCompressorOn(int32_t index);
51 void HALSIM_SetPCMCompressorOn(int32_t index, HAL_Bool compressorOn);
52 
53 int32_t HALSIM_RegisterPCMClosedLoopEnabledCallback(int32_t index,
54  HAL_NotifyCallback callback,
55  void* param,
56  HAL_Bool initialNotify);
57 void HALSIM_CancelPCMClosedLoopEnabledCallback(int32_t index, int32_t uid);
58 HAL_Bool HALSIM_GetPCMClosedLoopEnabled(int32_t index);
59 void HALSIM_SetPCMClosedLoopEnabled(int32_t index, HAL_Bool closedLoopEnabled);
60 
61 int32_t HALSIM_RegisterPCMPressureSwitchCallback(int32_t index,
62  HAL_NotifyCallback callback,
63  void* param,
64  HAL_Bool initialNotify);
65 void HALSIM_CancelPCMPressureSwitchCallback(int32_t index, int32_t uid);
66 HAL_Bool HALSIM_GetPCMPressureSwitch(int32_t index);
67 void HALSIM_SetPCMPressureSwitch(int32_t index, HAL_Bool pressureSwitch);
68 
69 int32_t HALSIM_RegisterPCMCompressorCurrentCallback(int32_t index,
70  HAL_NotifyCallback callback,
71  void* param,
72  HAL_Bool initialNotify);
73 void HALSIM_CancelPCMCompressorCurrentCallback(int32_t index, int32_t uid);
74 double HALSIM_GetPCMCompressorCurrent(int32_t index);
75 void HALSIM_SetPCMCompressorCurrent(int32_t index, double compressorCurrent);
76 
77 void HALSIM_GetPCMAllSolenoids(int32_t index, uint8_t* values);
78 void HALSIM_SetPCMAllSolenoids(int32_t index, uint8_t values);
79 
80 void HALSIM_RegisterPCMAllNonSolenoidCallbacks(int32_t index,
81  HAL_NotifyCallback callback,
82  void* param,
83  HAL_Bool initialNotify);
84 
85 void HALSIM_RegisterPCMAllSolenoidCallbacks(int32_t index, int32_t channel,
86  HAL_NotifyCallback callback,
87  void* param,
88  HAL_Bool initialNotify);
89 
90 #ifdef __cplusplus
91 } // extern "C"
92 #endif