/* * Copyright (c) 2016-2025 Real-Time Innovations, Inc. All rights reserved. * No duplications, whole or partial, manual or electronic, may be made * without express written permission. Any such copies, or revisions thereof, * must display this notice unaltered. * This code contains trade secrets of Real-Time Innovations, Inc. */ #ifndef clouddiscoveryservice_builtin_h #define clouddiscoveryservice_builtin_h #ifndef cds_dll_h #include "clouddiscoveryservice/clouddiscoveryservice_dll.h" #include "clouddiscoveryservice/clouddiscoveryservice_service.h" #endif #ifndef dds_c_domain_h #include "dds_c/dds_c_domain.h" #endif #ifndef disc_builtin_h #include "disc/disc_builtin.h" #endif #ifdef __cplusplus extern "C" { #endif typedef enum { CDS_DISCOVERY_PROTOCOL_MODE_SPDP, CDS_DISCOVERY_PROTOCOL_MODE_SPDP2, CDS_DISCOVERY_PROTOCOL_MODE_INVALID } CDSDiscoveryProtocolMode; typedef struct CDSParticipantDiscoveryImpl CDSParticipantDiscovery; typedef struct CDSParticipantDetectorImpl CDSParticipantDetector; typedef struct CDSParticipantAnnouncerImpl CDSParticipantAnnouncer; extern CDSDllExport int CDSParticipantDiscovery_get_unicast_port_for_domain( DDS_DomainId_t domain_id, const struct DDS_WireProtocolQosPolicy *wire_protocol); extern CDSDllExport CDSParticipantDiscovery *CDSParticipantDiscovery_new( DDS_DomainParticipantFactory *factory, const struct DDS_DomainParticipantQos *participant_qos, CDSDiscoveryProtocolMode protocolMode); extern CDSDllExport void CDSParticipantDiscovery_delete( CDSParticipantDiscovery *self); extern CDSDllExport CDSParticipantDetector * CDSParticipantDiscovery_assert_detector( CDSParticipantDiscovery *self, struct PRESPsReaderListener *listener); extern CDSDllExport CDSParticipantAnnouncer * CDSParticipantDiscovery_assert_announcer( CDSParticipantDiscovery *participantDiscovery); extern CDSDllExport void CDSParticipantDiscovery_delete_announcer( CDSParticipantDiscovery *participantDiscovery); extern CDSDllExport void CDSParticipantDiscovery_delete_detector( CDSParticipantDiscovery *participantDiscovery); /** \ingroup CDSAdaptersModule * * @brief Takes all the samples available in the cache. */ extern CDSDllExport DDS_Boolean CDSParticipantDetector_take( CDSParticipantDetector *self, struct DISCBuiltinTopicParticipantData ***participant_data_seq, struct DDS_SampleInfo ***info_seq, int *count); /** \ingroup CDSAdaptersModule * * @brief Takes all the samples available in the cache. */ extern CDSDllExport void CDSParticipantDetector_return_loan( CDSParticipantDetector *self, struct DISCBuiltinTopicParticipantData **participant_data_seq, struct DDS_SampleInfo **info_seq, int count); /**i \ingroup CDSAdaptersModule * * @brief Sets the default send destinations for the specified domain Id and * wire protocol QoS. It is only used for testing purposes while simulating * announcements with an instance of CDS. */ extern CDSDllExport DDS_Boolean CDSParticipantAnnouncer_set_destinations( CDSParticipantAnnouncer *self, const struct PRESLocatorQosPolicy *locatorQos); /** \ingroup CDSAdaptersModule * * @brief Writes an announcement to the current set destinations. */ extern CDSDllExport DDS_Boolean CDSParticipantAnnouncer_write( CDSParticipantAnnouncer *self, struct DISCBuiltinTopicParticipantData *participant_data); /** \ingroup CDSAdaptersModule * * @brief Disposes the specified participant. */ extern CDSDllExport DDS_Boolean CDSParticipantAnnouncer_dispose( CDSParticipantAnnouncer *self, const DDS_InstanceHandle_t *participant_handle); #ifdef __cplusplus } /* extern "C" */ #endif #endif /* clouddiscoveryservice_builtin_h */