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 118 of file FGFCSChannel.h.
118 {
119
120
121
122 if (OnOffNode && !OnOffNode->getBoolValue()) return;
123
124 if (fcs->GetDt() != 0.0) {
125 if (ExecFrameCountSinceLastRun >= ExecRate) {
126 ExecFrameCountSinceLastRun = 0;
127 }
128
129 ++ExecFrameCountSinceLastRun;
130 }
131
132
133
134 if (fcs->GetTrimStatus() || ExecFrameCountSinceLastRun >= ExecRate) {
135 for (unsigned int i=0; i<FCSComponents.size(); i++)
136 FCSComponents[i]->Run();
137 }
138 }
◆ GetComponent()
Retrieves a specific component.
Definition at line 99 of file FGFCSChannel.h.
99 {
101 return FCSComponents[i];
102 } else {
103 FGLogging log(LogLevel::ERROR);
104 log << "Tried to get nonexistent component\n";
105 return nullptr;
106 }
107 }
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 109 of file FGFCSChannel.h.
109 {
110 for (unsigned int i=0; i<FCSComponents.size(); i++)
111 FCSComponents[i]->ResetPastStates();
112
113
114
115 ExecFrameCountSinceLastRun = ExecRate;
116 }
The documentation for this class was generated from the following file: