WPILibC++  2020.3.2
RelayData.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 #ifdef __cplusplus
14 extern "C" {
15 #endif
16 
17 void HALSIM_ResetRelayData(int32_t index);
18 int32_t HALSIM_RegisterRelayInitializedForwardCallback(
19  int32_t index, HAL_NotifyCallback callback, void* param,
20  HAL_Bool initialNotify);
21 void HALSIM_CancelRelayInitializedForwardCallback(int32_t index, int32_t uid);
22 HAL_Bool HALSIM_GetRelayInitializedForward(int32_t index);
23 void HALSIM_SetRelayInitializedForward(int32_t index,
24  HAL_Bool initializedForward);
25 
26 int32_t HALSIM_RegisterRelayInitializedReverseCallback(
27  int32_t index, HAL_NotifyCallback callback, void* param,
28  HAL_Bool initialNotify);
29 void HALSIM_CancelRelayInitializedReverseCallback(int32_t index, int32_t uid);
30 HAL_Bool HALSIM_GetRelayInitializedReverse(int32_t index);
31 void HALSIM_SetRelayInitializedReverse(int32_t index,
32  HAL_Bool initializedReverse);
33 
34 int32_t HALSIM_RegisterRelayForwardCallback(int32_t index,
35  HAL_NotifyCallback callback,
36  void* param,
37  HAL_Bool initialNotify);
38 void HALSIM_CancelRelayForwardCallback(int32_t index, int32_t uid);
39 HAL_Bool HALSIM_GetRelayForward(int32_t index);
40 void HALSIM_SetRelayForward(int32_t index, HAL_Bool forward);
41 
42 int32_t HALSIM_RegisterRelayReverseCallback(int32_t index,
43  HAL_NotifyCallback callback,
44  void* param,
45  HAL_Bool initialNotify);
46 void HALSIM_CancelRelayReverseCallback(int32_t index, int32_t uid);
47 HAL_Bool HALSIM_GetRelayReverse(int32_t index);
48 void HALSIM_SetRelayReverse(int32_t index, HAL_Bool reverse);
49 
50 void HALSIM_RegisterRelayAllCallbacks(int32_t index,
51  HAL_NotifyCallback callback, void* param,
52  HAL_Bool initialNotify);
53 
54 #ifdef __cplusplus
55 } // extern "C"
56 #endif