| 184 | |
| 185 | |
| 186 | static void TerminalModule__doProcess(TerminalModule* const terminalModule, const Module::ProcessArgs& args, bool input) { |
| 187 | // Step module |
| 188 | if (input) { |
| 189 | terminalModule->processTerminalInput(args); |
| 190 | for (Output& output : terminalModule->outputs) { |
| 191 | for (Cable* cable : output.cables) |
| 192 | Cable_step(cable); |
| 193 | } |
| 194 | } else { |
| 195 | terminalModule->processTerminalOutput(args); |
| 196 | } |
| 197 | |
| 198 | #ifndef HEADLESS |
| 199 | // Iterate ports to step plug lights |
| 200 | if (args.frame % PORT_DIVIDER == 0) { |
| 201 | float portTime = args.sampleTime * PORT_DIVIDER; |
| 202 | for (Input& input : terminalModule->inputs) { |
| 203 | Port_step(&input, portTime); |
| 204 | } |
| 205 | for (Output& output : terminalModule->outputs) { |
| 206 | Port_step(&output, portTime); |
| 207 | } |
| 208 | } |
| 209 | #endif |
| 210 | } |
| 211 | |
| 212 | |
| 213 | static void Module__doProcess(Module* const module, const Module::ProcessArgs& args) { |
no test coverage detected