00001 #include "MultiThreadAnalogMsgDispatcher.h" 00002 00003 MultiThreadAnalogMsgDispatcher::~MultiThreadAnalogMsgDispatcher() 00004 {} 00005 00006 void MultiThreadAnalogMsgDispatcher::dispatchAnalogMsgs() 00007 { 00008 if (min_delay == 0) { 00009 mt_incoming_immediate_analog_msgs_dispatcher.dispatchAnalogMsgs(); 00010 thr_barrier->wait(); 00011 } 00012 00013 mt_incoming_delayed_analog_msgs_dispatcher.dispatchIncomingAnalogMsgs(currentStep); 00014 st_analog_msgs_dispatcher.dispatchAnalogMsgs(); 00015 currentStep = (min_delay == 0) ? 0 : ((currentStep+1) % min_delay); 00016 } 00017 00018 void MultiThreadAnalogMsgDispatcher::initialize() 00019 { 00020 } 00021 00022 void MultiThreadAnalogMsgDispatcher::reset(double dt) 00023 { 00024 currentStep = 0; 00025 }