//------------------------------------------------------------------------------ // updateTC() -- Update time critical stuff here //------------------------------------------------------------------------------ void Component::updateTC(const double dt) { // Update all my children PairStream* subcomponents = getComponents(); if (subcomponents != nullptr) { if (selection != nullptr) { // When we've selected only one if (selected != nullptr) selected->tcFrame(dt); } else { // When we should update them all List::Item* item = subcomponents->getFirstItem(); while (item != nullptr) { const auto pair = static_cast<Pair*>(item->getValue()); const auto obj = static_cast<Component*>( pair->object() ); obj->tcFrame(dt); item = item->getNext(); } } subcomponents->unref(); subcomponents = nullptr; } }
//------------------------------------------------------------------------------ // processTimeCriticalTasks() -- Process T/C tasks //------------------------------------------------------------------------------ void Station::processTimeCriticalTasks(const LCreal dt) { for (unsigned int jj = 0; jj < getFastForwardRate(); jj++) { tcFrame( dt ); } }