#include <Event_Utilities.h>
Collaboration diagram for ACE_SupplierQOS_Factory:
Public Member Functions | |
ACE_SupplierQOS_Factory (TAO_EC_Event_Initializer initializer=0, int qos_max_len=0) | |
Default construction. | |
int | insert (RtecEventComm::EventSourceID sid, RtecEventComm::EventType type, RtecBase::handle_t rtinfo, u_int ncalls) |
const RtecEventChannelAdmin::SupplierQOS & | get_SupplierQOS (void) |
operator const RtecEventChannelAdmin::SupplierQOS & (void) | |
Calls this->get_SupplierQOS(). | |
Static Public Member Functions | |
static void | debug (const RtecEventChannelAdmin::SupplierQOS &qos) |
Private Attributes | |
RtecEventChannelAdmin::SupplierQOS | qos_ |
Representation needed by channel. | |
TAO_EC_Event_Initializer | event_initializer_ |
Definition at line 209 of file Event_Utilities.h.
ACE_SupplierQOS_Factory::ACE_SupplierQOS_Factory | ( | TAO_EC_Event_Initializer | initializer = 0 , |
|
int | qos_max_len = 0 | |||
) |
Default construction.
Definition at line 159 of file Event_Utilities.cpp.
References RtecEventChannelAdmin::SupplierQOS::is_gateway, RtecEventChannelAdmin::SupplierQOS::publications, and qos_.
00161 : event_initializer_ (initializer) 00162 { 00163 qos_.is_gateway = 0; 00164 00165 // Allocate the space requested by the application.... 00166 qos_.publications.length (qos_max_len); 00167 00168 // ... now reset the length, we do not want to use any elements in 00169 // the sequence that have not been initialized.... 00170 qos_.publications.length (0); 00171 }
void ACE_SupplierQOS_Factory::debug | ( | const RtecEventChannelAdmin::SupplierQOS & | qos | ) | [static] |
Definition at line 201 of file Event_Utilities.cpp.
References ACE_DEBUG, event_debug(), RtecEventChannelAdmin::SupplierQOS::is_gateway, LM_DEBUG, RtecEventChannelAdmin::SupplierQOS::publications, ACE_OS::sprintf(), and TAO_END_VERSIONED_NAMESPACE_DECL.
00202 { 00203 ACE_DEBUG ((LM_DEBUG, "SupplierQOS { \n")); 00204 ACE_DEBUG ((LM_DEBUG, " is_gateway: %d\n", qos.is_gateway)); 00205 00206 for (u_int i = 0; i < qos.publications.length (); ++i) 00207 { 00208 char buf[128] = { 0 }; 00209 ACE_OS::sprintf (buf, " publications[%d]", i); 00210 event_debug (buf, qos.publications[i].event); 00211 ACE_DEBUG ((LM_DEBUG, 00212 "%s dependency_info.rt_info: %d\n" 00213 "%s dependency_info.number_of_calls: %d\n", 00214 buf, qos.publications[i].dependency_info.rt_info, 00215 buf, qos.publications[i].dependency_info.number_of_calls)); 00216 } 00217 ACE_DEBUG ((LM_DEBUG, "}\n")); 00218 00219 }
ACE_INLINE const RtecEventChannelAdmin::SupplierQOS & ACE_SupplierQOS_Factory::get_SupplierQOS | ( | void | ) |
Allows conversions to SupplierQOS, which is expected by the PushSupplierProxy::connect_push_supplier interface.
Definition at line 141 of file Event_Utilities.inl.
References qos_.
Referenced by TAO_ECG_Mcast_Gateway::init_receiver().
00142 { 00143 return qos_; 00144 }
int ACE_SupplierQOS_Factory::insert | ( | RtecEventComm::EventSourceID | sid, | |
RtecEventComm::EventType | type, | |||
RtecBase::handle_t | rtinfo, | |||
u_int | ncalls | |||
) |
Publish sid and type that is generate by a method described by rtinfo. The method generates type ncalls number of times per "iteration."
Definition at line 174 of file Event_Utilities.cpp.
References event_initializer_, RtecEventChannelAdmin::SupplierQOS::publications, and qos_.
Referenced by TAO_ECG_Mcast_Gateway::init_receiver().
00178 { 00179 CORBA::ULong l = this->qos_.publications.length (); 00180 if (l >= this->qos_.publications.maximum ()) 00181 { 00182 // There is not enough space for the next element, grow the 00183 // buffer. 00184 this->qos_.publications.length (l + 1); 00185 00186 // @@ TODO We may want to consider more efficient growing 00187 // strategies here, for example, duplicating the size of the 00188 // buffer, or growing in fixed sized chunks... 00189 } 00190 00191 if (this->event_initializer_ != 0) 00192 (*this->event_initializer_) (qos_.publications[l].event); 00193 this->qos_.publications[l].event.header.source = sid; 00194 this->qos_.publications[l].event.header.type = type; 00195 // TODO: IDL union this->qos_.publications[l].event.data_.lval (0); 00196 this->qos_.publications[l].dependency_info.rt_info = rt_info; 00197 this->qos_.publications[l].dependency_info.number_of_calls = ncalls; 00198 return 0; 00199 }
ACE_INLINE ACE_SupplierQOS_Factory::operator const RtecEventChannelAdmin::SupplierQOS & | ( | void | ) |
Calls this->get_SupplierQOS().
Definition at line 147 of file Event_Utilities.inl.
References qos_.
00148 { 00149 return qos_; 00150 }
If not zero this is a user-provided function used to initialize the events. When the event contains unions this is required to avoid marshaling and demarshaling of default initialized unions that (AFAIK) is not CORBA compliant.
Definition at line 245 of file Event_Utilities.h.
Referenced by insert().
Representation needed by channel.
Definition at line 237 of file Event_Utilities.h.
Referenced by ACE_SupplierQOS_Factory(), get_SupplierQOS(), insert(), and operator const RtecEventChannelAdmin::SupplierQOS &().