WPILib  2014.0
WPIRoboticsLibraryforFRC
 All Classes Functions Variables Pages
Solenoid.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 SOLENOID_H_
8 #define SOLENOID_H_
9 
10 #include "SolenoidBase.h"
11 #include "LiveWindow/LiveWindowSendable.h"
12 #include "tables/ITableListener.h"
13 
14 
21 class Solenoid : public SolenoidBase, public LiveWindowSendable, public ITableListener {
22 public:
23  explicit Solenoid(uint32_t channel);
24  Solenoid(uint8_t moduleNumber, uint32_t channel);
25  virtual ~Solenoid();
26  virtual void Set(bool on);
27  virtual bool Get();
28 
29 void ValueChanged(ITable* source, const std::string& key, EntryValue value, bool isNew);
30  void UpdateTable();
31  void StartLiveWindowMode();
32  void StopLiveWindowMode();
33  std::string GetSmartDashboardType();
34  void InitTable(ITable *subTable);
35  ITable * GetTable();
36 
37 
38 private:
39  void InitSolenoid();
40 
41  uint32_t m_channel;
42 
43  ITable *m_table;
44 };
45 
46 #endif
virtual ~Solenoid()
Definition: Solenoid.cpp:72
virtual bool Get()
Definition: Solenoid.cpp:99
virtual void Set(bool on)
Definition: Solenoid.cpp:85
Solenoid(uint32_t channel)
Definition: Solenoid.cpp:49
Definition: SolenoidBase.h:19
Definition: Solenoid.h:21