/* * 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_infrastructure_h #define clouddiscoveryservice_infrastructure_h #ifndef cds_dll_h #include "clouddiscoveryservice/clouddiscoveryservice_dll.h" #endif #ifndef ndds_c_h #include "ndds/ndds_c.h" #endif #ifndef core_version_version_h #include "core_version/core_version_version.h" #endif #ifdef __cplusplus extern "C" { #endif /*e \file \brief Service infrastructure */ #define RTI_CDS_VARIABLE_LENGTH_VALUE_TYPE_SUPPORT(T) \ struct T; \ CDSDllExport void T##_initialize(struct T *self); \ CDSDllExport void T##_finalize(struct T *self); \ CDSDllExport struct T *T##_copy(struct T *self, const struct T *from) #define RTI_CDS_VARIABLE_LENGTH_VALUE_TYPE_SUPPORT_W_ERROR_CHECKING(T) \ struct T; \ CDSDllExport RTIBool T##_initialize(struct T *self); \ CDSDllExport void T##_finalize(struct T *self); \ CDSDllExport RTIBool T##_copy(struct T *self, const struct T *from) /*e \ingroup RTI_CDS_ServiceProperty * * @brief Allows all domain IDs for @product. * */ #define RTI_CDS_DomainListProperty_INITIALIZER \ { \ NULL, NULL \ } #define RTI_CDS_DOMAIN_LIST_PROPERTY_ALL_VALUE ("DOMAIN_LIST_ALL") #define RTI_CDS_DOMAIN_LIST_PROPERTY_EMPTY_VALUE ("") RTI_CDS_VARIABLE_LENGTH_VALUE_TYPE_SUPPORT(RTI_CDS_DomainListProperty); struct RTI_CDS_DomainListProperty { /*e * @brief The list of domain IDs where @product processes the incoming * participant announcements. * * @default NULL. Use value from XML configuration. */ char *allow_domain_ids; /*e * @brief The list of domain IDs to deny or ignore. Overrides * \ref allow_domain_ids. * * @default NULL. Use value from XML configuration. */ char *deny_domain_ids; }; #define RTI_CDS_TRANSPORT_UNICAST_PROPERTY_ALIAS_LENGTH_MAX (128) #define RTI_CDS_TRANSPORT_SELECTION_LENGTH_MAX (8) #define RTI_CDS_TransportUnicastProperty_INITIALIZER \ { \ { '\0' }, 0 \ } /*e \ingroup RTI_CDS_ServiceProperty * * @brief Empty transport selection list. Use value from XML configuration. * */ #define RTI_CDS_TransportSelectionProperty_INITIALIZER \ { \ { RTI_CDS_TransportUnicastProperty_INITIALIZER }, 0 \ } RTI_CDS_VARIABLE_LENGTH_VALUE_TYPE_SUPPORT(RTI_CDS_TransportSelectionProperty); struct RTI_CDS_TransportUnicastProperty { /*e * @brief Transport alias name. */ char alias[RTI_CDS_TRANSPORT_UNICAST_PROPERTY_ALIAS_LENGTH_MAX + 1]; /*e * @brief Receive port. */ int receive_port; }; struct RTI_CDS_TransportSelectionProperty { /*e * @brief \ref RTI_CDS_TransportUnicastProperty sequence. */ struct RTI_CDS_TransportUnicastProperty transports[RTI_CDS_TRANSPORT_SELECTION_LENGTH_MAX]; /*e * @brief Indicates how many slots in the array are used. */ int count; }; #define RTI_CDS_FLOW_CONTROLLER_JOBS_UNLIMITED (0) #define RTI_CDS_FlowControllerProperty_INITIALIZER \ { \ RTI_CDS_FLOW_CONTROLLER_JOBS_UNLIMITED, 0, { 0, 0, 0 }, \ DDS_DURATION_INFINITE_VALUE \ } RTI_CDS_VARIABLE_LENGTH_VALUE_TYPE_SUPPORT(RTI_CDS_FlowControllerProperty); typedef enum { RTI_CDS_NEW_ANNOUNCEMENT_FLOW_CONTROLLER_OUTPUT_SLOT, RTI_CDS_UPDATE_ANNOUNCEMENT_FLOW_CONTROLLER_OUTPUT_SLOT, RTI_CDS_REFRESH_ANNOUNCEMENT_FLOW_CONTROLLER_OUTPUT_SLOT, RTI_CDS_FlowControllerOutputSlotKind_COUNT } RTI_CDS_FlowControllerOutputSlotKind; struct RTI_CDS_FlowControllerProperty { RTI_UINT64 output_jobs_per_second; RTI_UINT64 max_burst_jobs; RTI_INT32 output_slot_capacity_allocation [RTI_CDS_FlowControllerOutputSlotKind_COUNT]; struct DDS_Duration_t flush_period; }; /** * @brief Data structure to configure the forwarder resend event mechanism. * It allows CDS to resend a new or update announcement so that discovery * can occur quickly in a lossy WAN environment. */ struct RTI_CDS_ForwarderEventProperty { /* Indicates how many times CDS resends a new or change announcement. */ DDS_UnsignedLong new_or_change_participant_announcements; /* Minimum duration for the random interval between a resend. */ struct DDS_Duration_t min_new_or_change_participant_announcements_period; /* Maximum duration for the random interval between a resend. */ struct DDS_Duration_t max_new_or_change_participant_announcements_period; }; #define RTI_CDS_ForwarderEventProperty_INITIALIZER \ { \ 0, /* new_or_change_participant_announcements */ \ { 0, \ 0 }, /* min_new_or_change_participant_announcements_period \ */ \ { \ 0, 0 \ } /* max_new_or_change_participant_announcements_period */ \ } DDSC_VARIABLE_LENGTH_VALUE_TYPE_SUPPORT(RTI_CDS_ForwarderEventProperty); #ifdef __cplusplus } /* extern "C" */ #endif #endif /* clouddiscoveryservice_infrastructure_h */