Home
Roadside
Carputer
geoHist
software
FRC
Blog
Now you can download a copy of these docs so you can use them offline!
Download now
Main Page
Related Pages
Classes
Files
File List
Relay.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 RELAY_H_
8
#define RELAY_H_
9
10
#include "SensorBase.h"
11
#include "tables/ITableListener.h"
12
#include "LiveWindow/LiveWindowSendable.h"
13
#include "tables/ITable.h"
14
15
class
DigitalModule
;
16
26
class
Relay
:
public
SensorBase
,
public
ITableListener
,
public
LiveWindowSendable
{
27
public
:
28
typedef
enum
{kOff, kOn, kForward, kReverse} Value;
29
typedef
enum
{kBothDirections, kForwardOnly, kReverseOnly} Direction;
30
31
Relay
(uint32_t channel, Direction direction = kBothDirections);
32
Relay
(uint8_t moduleNumber, uint32_t channel, Direction direction = kBothDirections);
33
virtual
~Relay
();
34
35
void
Set
(Value value);
36
Value
Get
();
37
38
void
ValueChanged
(
ITable
* source,
const
std::string& key,
EntryValue
value,
bool
isNew);
39
void
UpdateTable
();
40
void
StartLiveWindowMode
();
41
void
StopLiveWindowMode
();
42
std::string
GetSmartDashboardType
();
43
void
InitTable
(
ITable
*subTable);
44
ITable
*
GetTable
();
45
46
ITable
*m_table;
47
48
private
:
49
void
InitRelay(uint8_t moduleNumber);
50
51
uint32_t m_channel;
52
Direction m_direction;
53
DigitalModule
*m_module;
54
};
55
56
#endif
Relay::Get
Value Get()
Definition:
Relay.cpp:199
Relay::GetSmartDashboardType
std::string GetSmartDashboardType()
Definition:
Relay.cpp:259
Relay::~Relay
virtual ~Relay()
Definition:
Relay.cpp:102
ITable
Definition:
ITable.h:26
Relay::StartLiveWindowMode
void StartLiveWindowMode()
Definition:
Relay.cpp:247
LiveWindowSendable
Definition:
LiveWindowSendable.h:17
Relay::StopLiveWindowMode
void StopLiveWindowMode()
Definition:
Relay.cpp:253
Relay::Relay
Relay(uint32_t channel, Direction direction=kBothDirections)
Definition:
Relay.cpp:91
Relay::UpdateTable
void UpdateTable()
Definition:
Relay.cpp:230
Relay
Definition:
Relay.h:26
Relay::InitTable
void InitTable(ITable *subTable)
Definition:
Relay.cpp:263
Relay::ValueChanged
void ValueChanged(ITable *source, const std::string &key, EntryValue value, bool isNew)
Definition:
Relay.cpp:223
Relay::GetTable
ITable * GetTable()
Definition:
Relay.cpp:268
Relay::Set
void Set(Value value)
Definition:
Relay.cpp:131
DigitalModule
Definition:
DigitalModule.h:17
SensorBase
Definition:
SensorBase.h:20
EntryValue
Definition:
ITable.h:13
ITableListener
Definition:
ITableListener.h:26
Generated on Sat Apr 26 2014 12:26:45 for WPILibC++ by
1.8.6
© 2006-2009 Dustin Spicuzza. All rights reserved.
Powered by Onnac
I do not condone or encourage graffiti. Please paint responsibly.