0

我构建了 OpenSplice 库的静态版本,但在使用它时遇到了麻烦。我对 create_participant() 的调用返回 NULL:

DDS::DomainParticipantFactory_var m_participantFactory = DDS::DomainParticipantFactory::get_instance();
DDS::DomainParticipant_var m_participant = m_participantFactory->create_participant(m_ddsDomainId,
    PARTICIPANT_QOS_DEFAULT, NULL, DDS::STATUS_MASK_NONE);

文件 ospl-error.log 的输出是:

Report      : Unable to connect to domain id = 42.
              The most common causes of this error are an incorrect configuration file or
              that OpenSpliceDDS is not running (when using shared memory mode).
Internals   : u_participantNew/u_participant.c/234/773/1615338645.257521960
----------------------------------------------------------------------------------------
Report      : Failed to start Spliced for domain 'ospl_sp_ddsi' within 10 seconds, result = U_RESULT_OK
Internals   : user::u_domain::startSpliceThread/u_domain.c/1253/769/1615338645.257529216

我认为我的配置文件是正确的,因为当我使用共享/动态 OpenSplice 库运行时,我的示例程序可以正常工作。我不明白有关“OpenSpliceDDS 未运行”的评论。可能是什么问题呢?如果不共享代码(很长),是否有人对可能导致问题的原因有任何好的线索?

4

0 回答 0