WPILibC++  2018.4.1-20180928014753-1210-gac7dfa5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
AnalogTriggerData.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 enum HALSIM_AnalogTriggerMode : int32_t {
16  HALSIM_AnalogTriggerUnassigned,
17  HALSIM_AnalogTriggerFiltered,
18  HALSIM_AnalogTriggerAveraged
19 };
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
25 void HALSIM_ResetAnalogTriggerData(int32_t index);
26 int32_t HALSIM_RegisterAnalogTriggerInitializedCallback(
27  int32_t index, HAL_NotifyCallback callback, void* param,
28  HAL_Bool initialNotify);
29 void HALSIM_CancelAnalogTriggerInitializedCallback(int32_t index, int32_t uid);
30 HAL_Bool HALSIM_GetAnalogTriggerInitialized(int32_t index);
31 void HALSIM_SetAnalogTriggerInitialized(int32_t index, HAL_Bool initialized);
32 
33 int32_t HALSIM_RegisterAnalogTriggerTriggerLowerBoundCallback(
34  int32_t index, HAL_NotifyCallback callback, void* param,
35  HAL_Bool initialNotify);
36 void HALSIM_CancelAnalogTriggerTriggerLowerBoundCallback(int32_t index,
37  int32_t uid);
38 double HALSIM_GetAnalogTriggerTriggerLowerBound(int32_t index);
39 void HALSIM_SetAnalogTriggerTriggerLowerBound(int32_t index,
40  double triggerLowerBound);
41 
42 int32_t HALSIM_RegisterAnalogTriggerTriggerUpperBoundCallback(
43  int32_t index, HAL_NotifyCallback callback, void* param,
44  HAL_Bool initialNotify);
45 void HALSIM_CancelAnalogTriggerTriggerUpperBoundCallback(int32_t index,
46  int32_t uid);
47 double HALSIM_GetAnalogTriggerTriggerUpperBound(int32_t index);
48 void HALSIM_SetAnalogTriggerTriggerUpperBound(int32_t index,
49  double triggerUpperBound);
50 
51 int32_t HALSIM_RegisterAnalogTriggerTriggerModeCallback(
52  int32_t index, HAL_NotifyCallback callback, void* param,
53  HAL_Bool initialNotify);
54 void HALSIM_CancelAnalogTriggerTriggerModeCallback(int32_t index, int32_t uid);
55 HALSIM_AnalogTriggerMode HALSIM_GetAnalogTriggerTriggerMode(int32_t index);
56 void HALSIM_SetAnalogTriggerTriggerMode(int32_t index,
57  HALSIM_AnalogTriggerMode triggerMode);
58 
59 void HALSIM_RegisterAnalogTriggerAllCallbacks(int32_t index,
60  HAL_NotifyCallback callback,
61  void* param,
62  HAL_Bool initialNotify);
63 
64 #ifdef __cplusplus
65 } // extern "C"
66 #endif
67 
68 #endif