Ejemplo n.º 1
0
    Topic(const dds::domain::DomainParticipant& dp,
          const std::string& name,
          const std::string& type_name)
        : dds::topic::detail::TopicDescription<T>(dp, name, type_name),
          dp_(dp),
          qos_(),
          listener_(0),
          mask_(dds::core::status::StatusMask())
        {
        char* tn = ts_.get_type_name();
        ts_.register_type(dp->dp_.get(), tn);

        qos(dp.default_topic_qos());
        DDS::TopicQos tqos = convertQos(qos_);
        t_ = dp->dp_->create_topic(name.c_str(), tn, tqos, 0,
                                   mask_.to_ulong());

        if (t_ == 0)
            throw dds::core::NullReferenceError(
                        org::opensplice::core::exception_helper(
                            OSPL_CONTEXT_LITERAL(
                                "dds::core::NullReferenceError : Unable to create Topic! "
                                "Nil return from ::create_topic")));

        topic_ = org::opensplice::core::DDS_TOPIC_REF(t_, org::opensplice::core::TopicDeleter(dp->dp_));
    }
Ejemplo n.º 2
0
Topic<T, DELEGATE>::Topic(const dds::domain::DomainParticipant& dp,
                          const std::string& topic_name)
    : dds::topic::TopicDescription<T, DELEGATE>(new DELEGATE<T>(dp,
            topic_name,
            topic_type_name<T>::value(),
            dp.default_topic_qos(),
            NULL,
            dds::core::status::StatusMask::all()))
{ }
Ejemplo n.º 3
0
Topic<T, DELEGATE>::Topic(const dds::domain::DomainParticipant& dp,
                          const std::string& topic_name) :
      ::dds::core::Reference< DELEGATE<T> >(new DELEGATE<T>(
              dp,
              topic_name,
              "",
              dp.is_nil() ? dds::topic::qos::TopicQos() : dp.default_topic_qos(),
              NULL,
              dds::core::status::StatusMask::none()))
{
    ISOCPP_REPORT_STACK_DDS_BEGIN(dp);

    this->delegate()->init(this->impl_);
}