FACT++  1.0
void tcp_connection::TriggerSendData ( const boost::system::error_code &  ec)
inlineprivate

Definition at line 449 of file ftm.cc.

References FTM::StaticData::IsEnabled(), kTrigger, Dim::SendCommand(), time, and TriggerSendData().

450  {
451  if (!is_open())
452  {
453  // For example: Here we could schedule a new accept if we
454  // would not want to allow two connections at the same time.
455  return;
456  }
457 
458  if (ec==ba::error::basic_errors::operation_aborted)
459  return;
460 
461  // Check whether the deadline has passed. We compare the deadline
462  // against the current time since a new asynchronous operation
463  // may have moved the deadline before this actor had a chance
464  // to run.
465  if (fTriggerSendData.expires_at() > ba::deadline_timer::traits_type::now())
466  return;
467 
468 
470  Dim::SendCommand("FAD/TRIGGER", fCounter++);
471 
472  const uint16_t time = 100*float(rand())/RAND_MAX+50;
473 
475  }
Physics trigger decision (PhysicTrigger)
Definition: HeadersFTM.h:206
void TriggerSendData(const boost::system::error_code &ec)
Definition: fad.cc:225
void AsyncWait(ba::deadline_timer &timer, int seconds, void(tcp_connection::*handler)(const bs::error_code &))
Definition: fad.cc:79
ba::deadline_timer fTriggerSendData
Definition: fad.cc:123
FTM::StaticData fStaticData
Definition: ftm.cc:146
bool SendCommand(const std::string &command)
Definition: Dim.h:26
Warning because the service this data corrsponds to might have been last updated longer ago than Local time
Definition: smartfact.txt:92
uint16_t fCounter
Definition: ftm.cc:154
bool IsEnabled(GeneralSettings type) const
Definition: HeadersFTM.h:306

+ Here is the call graph for this function: