コード例 #1
0
ファイル: Subscriber.cpp プロジェクト: Yijtx/ACE
    ::DDS::ReturnCode_t
    DDS_Subscriber_i::get_datareaders (
      ::DDS::DataReaderSeq & readers,
      ::DDS::SampleStateMask sample_states,
      ::DDS::ViewStateMask view_states,
      ::DDS::InstanceStateMask instance_states)
    {
      DDS4CCM_TRACE ("DDS_Subscriber_i::get_datareaders");
      ::DDSDataReaderSeq dds_readers;

      ::DDS_ReturnCode_t retcode =
        this->rti_entity ()->get_datareaders (dds_readers,
                                              sample_states,
                                              view_states,
                                              instance_states);
      if (retcode == DDS_RETCODE_OK)
        {
          readers.length (dds_readers.length ());
          for (::DDS_Long i = 0; i < dds_readers.length (); ++i)
            {
              ::DDS::DataReader_var rdr = DDS_TypeSupport_i::create_datareader (
                                                                dds_readers[i],
                                                                this->dp_.in (),
                                                                this);
              readers [i] = rdr._retn ();
            }
        }
      return retcode;
    }
コード例 #2
0
ファイル: GroupRakeData.cpp プロジェクト: binary42/OCI
void
GroupRakeData::get_datareaders(DDS::DataReaderSeq & readers)
{
  readers.length(static_cast<CORBA::ULong>(this->sorted_.size()));
  int i = 0;
  SortedSet::iterator itEnd = this->sorted_.end();
  for (SortedSet::iterator it = this->sorted_.begin(); it != itEnd; ++it) {
    readers[i++] =
      DDS::DataReader::_duplicate(it->si_->instance_state_.data_reader());
  }
}
コード例 #3
0
void
GroupRakeData::get_datareaders(DDS::DataReaderSeq & readers)
{
  ACE_UNUSED_ARG(readers);
#ifndef OPENDDS_NO_OBJECT_MODEL_PROFILE
  readers.length(static_cast<CORBA::ULong>(this->sorted_.size()));
  int i = 0;
  SortedSet::iterator itEnd = this->sorted_.end();
  for (SortedSet::iterator it = this->sorted_.begin(); it != itEnd; ++it) {
    readers[i++] =
      DDS::DataReader::_duplicate(it->si_->instance_state_.data_reader());
  }
#endif
}