Now you can download a copy of these docs so you can use them offline! Download now
DigitalOutput.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 DIGITAL_OUTPUT_H_
8 #define DIGITAL_OUTPUT_H_
9 
10 #include "DigitalSource.h"
11 #include "LiveWindow/LiveWindowSendable.h"
12 #include "tables/ITableListener.h"
13 
14 class DigitalModule;
15 
22 {
23 public:
24  explicit DigitalOutput(uint32_t channel);
25  DigitalOutput(uint8_t moduleNumber, uint32_t channel);
26  virtual ~DigitalOutput();
27  void Set(uint32_t value);
28  uint32_t GetChannel();
29  void Pulse(float length);
30  bool IsPulsing();
31  void SetPWMRate(float rate);
32  void EnablePWM(float initialDutyCycle);
33  void DisablePWM();
34  void UpdateDutyCycle(float dutyCycle);
35 
36  // Digital Source Interface
37  virtual uint32_t GetChannelForRouting();
38  virtual uint32_t GetModuleForRouting();
39  virtual bool GetAnalogTriggerForRouting();
40  virtual void RequestInterrupts(tInterruptHandler handler, void *param);
41  virtual void RequestInterrupts();
42 
43  void SetUpSourceEdge(bool risingEdge, bool fallingEdge);
44 
45  virtual void ValueChanged(ITable* source, const std::string& key, EntryValue value, bool isNew);
46  void UpdateTable();
47  void StartLiveWindowMode();
48  void StopLiveWindowMode();
49  std::string GetSmartDashboardType();
50  void InitTable(ITable *subTable);
51  ITable * GetTable();
52 
53 private:
54  void InitDigitalOutput(uint8_t moduleNumber, uint32_t channel);
55 
56  uint32_t m_channel;
57  uint32_t m_pwmGenerator;
58  DigitalModule *m_module;
59 
60  ITable *m_table;
61 };
62 
63 #endif
virtual void ValueChanged(ITable *source, const std::string &key, EntryValue value, bool isNew)
virtual void RequestInterrupts()
Definition: ITable.h:26
ITable * GetTable()
void StartLiveWindowMode()
void EnablePWM(float initialDutyCycle)
void InitTable(ITable *subTable)
virtual uint32_t GetModuleForRouting()
std::string GetSmartDashboardType()
virtual ~DigitalOutput()
void Pulse(float length)
DigitalOutput(uint32_t channel)
void UpdateDutyCycle(float dutyCycle)
void StopLiveWindowMode()
virtual bool GetAnalogTriggerForRouting()
virtual uint32_t GetChannelForRouting()
void SetPWMRate(float rate)
void Set(uint32_t value)
Definition: ITable.h:13
uint32_t GetChannel()

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