Compressor Class Reference
#include <Compressor.h>


Public Member Functions | |
| Compressor (UINT32 pressureSwitchChannel, UINT32 compressorRelayChannel) | |
| Compressor (UINT8 pressureSwitchModuleNumber, UINT32 pressureSwitchChannel, UINT8 compresssorRelayModuleNumber, UINT32 compressorRelayChannel) | |
| ~Compressor () | |
| void | Start () |
| void | Stop () |
| bool | Enabled () |
| UINT32 | GetPressureSwitchValue () |
| void | SetRelayValue (Relay::Value relayValue) |
Detailed Description
Compressor object. The Compressor object is designed to handle the operation of the compressor, pressure sensor and relay for a FIRST robot pneumatics system. The Compressor object starts a task which runs in the backround and periodically polls the pressure sensor and operates the relay that controls the compressor.
Definition at line 25 of file Compressor.h.
Constructor & Destructor Documentation
| Compressor::Compressor | ( | UINT32 | pressureSwitchChannel, | |
| UINT32 | compressorRelayChannel | |||
| ) |
Compressor constructor. Given a relay channel and pressure switch channel (both in the default digital module), initialize the Compressor object.
You MUST start the compressor by calling the Start() method.
- Parameters:
-
pressureSwitchChannel The GPIO channel that the pressure switch is attached to. compressorRelayChannel The relay channel that the compressor relay is attached to.
Definition at line 92 of file Compressor.cpp.
| Compressor::Compressor | ( | UINT8 | pressureSwitchModuleNumber, | |
| UINT32 | pressureSwitchChannel, | |||
| UINT8 | compresssorRelayModuleNumber, | |||
| UINT32 | compressorRelayChannel | |||
| ) |
Compressor constructor. Given a fully specified relay channel and pressure switch channel, initialize the Compressor object.
You MUST start the compressor by calling the Start() method.
- Parameters:
-
pressureSwitchModuleNumber The digital module that the pressure switch is attached to. pressureSwitchChannel The GPIO channel that the pressure switch is attached to. compresssorRelayModuleNumber The digital module that the compressor relay is attached to. compressorRelayChannel The relay channel that the compressor relay is attached to.
Definition at line 70 of file Compressor.cpp.
| Compressor::~Compressor | ( | ) |
Delete the Compressor object. Delete the allocated resources for the compressor and kill the compressor task that is polling the pressure switch.
Definition at line 106 of file Compressor.cpp.
Member Function Documentation
| bool Compressor::Enabled | ( | ) |
Get the state of the enabled flag. Return the state of the enabled flag for the compressor and pressure switch combination.
- Returns:
- The state of the compressor thread's enable flag.
Definition at line 159 of file Compressor.cpp.
| UINT32 Compressor::GetPressureSwitchValue | ( | ) |
Get the pressure switch value. Read the pressure switch digital input.
- Returns:
- The current state of the pressure switch.
Definition at line 128 of file Compressor.cpp.
| void Compressor::SetRelayValue | ( | Relay::Value | relayValue | ) |
Operate the relay for the compressor. Change the value of the relay output that is connected to the compressor motor. This is only intended to be called by the internal polling thread.
Definition at line 117 of file Compressor.cpp.
| void Compressor::Start | ( | ) |
Start the compressor. This method will allow the polling loop to actually operate the compressor. The is stopped by default and won't operate until starting it.
Definition at line 138 of file Compressor.cpp.
| void Compressor::Stop | ( | ) |
Stop the compressor. This method will stop the compressor from turning on.
Definition at line 147 of file Compressor.cpp.
The documentation for this class was generated from the following files:
Generated on Thu Jan 12 2012 22:35:29 for WPILibC++ by
1.7.1