Definition at line 72 of file FGFCSChannel.h.
◆ FGFCSChannel()
Constructor.
Definition at line 75 of file FGFCSChannel.h.
77 : fcs(FCS), OnOffNode(node), Name(name)
78 {
79 ExecRate = execRate < 1 ? 1 : execRate;
80
81 ExecFrameCountSinceLastRun = ExecRate;
82 }
◆ ~FGFCSChannel()
Destructor.
Definition at line 85 of file FGFCSChannel.h.
85 {
86 for (unsigned int i=0; i<FCSComponents.size(); i++) delete FCSComponents[i];
87 FCSComponents.clear();
88 }
◆ Add()
Adds a component to a channel.
Definition at line 93 of file FGFCSChannel.h.
93 {
94 FCSComponents.push_back(comp);
95 }
◆ Execute()
Executes all the components in a channel.
Definition at line 117 of file FGFCSChannel.h.
117 {
118
119
120
121 if (OnOffNode && !OnOffNode->getBoolValue()) return;
122
123 if (fcs->GetDt() != 0.0) {
124 if (ExecFrameCountSinceLastRun >= ExecRate) {
125 ExecFrameCountSinceLastRun = 0;
126 }
127
128 ++ExecFrameCountSinceLastRun;
129 }
130
131
132
133 if (fcs->GetTrimStatus() || ExecFrameCountSinceLastRun >= ExecRate) {
134 for (unsigned int i=0; i<FCSComponents.size(); i++)
135 FCSComponents[i]->Run();
136 }
137 }
◆ GetComponent()
Retrieves a specific component.
Definition at line 99 of file FGFCSChannel.h.
99 {
101 std::cerr << "Tried to get nonexistent component" << std::endl;
102 return 0;
103 } else {
104 return FCSComponents[i];
105 }
106 }
size_t GetNumComponents()
Returns the number of components in the channel.
◆ GetName()
Retrieves the name of the channel.
Definition at line 90 of file FGFCSChannel.h.
◆ GetNumComponents()
size_t GetNumComponents |
( |
| ) |
|
|
inline |
Returns the number of components in the channel.
Definition at line 97 of file FGFCSChannel.h.
97{return FCSComponents.size();}
◆ GetRate()
int GetRate |
( |
void |
| ) |
const |
|
inline |
◆ Reset()
Reset the components that can be reset.
Definition at line 108 of file FGFCSChannel.h.
108 {
109 for (unsigned int i=0; i<FCSComponents.size(); i++)
110 FCSComponents[i]->ResetPastStates();
111
112
113
114 ExecFrameCountSinceLastRun = ExecRate;
115 }
The documentation for this class was generated from the following file: