EC_Timeout_Generator.cpp

Go to the documentation of this file.
00001 // $Id: EC_Timeout_Generator.cpp 76626 2007-01-26 13:50:03Z elliott_c $
00002 
00003 #include "orbsvcs/Event/EC_Timeout_Generator.h"
00004 #include "orbsvcs/Event/EC_Timeout_Filter.h"
00005 #include "orbsvcs/Event_Service_Constants.h"
00006 
00007 #if ! defined (__ACE_INLINE__)
00008 #include "orbsvcs/Event/EC_Timeout_Generator.inl"
00009 #endif /* __ACE_INLINE__ */
00010 
00011 ACE_RCSID (Event,
00012            EC_Timeout_Generator,
00013            "$Id: EC_Timeout_Generator.cpp 76626 2007-01-26 13:50:03Z elliott_c $")
00014 
00015 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00016 
00017 TAO_EC_Timeout_Generator::~TAO_EC_Timeout_Generator (void)
00018 {
00019 }
00020 
00021 // ****************************************************************
00022 
00023 int
00024 TAO_EC_Timeout_Adapter::handle_timeout (const ACE_Time_Value & /* tv */,
00025                                         const void *vp)
00026 {
00027   //  ACE_DEBUG ((LM_DEBUG,
00028   //              "TAO_EC_Timeout_Adapter::handle_timeout -"
00029   //              " expire at %d:%d\n",
00030   //              tv.sec (), tv.usec ()));
00031 
00032   TAO_EC_Timeout_Filter *filter =
00033     static_cast<TAO_EC_Timeout_Filter*> (const_cast<void*> (vp));
00034 
00035   if (filter == 0)
00036     return 0;
00037 
00038   try
00039     {
00040       RtecEventComm::Event e;
00041       e.header.type = filter->type ();
00042       e.header.source = 0;
00043 
00044       RtecEventComm::EventSet single_event (1, 1, &e, 0);
00045 
00046       TAO_EC_QOS_Info qos_info = filter->qos_info ();
00047       filter->push_to_proxy (single_event,
00048                              qos_info);
00049     }
00050   catch (const CORBA::Exception&)
00051     {
00052       return -1;
00053     }
00054 
00055   return 0;
00056 }
00057 
00058 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Tue Feb 2 17:44:06 2010 for TAO_RTEvent by  doxygen 1.4.7