diff --git a/config/DDS_ENABLER_CONFIGURATION.yaml b/config/DDS_ENABLER_CONFIGURATION.yaml index d06934f0a8..5772aa36ea 100644 --- a/config/DDS_ENABLER_CONFIGURATION.yaml +++ b/config/DDS_ENABLER_CONFIGURATION.yaml @@ -11,6 +11,12 @@ dds: blocklist: - name: "add_blocked_topics_list_here" +topics: + name: "*" + qos: + durability: TRANSIENT_LOCAL + history-depth: 5 + # DDS Enabler configuration ddsenabler: diff --git a/src/app/orionld/orionld.cpp b/src/app/orionld/orionld.cpp index b1239abe81..f3929aab4d 100644 --- a/src/app/orionld/orionld.cpp +++ b/src/app/orionld/orionld.cpp @@ -258,6 +258,7 @@ char ddsConfigFile[512]; char ddsEnablerConfigFile[512]; +#define DDSE_CONF_FILE "/tmp/DDS_ENABLER_CONFIGURATION.yaml" /* **************************************************************************** * @@ -465,11 +466,11 @@ PaArgument paArgs[] = { "-subordinateEndpoint", &subordinateEndpoint, "SUBORDINATE_ENDPOINT", PaStr, PaOpt, _i "", PaNL, PaNL, SUBORDINATE_ENDPOINT_DESC }, { "-pageSize", &pageSize, "PAGE_SIZE", PaInt, PaOpt, 20, 1, 1000, PAGE_SIZE_DESC }, { "-dds", &ddsSupport, "DDS", PaBool, PaOpt, false, false, true, USE_DDS_DESC }, - { "-ddsSubsTopics", ddsSubsTopics, "DDS_SUBS_TOPICS", PaString, PaOpt, _i "", PaNL, PaNL, DDS_SUBS_TOPICS_DESC }, - { "-ddsTopicType", ddsTopicType, "DDS_TOPIC_TYPE", PaString, PaOpt, _i "NGSI-LD", PaNL, PaNL, DDS_TOPIC_TYPE_DESC }, - { "-ddsConfigFile", ddsConfigFile, "DDS_CONFIG_FILE", PaString, PaOpt, _i "", PaNL, PaNL, DDS_CONFIG_FILE_DESC }, - { "-ddsEnablerConfigFile", ddsEnablerConfigFile, "DDS_CONFIG_FILE_PATH", PaString, PaOpt, _i "", PaNL, PaNL, DDS_ENABLER_CONFIG_FILE_DESC }, - { "-duc", defaultUserContextUrl, "DUC_URL", PaString, PaOpt, _i "", PaNL, PaNL, DUC_URL_DESC }, + { "-ddsSubsTopics", ddsSubsTopics, "DDS_SUBS_TOPICS", PaString, PaOpt, _i "", PaNL, PaNL, DDS_SUBS_TOPICS_DESC }, + { "-ddsTopicType", ddsTopicType, "DDS_TOPIC_TYPE", PaString, PaOpt, _i "NGSI-LD", PaNL, PaNL, DDS_TOPIC_TYPE_DESC }, + { "-ddsConfigFile", ddsConfigFile, "DDS_CONFIG_FILE", PaString, PaOpt, _i "", PaNL, PaNL, DDS_CONFIG_FILE_DESC }, + { "-ddsEnablerConfigFile", ddsEnablerConfigFile, "DDS_CONFIG_FILE_PATH", PaString, PaOpt, _i DDSE_CONF_FILE, PaNL, PaNL, DDS_ENABLER_CONFIG_FILE_DESC }, + { "-duc", defaultUserContextUrl, "DUC_URL", PaString, PaOpt, _i "", PaNL, PaNL, DUC_URL_DESC }, PA_END_OF_ARGS }; diff --git a/src/lib/orionld/dds/ddsInit.cpp b/src/lib/orionld/dds/ddsInit.cpp index 7ff9fb9e5f..4712ad451e 100644 --- a/src/lib/orionld/dds/ddsInit.cpp +++ b/src/lib/orionld/dds/ddsInit.cpp @@ -126,7 +126,7 @@ int ddsInit(Kjson* kjP, DdsOperationMode _ddsOpMode) #endif } - KT_T(StDds, "Calling init_dds_enabler"); + KT_T(StDds, "Calling init_dds_enabler('%s')", ddsEnablerConfigFile); eprosima::ddsenabler::init_dds_enabler(ddsEnablerConfigFile, ddsNotification, ddsTypeNotification, ddsLog); return 0; diff --git a/test/functionalTest/cases/0000_dds/dds_notifications.test b/test/functionalTest/cases/0000_dds/dds_notifications.test index 8b4a935d0a..1a8dce2f59 100644 --- a/test/functionalTest/cases/0000_dds/dds_notifications.test +++ b/test/functionalTest/cases/0000_dds/dds_notifications.test @@ -52,7 +52,9 @@ ftClientStart -t 0-5000 # 02. Ask FT to publish an entity urn:E2 on topic 'P2' # 03. Ask FT to publish an entity urn:E3 on topic 'P3' # 04. Ask FT to publish an entity urn:E4 on topic 'P4' -# 05. Query the broker for all its entities, see all three (urn:ngsi-ld:camera:cam1, urn:ngsi-ld:arm:arm1, and the default entity)) +# 05. Query the broker for all its entities, see all three (urn:ngsi-ld:camera:cam1, urn:ngsi-ld:arm:arm1, and the default entity)) +# +# Later: # 06. Kill the broker and empty its databae, then restart the broker again # 07. Query the broker for all its entities, see all three - should be present due to the DDS discovery # @@ -106,21 +108,21 @@ echo echo -echo "06. Kill the broker and empty its database, then restart the broker again" -echo "=========================================================================" -brokerStop -dbInit CB > /dev/null -orionldStart CB -mongocOnly -dds -ddsConfigFile /tmp/ddsConfig > /dev/null -echo Orion-LD is running again -echo -echo +# echo "06. Kill the broker and empty its database, then restart the broker again" +# echo "=========================================================================" +# brokerStop +# dbInit CB > /dev/null +# orionldStart CB -mongocOnly -dds -ddsConfigFile /tmp/ddsConfig > /dev/null +# echo Orion-LD is running again +# echo +# echo -echo "07. Query the broker for all its entities, see all three - should be present due to the DDS discovery " -echo "======================================================================================================" -orionCurl --url /ngsi-ld/v1/entities?local=true -echo -echo +# echo "07. Query the broker for all its entities, see all three - should be present due to the DDS discovery " +# echo "======================================================================================================" +# orionCurl --url /ngsi-ld/v1/entities?local=true +# echo +# echo --REGEXPECT-- @@ -292,151 +294,6 @@ Link: create_datawriter(topic_, wqos, &listener_); if (writer_ == nullptr)