FlightGear next
FGXMLAutopilot::DigitalComponent Class Reference

Base class for digital autopilot components. More...

#include <digitalcomponent.hxx>

Inherits FGXMLAutopilot::Component.

Inherited by FGXMLAutopilot::Logic.

Classes

class  InputMap
 

Public Types

typedef std::map< const std::string, DigitalOutput_ptrOutputMap
 

Public Member Functions

 DigitalComponent ()
 
- Public Member Functions inherited from FGXMLAutopilot::Component
 Component ()
 A constructor for an empty Component.
 
virtual ~Component ()
 virtual destructor to clean up resources
 
void update (double dt) override
 
virtual bool configure (SGPropertyNode &prop_root, SGPropertyNode &cfg)
 configure this component from a property node.
 
bool isPropertyEnabled ()
 check if this component is enabled as configured in the <enable> section
 

Protected Member Functions

virtual bool configure (SGPropertyNode &cfg_node, const std::string &cfg_name, SGPropertyNode &prop_root)
 Over-rideable hook method to allow derived classes to refine top-level node parsing.
 
- Protected Member Functions inherited from FGXMLAutopilot::Component
virtual void update (bool firstTime, double dt)=0
 pure virtual function to be implemented by the derived classes.
 
virtual void disabled (double dt)
 overideable method being called from the update() method if this component is disabled.
 

Protected Attributes

InputMap _input
 Named input "pins".
 
OutputMap _output
 Named output "pins".
 
bool _inverted
 Global "inverted" flag for the outputs.
 
- Protected Attributes inherited from FGXMLAutopilot::Component
bool _debug
 debug flag, true if this component should generate some useful output on every iteration
 
bool _honor_passive
 a (historic) flag signalling the derived class that it should compute it's internal state but shall not set the output properties if /autopilot/locks/passive-mode is true.
 

Detailed Description

Base class for digital autopilot components.

Each digital component has (at least)

  • one value input
  • any number of output properties

Definition at line 93 of file digitalcomponent.hxx.

Member Typedef Documentation

◆ OutputMap

Definition at line 106 of file digitalcomponent.hxx.

Constructor & Destructor Documentation

◆ DigitalComponent()

DigitalComponent::DigitalComponent ( )

Definition at line 32 of file digitalcomponent.cxx.

Member Function Documentation

◆ configure()

bool DigitalComponent::configure ( SGPropertyNode & cfg_node,
const std::string & cfg_name,
SGPropertyNode & prop_root )
protectedvirtual

Over-rideable hook method to allow derived classes to refine top-level node parsing.

Parameters
cfg_node
cfg_name
prop_root
Returns
true if the node was handled, false otherwise.

Reimplemented from FGXMLAutopilot::Component.

Reimplemented in FGXMLAutopilot::FlipFlop.

Definition at line 61 of file digitalcomponent.cxx.

Member Data Documentation

◆ _input

InputMap FGXMLAutopilot::DigitalComponent::_input
protected

Named input "pins".

Definition at line 112 of file digitalcomponent.hxx.

◆ _inverted

bool FGXMLAutopilot::DigitalComponent::_inverted
protected

Global "inverted" flag for the outputs.

Definition at line 122 of file digitalcomponent.hxx.

◆ _output

OutputMap FGXMLAutopilot::DigitalComponent::_output
protected

Named output "pins".

Definition at line 117 of file digitalcomponent.hxx.


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