Function dds_create_participant

Function Documentation

dds_entity_t dds_create_participant(const dds_domainid_t domain, const dds_qos_t *qos, const dds_listener_t *listener)

Creates a new instance of a DDS participant in a domain.

If domain is set (not DDS_DOMAIN_DEFAULT) then it must match if the domain has also been configured or an error status will be returned. Currently only a single domain can be configured by providing configuration file. If no configuration file exists, the default domain is configured as 0.

Parameters
  • domain[in] The domain in which to create the participant (can be DDS_DOMAIN_DEFAULT). DDS_DOMAIN_DEFAULT is for using the domain in the configuration.

  • qos[in] The QoS to set on the new participant (can be NULL).

  • listener[in] Any listener functions associated with the new participant (can be NULL).

Return values
  • >0 – A valid participant handle.

  • DDS_RETCODE_NOT_ALLOWED_BY_SECURITY – An invalid DDS Security configuration was specified (whether that be missing or incorrect entries, expired certificates, or anything else related to the security settings and implementation).

  • DDS_RETCODE_PRECONDITION_NOT_MET – Some security properties specified in the QoS, but the Cyclone build does not include support for DDS Security.

  • DDS_RETCODE_OUT_OF_RESOURCES – Some resource limit (maximum participants, memory, handles, &c.) prevented creation of the participant.

  • DDS_RETCODE_ERROR – The “CYCLONEDDS_URI” environment variable lists non-existent or invalid configuration files, or contains invalid embedded configuration items; or an unspecified internal error has occurred.

Returns

A valid participant handle or an error code.