WPILibC++  2019.1.1-beta-2-17-g6f0c185
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
AnalogInData.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2017-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 #ifndef __FRC_ROBORIO__
11 
12 #include "NotifyListener.h"
13 #include "hal/Types.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 void HALSIM_ResetAnalogInData(int32_t index);
20 int32_t HALSIM_RegisterAnalogInInitializedCallback(int32_t index,
21  HAL_NotifyCallback callback,
22  void* param,
23  HAL_Bool initialNotify);
24 void HALSIM_CancelAnalogInInitializedCallback(int32_t index, int32_t uid);
25 HAL_Bool HALSIM_GetAnalogInInitialized(int32_t index);
26 void HALSIM_SetAnalogInInitialized(int32_t index, HAL_Bool initialized);
27 
28 int32_t HALSIM_RegisterAnalogInAverageBitsCallback(int32_t index,
29  HAL_NotifyCallback callback,
30  void* param,
31  HAL_Bool initialNotify);
32 void HALSIM_CancelAnalogInAverageBitsCallback(int32_t index, int32_t uid);
33 int32_t HALSIM_GetAnalogInAverageBits(int32_t index);
34 void HALSIM_SetAnalogInAverageBits(int32_t index, int32_t averageBits);
35 
36 int32_t HALSIM_RegisterAnalogInOversampleBitsCallback(
37  int32_t index, HAL_NotifyCallback callback, void* param,
38  HAL_Bool initialNotify);
39 void HALSIM_CancelAnalogInOversampleBitsCallback(int32_t index, int32_t uid);
40 int32_t HALSIM_GetAnalogInOversampleBits(int32_t index);
41 void HALSIM_SetAnalogInOversampleBits(int32_t index, int32_t oversampleBits);
42 
43 int32_t HALSIM_RegisterAnalogInVoltageCallback(int32_t index,
44  HAL_NotifyCallback callback,
45  void* param,
46  HAL_Bool initialNotify);
47 void HALSIM_CancelAnalogInVoltageCallback(int32_t index, int32_t uid);
48 double HALSIM_GetAnalogInVoltage(int32_t index);
49 void HALSIM_SetAnalogInVoltage(int32_t index, double voltage);
50 
51 int32_t HALSIM_RegisterAnalogInAccumulatorInitializedCallback(
52  int32_t index, HAL_NotifyCallback callback, void* param,
53  HAL_Bool initialNotify);
54 void HALSIM_CancelAnalogInAccumulatorInitializedCallback(int32_t index,
55  int32_t uid);
56 HAL_Bool HALSIM_GetAnalogInAccumulatorInitialized(int32_t index);
57 void HALSIM_SetAnalogInAccumulatorInitialized(int32_t index,
58  HAL_Bool accumulatorInitialized);
59 
60 int32_t HALSIM_RegisterAnalogInAccumulatorValueCallback(
61  int32_t index, HAL_NotifyCallback callback, void* param,
62  HAL_Bool initialNotify);
63 void HALSIM_CancelAnalogInAccumulatorValueCallback(int32_t index, int32_t uid);
64 int64_t HALSIM_GetAnalogInAccumulatorValue(int32_t index);
65 void HALSIM_SetAnalogInAccumulatorValue(int32_t index,
66  int64_t accumulatorValue);
67 
68 int32_t HALSIM_RegisterAnalogInAccumulatorCountCallback(
69  int32_t index, HAL_NotifyCallback callback, void* param,
70  HAL_Bool initialNotify);
71 void HALSIM_CancelAnalogInAccumulatorCountCallback(int32_t index, int32_t uid);
72 int64_t HALSIM_GetAnalogInAccumulatorCount(int32_t index);
73 void HALSIM_SetAnalogInAccumulatorCount(int32_t index,
74  int64_t accumulatorCount);
75 
76 int32_t HALSIM_RegisterAnalogInAccumulatorCenterCallback(
77  int32_t index, HAL_NotifyCallback callback, void* param,
78  HAL_Bool initialNotify);
79 void HALSIM_CancelAnalogInAccumulatorCenterCallback(int32_t index, int32_t uid);
80 int32_t HALSIM_GetAnalogInAccumulatorCenter(int32_t index);
81 void HALSIM_SetAnalogInAccumulatorCenter(int32_t index,
82  int32_t accumulatorCenter);
83 
84 int32_t HALSIM_RegisterAnalogInAccumulatorDeadbandCallback(
85  int32_t index, HAL_NotifyCallback callback, void* param,
86  HAL_Bool initialNotify);
87 void HALSIM_CancelAnalogInAccumulatorDeadbandCallback(int32_t index,
88  int32_t uid);
89 int32_t HALSIM_GetAnalogInAccumulatorDeadband(int32_t index);
90 void HALSIM_SetAnalogInAccumulatorDeadband(int32_t index,
91  int32_t accumulatorDeadband);
92 
93 void HALSIM_RegisterAnalogInAllCallbacks(int32_t index,
94  HAL_NotifyCallback callback,
95  void* param, HAL_Bool initialNotify);
96 
97 #ifdef __cplusplus
98 } // extern "C"
99 #endif
100 
101 #endif