Class to control a simulated relay.
More...
#include <frc/simulation/RelaySim.h>
Class to control a simulated relay.
◆ RelaySim() [1/2]
frc::sim::RelaySim::RelaySim |
( |
const Relay & |
relay | ) |
|
|
explicit |
Constructs from a Relay object.
- Parameters
-
◆ RelaySim() [2/2]
frc::sim::RelaySim::RelaySim |
( |
int |
channel | ) |
|
|
explicit |
Constructs from a relay channel number.
- Parameters
-
◆ GetForward()
bool frc::sim::RelaySim::GetForward |
( |
| ) |
const |
Check whether the forward direction is active.
- Returns
- true if active
◆ GetInitializedForward()
bool frc::sim::RelaySim::GetInitializedForward |
( |
| ) |
const |
Check whether the forward direction has been initialized.
- Returns
- true if initialized
◆ GetInitializedReverse()
bool frc::sim::RelaySim::GetInitializedReverse |
( |
| ) |
const |
Check whether the reverse direction has been initialized.
- Returns
- true if initialized
◆ GetReverse()
bool frc::sim::RelaySim::GetReverse |
( |
| ) |
const |
Check whether the reverse direction is active.
- Returns
- true if active
◆ RegisterForwardCallback()
Register a callback to be run when the forward direction changes state.
- Parameters
-
callback | the callback |
initialNotify | whether to run the callback with the initial state |
- Returns
- the CallbackStore object associated with this callback
◆ RegisterInitializedForwardCallback()
std::unique_ptr< CallbackStore > frc::sim::RelaySim::RegisterInitializedForwardCallback |
( |
NotifyCallback |
callback, |
|
|
bool |
initialNotify |
|
) |
| |
Register a callback to be run when the forward direction is initialized.
- Parameters
-
callback | the callback |
initialNotify | whether to run the callback with the initial state |
- Returns
- the CallbackStore object associated with this callback
◆ RegisterInitializedReverseCallback()
std::unique_ptr< CallbackStore > frc::sim::RelaySim::RegisterInitializedReverseCallback |
( |
NotifyCallback |
callback, |
|
|
bool |
initialNotify |
|
) |
| |
Register a callback to be run when the reverse direction is initialized.
- Parameters
-
callback | the callback |
initialNotify | whether to run the callback with the initial state |
- Returns
- the CallbackStore object associated with this callback
◆ RegisterReverseCallback()
Register a callback to be run when the reverse direction changes state.
- Parameters
-
callback | the callback |
initialNotify | whether to run the callback with the initial state |
- Returns
- the CallbackStore object associated with this callback
◆ ResetData()
void frc::sim::RelaySim::ResetData |
( |
| ) |
|
Reset all simulation data.
◆ SetForward()
void frc::sim::RelaySim::SetForward |
( |
bool |
forward | ) |
|
Set whether the forward direction is active.
- Parameters
-
forward | true to make active |
◆ SetInitializedForward()
void frc::sim::RelaySim::SetInitializedForward |
( |
bool |
initializedForward | ) |
|
Define whether the forward direction has been initialized.
- Parameters
-
initializedForward | whether this object is initialized |
◆ SetInitializedReverse()
void frc::sim::RelaySim::SetInitializedReverse |
( |
bool |
initializedReverse | ) |
|
Define whether the reverse direction has been initialized.
- Parameters
-
initializedReverse | whether this object is initialized |
◆ SetReverse()
void frc::sim::RelaySim::SetReverse |
( |
bool |
reverse | ) |
|
Set whether the reverse direction is active.
- Parameters
-
reverse | true to make active |
The documentation for this class was generated from the following file: