FlightGear next
FGXMLAutopilot::ClockedFlipFlopImplementation Class Referenceabstract

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.
 
- Public Member Functions inherited from FGXMLAutopilot::RSFlipFlopImplementation
 RSFlipFlopImplementation (bool rIsDominant=true)
 
- Public Member Functions inherited from FGXMLAutopilot::FlipFlopImplementation
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.
 
- Protected Member Functions inherited from FGXMLAutopilot::FlipFlopImplementation
virtual bool configure (SGPropertyNode &cfg_node, const std::string &cfg_name, SGPropertyNode &prop_root)
 configure this component from a property node.
 

Additional Inherited Members

- Protected Attributes inherited from FGXMLAutopilot::RSFlipFlopImplementation
bool _rIsDominant
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ClockedFlipFlopImplementation()

FGXMLAutopilot::ClockedFlipFlopImplementation::ClockedFlipFlopImplementation ( bool rIsDominant = true)
inline

constructor for a ClockedFlipFlopImplementation

Parameters
rIsDominantboolean flag to signal if RESET shall be dominant (true) or SET shall be dominant (false)

Definition at line 140 of file flipflop.cxx.

Member Function Documentation

◆ getState()

bool ClockedFlipFlopImplementation::getState ( double dt,
DigitalComponent::InputMap input,
bool & q )
virtual

evaluates the output state from the input lines.

This method basically waits for a raising edge and calls onRaisingEdge

Parameters
dtthe elapsed time in seconds from since the last call
inputa map of named input lines
qa reference to a boolean variable to receive the output state
Returns
true if the state has changed, false otherwise

Reimplemented from FGXMLAutopilot::RSFlipFlopImplementation.

Reimplemented in FGXMLAutopilot::MonoFlopImplementation.

Definition at line 351 of file flipflop.cxx.

◆ onRaisingEdge()

virtual bool FGXMLAutopilot::ClockedFlipFlopImplementation::onRaisingEdge ( DigitalComponent::InputMap input,
bool & q )
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.

Parameters
inputa map of named input lines
qa reference to a boolean variable to receive the output state
Returns
true if the state has changed, false otherwise

Implemented in FGXMLAutopilot::DFlipFlopImplementation, FGXMLAutopilot::JKFlipFlopImplementation, and FGXMLAutopilot::TFlipFlopImplementation.


The documentation for this class was generated from the following file: