diff options
author | cdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-10 16:47:37 +0000 |
---|---|---|
committer | cdgill <cdgill@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-10 16:47:37 +0000 |
commit | b1e22f6882af77605f71c9ecc31b4ec370052f21 (patch) | |
tree | 84955880ff6c5c8f65ce90830840254001f2d32a /TAO/examples/Simulator | |
parent | 1ff3b6cb0262599cb5387db349c188b6b8b8e7ee (diff) | |
download | ATCD-b1e22f6882af77605f71c9ecc31b4ec370052f21.tar.gz |
cleaned up inconsistencies with new RtecEventComm::Event interface
Diffstat (limited to 'TAO/examples/Simulator')
-rw-r--r-- | TAO/examples/Simulator/DOVEMIB/DOVEMIB.cpp | 20 | ||||
-rw-r--r-- | TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp | 12 | ||||
-rw-r--r-- | TAO/examples/Simulator/Event_Supplier/Event_Con.cpp | 18 |
3 files changed, 25 insertions, 25 deletions
diff --git a/TAO/examples/Simulator/DOVEMIB/DOVEMIB.cpp b/TAO/examples/Simulator/DOVEMIB/DOVEMIB.cpp index 03fbefbb48d..ded0f6c359c 100644 --- a/TAO/examples/Simulator/DOVEMIB/DOVEMIB.cpp +++ b/TAO/examples/Simulator/DOVEMIB/DOVEMIB.cpp @@ -154,7 +154,7 @@ MIB_Consumer::push (const RtecEventComm::EventSet &events, // Several events could be sent at once for (CORBA::ULong i = 0; i < events.length (); ++i) { - if (events[i].type_ == ACE_ES_EVENT_SHUTDOWN) { + if (events[i].header.type == ACE_ES_EVENT_SHUTDOWN) { ACE_DEBUG ((LM_DEBUG, "MIB Consumer: received shutdown event\n")); this->shutdown (); @@ -170,24 +170,24 @@ MIB_Consumer::push (const RtecEventComm::EventSet &events, // print the time stamps ACE_hrtime_t creation; ORBSVCS_Time::TimeT_to_hrtime (creation, - events[i].creation_time_); + events[i].header.creation_time); ACE_hrtime_t ec_recv; ORBSVCS_Time::TimeT_to_hrtime (ec_recv, - events[i].ec_recv_time_); + events[i].header.ec_recv_time); ACE_hrtime_t ec_send; ORBSVCS_Time::TimeT_to_hrtime (ec_send, - events[i].ec_send_time_); + events[i].header.ec_send_time); anyAnalyser_.printTimeStamp (creation, ec_recv, ec_send); - if (events[i].data_.any_value.any_owns_data ()) + if (events[i].data.any_value.any_owns_data ()) { - void * void_ptr = ACE_OS::malloc (events[i].data_.any_value.type()->size(TAO_TRY_ENV)); + void * void_ptr = ACE_OS::malloc (events[i].data.any_value.type()->size(TAO_TRY_ENV)); - TAO_InputCDR stream ((ACE_Message_Block *)events[i].data_.any_value.value ()); - if (stream.decode (events[i].data_.any_value.type(), void_ptr, 0, TAO_TRY_ENV) + TAO_InputCDR stream ((ACE_Message_Block *)events[i].data.any_value.value ()); + if (stream.decode (events[i].data.any_value.type(), void_ptr, 0, TAO_TRY_ENV) != CORBA::TypeCode::TRAVERSE_CONTINUE) { cout << "MIB_Consumer::push: " @@ -200,13 +200,13 @@ MIB_Consumer::push (const RtecEventComm::EventSet &events, TAO_CHECK_ENV; // invoke the AnyAnalyser - anyAnalyser_.printAny (events[i].data_.any_value.type(), void_ptr); + anyAnalyser_.printAny (events[i].data.any_value.type(), void_ptr); ACE_OS::free(void_ptr); } else { // invoke the AnyAnalyser - anyAnalyser_.printAny (events[i].data_.any_value.type(), events[i].data_.any_value.value()); + anyAnalyser_.printAny (events[i].data.any_value.type(), events[i].data.any_value.value()); } } diff --git a/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp b/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp index 970b83cd83a..30e3db617b2 100644 --- a/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp +++ b/TAO/examples/Simulator/Event_Supplier/DOVE_Supplier.cpp @@ -50,9 +50,9 @@ DOVE_Supplier::notify (CORBA::Any &message) TAO_TRY { RtecEventComm::Event event; - event.source_ = SOURCE_ID; - event.type_ = ACE_ES_EVENT_NOTIFICATION; - event.ttl_ = 1; + event.header.source = SOURCE_ID; + event.header.type = ACE_ES_EVENT_NOTIFICATION; + event.header.ttl = 1; event.header.creation_time = ORBSVCS_Time::zero; event.header.ec_recv_time = ORBSVCS_Time::zero; event.header.ec_send_time = ORBSVCS_Time::zero; @@ -189,9 +189,9 @@ DOVE_Supplier::connect_Supplier () CORBA::Short x = 0; RtecEventChannelAdmin::SupplierQOS qos; qos.publications.length (1); - qos.publications[0].event.source_ = SOURCE_ID; - qos.publications[0].event.type_ = ACE_ES_EVENT_NOTIFICATION; - qos.publications[0].event.ttl_ = 1; + qos.publications[0].event.header.source = SOURCE_ID; + qos.publications[0].event.header.type = ACE_ES_EVENT_NOTIFICATION; + qos.publications[0].event.header.ttl = 1; qos.publications[0].event.header.creation_time = ORBSVCS_Time::zero; qos.publications[0].event.header.ec_recv_time = ORBSVCS_Time::zero; qos.publications[0].event.header.ec_send_time = ORBSVCS_Time::zero; diff --git a/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp b/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp index d27723798b1..5ada49615e9 100644 --- a/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp +++ b/TAO/examples/Simulator/Event_Supplier/Event_Con.cpp @@ -158,7 +158,7 @@ Demo_Consumer::push (const RtecEventComm::EventSet &events, for (CORBA::ULong i = 0; i < events.length (); ++i) { - if (events[i].type_ == ACE_ES_EVENT_SHUTDOWN) + if (events[i].header.type == ACE_ES_EVENT_SHUTDOWN) { ACE_DEBUG ((LM_DEBUG, "Demo Consumer: received shutdown event\n")); this->shutdown (); @@ -169,26 +169,26 @@ Demo_Consumer::push (const RtecEventComm::EventSet &events, TAO_TRY { - cout << "ID: " << events[i].data_.any_value.type()->id(TAO_TRY_ENV) << endl; + cout << "ID: " << events[i].data.any_value.type()->id(TAO_TRY_ENV) << endl; TAO_CHECK_ENV; - cout << "Name: " << events[i].data_.any_value.type()->name(TAO_TRY_ENV) << endl; + cout << "Name: " << events[i].data.any_value.type()->name(TAO_TRY_ENV) << endl; TAO_CHECK_ENV; - cout << "member_count: " << events[i].data_.any_value.type()->member_count(TAO_TRY_ENV) << endl; + cout << "member_count: " << events[i].data.any_value.type()->member_count(TAO_TRY_ENV) << endl; TAO_CHECK_ENV; - cout << "TCKind: " << events[i].data_.any_value.type()->kind(TAO_TRY_ENV) << endl; + cout << "TCKind: " << events[i].data.any_value.type()->kind(TAO_TRY_ENV) << endl; TAO_CHECK_ENV; - if (_tc_Navigation->equal (events[i].data_.any_value.type(), TAO_TRY_ENV)) + if (_tc_Navigation->equal (events[i].data.any_value.type(), TAO_TRY_ENV)) { TAO_CHECK_ENV; - Navigation *navigation_ = (Navigation*) events[i].data_.any_value.value (); + Navigation *navigation_ = (Navigation*) events[i].data.any_value.value (); cout << "Found a Navigation struct in the any: pos_lat = " << navigation_->position_latitude << endl; } - else if (_tc_Weapons->equal (events[i].data_.any_value.type(), TAO_TRY_ENV)) + else if (_tc_Weapons->equal (events[i].data.any_value.type(), TAO_TRY_ENV)) { TAO_CHECK_ENV; - Weapons *weapons_ = (Weapons*) events[i].data_.any_value.value (); + Weapons *weapons_ = (Weapons*) events[i].data.any_value.value (); cout << "Found a Navigation struct in the any: pos_lat = " << weapons_->number_of_weapons << endl; } |