WPILibC++  2018.4.1-20180921134745-1191-g456d3e1
 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 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
30 HAL_SolenoidHandle HAL_InitializeSolenoidPort(HAL_PortHandle portHandle,
31  int32_t* status);
32 
38 void HAL_FreeSolenoidPort(HAL_SolenoidHandle solenoidPortHandle);
39 
46 HAL_Bool HAL_CheckSolenoidModule(int32_t module);
47 
54 HAL_Bool HAL_CheckSolenoidChannel(int32_t channel);
55 
62 HAL_Bool HAL_GetSolenoid(HAL_SolenoidHandle solenoidPortHandle,
63  int32_t* status);
64 
71 int32_t HAL_GetAllSolenoids(int32_t module, int32_t* status);
72 
79 void HAL_SetSolenoid(HAL_SolenoidHandle solenoidPortHandle, HAL_Bool value,
80  int32_t* status);
81 
88 void HAL_SetAllSolenoids(int32_t module, int32_t state, int32_t* status);
89 
96 int32_t HAL_GetPCMSolenoidBlackList(int32_t module, int32_t* status);
97 
104 HAL_Bool HAL_GetPCMSolenoidVoltageStickyFault(int32_t module, int32_t* status);
105 
112 HAL_Bool HAL_GetPCMSolenoidVoltageFault(int32_t module, int32_t* status);
113 
119 void HAL_ClearAllPCMStickyFaults(int32_t module, int32_t* status);
120 
127 void HAL_SetOneShotDuration(HAL_SolenoidHandle solenoidPortHandle,
128  int32_t durMS, int32_t* status);
129 
137 void HAL_FireOneShot(HAL_SolenoidHandle solenoidPortHandle, int32_t* status);
138 #ifdef __cplusplus
139 } // extern "C"
140 #endif
141 
HAL_Bool HAL_CheckSolenoidModule(int32_t module)
Checks if a solenoid module is in the valid range.
void HAL_SetOneShotDuration(HAL_SolenoidHandle solenoidPortHandle, int32_t durMS, int32_t *status)
Sets the one shot duration on a solenoid channel.
void HAL_SetAllSolenoids(int32_t module, int32_t state, int32_t *status)
Sets all channels on a specific module.
void HAL_SetSolenoid(HAL_SolenoidHandle solenoidPortHandle, HAL_Bool value, int32_t *status)
Sets a solenoid output value.
void HAL_FreeSolenoidPort(HAL_SolenoidHandle solenoidPortHandle)
Frees a solenoid port.
HAL_SolenoidHandle HAL_InitializeSolenoidPort(HAL_PortHandle portHandle, int32_t *status)
Initializes a solenoid port.
void HAL_FireOneShot(HAL_SolenoidHandle solenoidPortHandle, int32_t *status)
Fires a single pulse on a solenoid channel.
void HAL_ClearAllPCMStickyFaults(int32_t module, int32_t *status)
Clears all faults on a module.
int32_t HAL_GetPCMSolenoidBlackList(int32_t module, int32_t *status)
Gets the channels blacklisted from being enabled on a module.
HAL_Bool HAL_GetPCMSolenoidVoltageFault(int32_t module, int32_t *status)
Gets if a specific module has an over or under voltage fault.
int32_t HAL_GetAllSolenoids(int32_t module, int32_t *status)
Gets the status of all solenoids on a specific module.
HAL_Bool HAL_CheckSolenoidChannel(int32_t channel)
Checks if a solenoid channel is in the valid range.
HAL_Bool HAL_GetPCMSolenoidVoltageStickyFault(int32_t module, int32_t *status)
Gets if a specific module has an over or under voltage sticky fault.
HAL_Bool HAL_GetSolenoid(HAL_SolenoidHandle solenoidPortHandle, int32_t *status)
Gets the current solenoid output value.