Beispiel #1
0
int
TAO_EC_Timeout_Adapter::handle_timeout (const ACE_Time_Value & /* tv */,
                                        const void *vp)
{
  //  ORBSVCS_DEBUG ((LM_DEBUG,
  //              "TAO_EC_Timeout_Adapter::handle_timeout -"
  //              " expire at %d:%d\n",
  //              tv.sec (), tv.usec ()));

  TAO_EC_Timeout_Filter *filter =
    static_cast<TAO_EC_Timeout_Filter*> (const_cast<void*> (vp));

  if (filter == 0)
    return 0;

  try
    {
      RtecEventComm::Event e;
      e.header.type = filter->type ();
      e.header.source = 0;

      RtecEventComm::EventSet single_event (1, 1, &e, 0);

      TAO_EC_QOS_Info qos_info = filter->qos_info ();
      filter->push_to_proxy (single_event,
                             qos_info);
    }
  catch (const CORBA::Exception&)
    {
      return -1;
    }

  return 0;
}
Beispiel #2
0
void
TAO_EC_Null_Scheduling::schedule_event (const RtecEventComm::EventSet &event,
                                        TAO_EC_ProxyPushConsumer *,
                                        TAO_EC_Supplier_Filter *filter)
{
  for (CORBA::ULong j = 0; j < event.length (); ++j)
    {
      const RtecEventComm::Event& e = event[j];
      RtecEventComm::Event* buffer =
        const_cast<RtecEventComm::Event*> (&e);
      RtecEventComm::EventSet single_event (1, 1, buffer, 0);

      TAO_EC_QOS_Info event_info;
      filter->push_scheduled_event (single_event, event_info);
    }
}
Beispiel #3
0
void
TAO_EC_Kokyu_Scheduling::schedule_event (const RtecEventComm::EventSet &event,
                                            TAO_EC_ProxyPushConsumer *consumer,
                                            TAO_EC_Supplier_Filter *filter)
{
  RtecEventChannelAdmin::SupplierQOS qos =
    consumer->publications ();

  for (CORBA::ULong j = 0; j != event.length (); ++j)
    {
      const RtecEventComm::Event& e = event[j];
      RtecEventComm::Event* buffer =
        const_cast<RtecEventComm::Event*> (&e);
      RtecEventComm::EventSet single_event (1, 1, buffer, 0);

      TAO_EC_QOS_Info qos_info;

      for (CORBA::ULong i = 0; i != qos.publications.length (); ++i)
        {
          const RtecEventComm::EventHeader &qos_header =
            qos.publications[i].event.header;

          if (TAO_EC_Filter::matches (e.header, qos_header) == 0)
            continue;

          qos_info.rt_info = qos.publications[i].dependency_info.rt_info;

          RtecScheduler::OS_Priority os_priority;
          RtecScheduler::Preemption_Subpriority_t p_subpriority;
          RtecScheduler::Preemption_Priority_t p_priority;
          this->scheduler_->priority (qos_info.rt_info,
                                      os_priority,
                                      p_subpriority,
                                      p_priority);
          qos_info.preemption_priority = p_priority;
        }

      filter->push_scheduled_event (single_event, qos_info);
    }
}