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