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