FlightGear next
|
Base class for clocked flip flop implementation. More...
Inherits FGXMLAutopilot::RSFlipFlopImplementation.
Inherited by FGXMLAutopilot::DFlipFlopImplementation, FGXMLAutopilot::JKFlipFlopImplementation, and FGXMLAutopilot::TFlipFlopImplementation.
Public Member Functions | |
ClockedFlipFlopImplementation (bool rIsDominant=true) | |
constructor for a ClockedFlipFlopImplementation | |
virtual bool | getState (double dt, DigitalComponent::InputMap input, bool &q) |
evaluates the output state from the input lines. | |
![]() | |
RSFlipFlopImplementation (bool rIsDominant=true) | |
![]() | |
virtual | ~FlipFlopImplementation () |
bool | configure (SGPropertyNode &prop_root, SGPropertyNode &cfg) |
configure this component from a property node. | |
virtual bool | isConfigProperty (const std::string &cfg_name) const |
Protected Member Functions | |
virtual bool | onRaisingEdge (DigitalComponent::InputMap input, bool &q)=0 |
pure virtual function to be implemented from the implementing class, gets called from the update method if the raising edge of the clock input was detected. | |
![]() | |
virtual bool | configure (SGPropertyNode &cfg_node, const std::string &cfg_name, SGPropertyNode &prop_root) |
configure this component from a property node. | |
Additional Inherited Members | |
![]() | |
bool | _rIsDominant |
Base class for clocked flip flop implementation.
A clocked flip flop computes it's output on the raising edge (false/true transition) of the clock input. If such a transition is detected, the onRaisingEdge method is called by this implementation. All clocked flip flops inherit from the RS flip flop and may be set or reset by the respective set/reset lines. Note that the RS implementation ignores the clock, The output is set immediately, regardless of the state of the clock input. The "clock" input is mandatory for clocked flip flops.
Definition at line 118 of file flipflop.cxx.
|
inline |
constructor for a ClockedFlipFlopImplementation
rIsDominant | boolean flag to signal if RESET shall be dominant (true) or SET shall be dominant (false) |
Definition at line 140 of file flipflop.cxx.
|
virtual |
evaluates the output state from the input lines.
This method basically waits for a raising edge and calls onRaisingEdge
dt | the elapsed time in seconds from since the last call |
input | a map of named input lines |
q | a reference to a boolean variable to receive the output state |
Reimplemented from FGXMLAutopilot::RSFlipFlopImplementation.
Reimplemented in FGXMLAutopilot::MonoFlopImplementation.
Definition at line 351 of file flipflop.cxx.
|
protectedpure virtual |
pure virtual function to be implemented from the implementing class, gets called from the update method if the raising edge of the clock input was detected.
input | a map of named input lines |
q | a reference to a boolean variable to receive the output state |
Implemented in FGXMLAutopilot::DFlipFlopImplementation, FGXMLAutopilot::JKFlipFlopImplementation, and FGXMLAutopilot::TFlipFlopImplementation.