WPILibC++  2018.4.1-20180729040223-1137-g011f0ff
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
Solenoid.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) 2016-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 #include <stdint.h>
11 
12 #include "hal/Types.h"
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
24 HAL_SolenoidHandle HAL_InitializeSolenoidPort(HAL_PortHandle portHandle,
25  int32_t* status);
26 
32 void HAL_FreeSolenoidPort(HAL_SolenoidHandle solenoidPortHandle);
33 
40 HAL_Bool HAL_CheckSolenoidModule(int32_t module);
41 
48 HAL_Bool HAL_CheckSolenoidChannel(int32_t channel);
49 
56 HAL_Bool HAL_GetSolenoid(HAL_SolenoidHandle solenoidPortHandle,
57  int32_t* status);
58 
65 int32_t HAL_GetAllSolenoids(int32_t module, int32_t* status);
66 
73 void HAL_SetSolenoid(HAL_SolenoidHandle solenoidPortHandle, HAL_Bool value,
74  int32_t* status);
75 
82 void HAL_SetAllSolenoids(int32_t module, int32_t state, int32_t* status);
83 
90 int32_t HAL_GetPCMSolenoidBlackList(int32_t module, int32_t* status);
91 
98 HAL_Bool HAL_GetPCMSolenoidVoltageStickyFault(int32_t module, int32_t* status);
99 
106 HAL_Bool HAL_GetPCMSolenoidVoltageFault(int32_t module, int32_t* status);
107 
113 void HAL_ClearAllPCMStickyFaults(int32_t module, int32_t* status);
114 
121 void HAL_SetOneShotDuration(HAL_SolenoidHandle solenoidPortHandle,
122  int32_t durMS, int32_t* status);
123 
131 void HAL_FireOneShot(HAL_SolenoidHandle solenoidPortHandle, int32_t* status);
132 #ifdef __cplusplus
133 } // extern "C"
134 #endif