WPILibC++  2019.2.1-1-g453a904
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
DIOData.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/Types.h"
14 
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18 
19 void HALSIM_ResetDIOData(int32_t index);
20 int32_t HALSIM_RegisterDIOInitializedCallback(int32_t index,
21  HAL_NotifyCallback callback,
22  void* param,
23  HAL_Bool initialNotify);
24 void HALSIM_CancelDIOInitializedCallback(int32_t index, int32_t uid);
25 HAL_Bool HALSIM_GetDIOInitialized(int32_t index);
26 void HALSIM_SetDIOInitialized(int32_t index, HAL_Bool initialized);
27 
28 int32_t HALSIM_RegisterDIOValueCallback(int32_t index,
29  HAL_NotifyCallback callback,
30  void* param, HAL_Bool initialNotify);
31 void HALSIM_CancelDIOValueCallback(int32_t index, int32_t uid);
32 HAL_Bool HALSIM_GetDIOValue(int32_t index);
33 void HALSIM_SetDIOValue(int32_t index, HAL_Bool value);
34 
35 int32_t HALSIM_RegisterDIOPulseLengthCallback(int32_t index,
36  HAL_NotifyCallback callback,
37  void* param,
38  HAL_Bool initialNotify);
39 void HALSIM_CancelDIOPulseLengthCallback(int32_t index, int32_t uid);
40 double HALSIM_GetDIOPulseLength(int32_t index);
41 void HALSIM_SetDIOPulseLength(int32_t index, double pulseLength);
42 
43 int32_t HALSIM_RegisterDIOIsInputCallback(int32_t index,
44  HAL_NotifyCallback callback,
45  void* param, HAL_Bool initialNotify);
46 void HALSIM_CancelDIOIsInputCallback(int32_t index, int32_t uid);
47 HAL_Bool HALSIM_GetDIOIsInput(int32_t index);
48 void HALSIM_SetDIOIsInput(int32_t index, HAL_Bool isInput);
49 
50 int32_t HALSIM_RegisterDIOFilterIndexCallback(int32_t index,
51  HAL_NotifyCallback callback,
52  void* param,
53  HAL_Bool initialNotify);
54 void HALSIM_CancelDIOFilterIndexCallback(int32_t index, int32_t uid);
55 int32_t HALSIM_GetDIOFilterIndex(int32_t index);
56 void HALSIM_SetDIOFilterIndex(int32_t index, int32_t filterIndex);
57 
58 void HALSIM_RegisterDIOAllCallbacks(int32_t index, HAL_NotifyCallback callback,
59  void* param, HAL_Bool initialNotify);
60 
61 #ifdef __cplusplus
62 } // extern "C"
63 #endif
64 
65 #endif