void Test::DataReaderListener::display_partitions ( DDS::DataReader_ptr reader) const { // Display requested partition. DDS::Subscriber_var subscriber (reader->get_subscriber ()); DDS::SubscriberQos sub_qos; subscriber->get_qos (sub_qos); DDS::PartitionQosPolicy const & partition = sub_qos.partition; ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Requested Partition\n") ACE_TEXT ("Partition\tName\n") ACE_TEXT ("=========\t====\n"))); CORBA::ULong const len = partition.name.length (); if (len == 0) ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("** Zero length partition name ") ACE_TEXT ("sequence (default) **\n"))); for (CORBA::ULong i = 0; i != len; ++i) { char const * s = partition.name[i]; ACE_DEBUG ((LM_DEBUG, ACE_TEXT (" %u\t\t%s\n"), i, *s == 0 ? "\"\"" : s)); } }
void DataReaderListenerImpl::on_liveliness_changed ( DDS::DataReader_ptr reader, const DDS::LivelinessChangedStatus & status) throw (CORBA::SystemException) { ++ num_liveliness_change_callbacks_; const OpenDDS::DCPS::RepoId id = dynamic_cast<OpenDDS::DCPS::DomainParticipantImpl*>(reader->get_subscriber()->get_participant())->get_repoid(status.last_publication_handle); OpenDDS::DCPS::GuidConverter converter(id); ACE_DEBUG((LM_INFO, "%T DataReaderListenerImpl::on_liveliness_changed #%d\n" " alive_count = %d\n" " not_alive_count = %d\n" " alive_count_change = %d\n" " not_alive_count_change = %d\n" " last_publication_handle = %d (%s)\n", num_liveliness_change_callbacks_, status.alive_count, status.not_alive_count, status.alive_count_change, status.not_alive_count_change, status.last_publication_handle, OPENDDS_STRING(converter).c_str())); }