WPILibC++  2020.3.2
AccelerometerData.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/Accelerometer.h"
12 #include "hal/Types.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 void HALSIM_ResetAccelerometerData(int32_t index);
19 int32_t HALSIM_RegisterAccelerometerActiveCallback(int32_t index,
20  HAL_NotifyCallback callback,
21  void* param,
22  HAL_Bool initialNotify);
23 void HALSIM_CancelAccelerometerActiveCallback(int32_t index, int32_t uid);
24 HAL_Bool HALSIM_GetAccelerometerActive(int32_t index);
25 void HALSIM_SetAccelerometerActive(int32_t index, HAL_Bool active);
26 
27 int32_t HALSIM_RegisterAccelerometerRangeCallback(int32_t index,
28  HAL_NotifyCallback callback,
29  void* param,
30  HAL_Bool initialNotify);
31 void HALSIM_CancelAccelerometerRangeCallback(int32_t index, int32_t uid);
32 HAL_AccelerometerRange HALSIM_GetAccelerometerRange(int32_t index);
33 void HALSIM_SetAccelerometerRange(int32_t index, HAL_AccelerometerRange range);
34 
35 int32_t HALSIM_RegisterAccelerometerXCallback(int32_t index,
36  HAL_NotifyCallback callback,
37  void* param,
38  HAL_Bool initialNotify);
39 void HALSIM_CancelAccelerometerXCallback(int32_t index, int32_t uid);
40 double HALSIM_GetAccelerometerX(int32_t index);
41 void HALSIM_SetAccelerometerX(int32_t index, double x);
42 
43 int32_t HALSIM_RegisterAccelerometerYCallback(int32_t index,
44  HAL_NotifyCallback callback,
45  void* param,
46  HAL_Bool initialNotify);
47 void HALSIM_CancelAccelerometerYCallback(int32_t index, int32_t uid);
48 double HALSIM_GetAccelerometerY(int32_t index);
49 void HALSIM_SetAccelerometerY(int32_t index, double y);
50 
51 int32_t HALSIM_RegisterAccelerometerZCallback(int32_t index,
52  HAL_NotifyCallback callback,
53  void* param,
54  HAL_Bool initialNotify);
55 void HALSIM_CancelAccelerometerZCallback(int32_t index, int32_t uid);
56 double HALSIM_GetAccelerometerZ(int32_t index);
57 void HALSIM_SetAccelerometerZ(int32_t index, double z);
58 
59 void HALSIM_RegisterAccelerometerAllCallbacks(int32_t index,
60  HAL_NotifyCallback callback,
61  void* param,
62  HAL_Bool initialNotify);
63 
64 #ifdef __cplusplus
65 } // extern "C"
66 #endif