Now you can download a copy of these docs so you can use them offline! Download now
Compressor.h
1 /*----------------------------------------------------------------------------*/
2 /* Copyright (c) FIRST 2008. 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 $(WIND_BASE)/WPILib. */
5 /*----------------------------------------------------------------------------*/
6 
7 #ifndef COMPRESSOR_H_
8 #define COMPRESSOR_H_
9 
10 #define COMPRESSOR_PRIORITY 90
11 
12 #include "SensorBase.h"
13 #include "Relay.h"
14 #include "Task.h"
15 #include "LiveWindow/LiveWindowSendable.h"
16 
17 class DigitalInput;
18 
27 {
28 public:
29  Compressor(uint32_t pressureSwitchChannel, uint32_t compressorRelayChannel);
30  Compressor(uint8_t pressureSwitchModuleNumber, uint32_t pressureSwitchChannel,
31  uint8_t compresssorRelayModuleNumber, uint32_t compressorRelayChannel);
32  ~Compressor();
33 
34  void Start();
35  void Stop();
36  bool Enabled();
37  uint32_t GetPressureSwitchValue();
38  void SetRelayValue(Relay::Value relayValue);
39 
40  void UpdateTable();
41  void StartLiveWindowMode();
42  void StopLiveWindowMode();
43  std::string GetSmartDashboardType();
44  void InitTable(ITable *subTable);
45  ITable * GetTable();
46 
47 private:
48  void InitCompressor(uint8_t pressureSwitchModuleNumber, uint32_t pressureSwitchChannel,
49  uint8_t compresssorRelayModuleNumber, uint32_t compressorRelayChannel);
50 
51  DigitalInput *m_pressureSwitch;
52  Relay *m_relay;
53  bool m_enabled;
54  Task m_task;
55 
56  ITable *m_table;
57 };
58 
59 #endif
60 
std::string GetSmartDashboardType()
Definition: Compressor.cpp:183
ITable * GetTable()
Definition: Compressor.cpp:192
void SetRelayValue(Relay::Value relayValue)
Definition: Compressor.cpp:121
Definition: ITable.h:26
void StopLiveWindowMode()
Definition: Compressor.cpp:179
void StartLiveWindowMode()
Definition: Compressor.cpp:175
void UpdateTable()
Definition: Compressor.cpp:168
Definition: Relay.h:26
void Stop()
Definition: Compressor.cpp:151
void InitTable(ITable *subTable)
Definition: Compressor.cpp:187
Definition: Task.h:17
bool Enabled()
Definition: Compressor.cpp:163
void Start()
Definition: Compressor.cpp:142
uint32_t GetPressureSwitchValue()
Definition: Compressor.cpp:132
Compressor(uint32_t pressureSwitchChannel, uint32_t compressorRelayChannel)
Definition: Compressor.cpp:96

Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by doxygen 1.8.6