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