Skip to content

Commit

Permalink
Merge pull request #1694 from FIWARE/dds/wip
Browse files Browse the repository at this point in the history
Dds/wip
  • Loading branch information
kzangeli authored Oct 14, 2024
2 parents a2fa13f + 6f4336e commit 4c0c66d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 17 deletions.
2 changes: 1 addition & 1 deletion CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#1682: Default User Context

## New Features:
* Native support for DDS
* Native support for DDS (off by default - to activate use CLI: -wip dds)
* Distributed subscriptions: subordinate subscriptions are DELETED when their "father" is deleted.
* Support for the URL parameter 'csf' in GET /ngsi-ld/v1/csourceRegistrations
* Support for the URL parameter 'orderBy' (must be an attribute) in GET /ngsi-ld/v1/entities, but only if 'local' is set. (This is not NGSI-LD standard. Yet ...)
Expand Down
10 changes: 2 additions & 8 deletions src/app/orionld/orionld.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,6 @@ bool noArrayReduction = false;
char subordinateEndpoint[256];
char defaultUserContextUrl[256];
bool ddsSupport = false;
char ddsSubsTopics[512];
char ddsTopicType[512];
char configFile[512];


Expand Down Expand Up @@ -349,9 +347,6 @@ char configFile[512];
#define CORE_CONTEXT_DESC "core context version (v1.0|v1.3|v1.4|v1.5|v1.6|v1.7) - v1.6 is default"
#define NO_PROM_DESC "run without Prometheus metrics"
#define NO_ARR_REDUCT_DESC "skip JSON-LD Array Reduction"
#define USE_DDS_DESC "turn on DDS support"
#define DDS_SUBS_TOPICS_DESC "topics to subscribe to on DDS"
#define DDS_TOPIC_TYPE_DESC "DDS topic type"
#define CONFIG_FILE_DESC "Path to configuration file"
#define SUBORDINATE_ENDPOINT_DESC "endpoint URL for reception of notificatiopns from subordinate subscriptions (distributed subscriptions)"
#define PAGE_SIZE_DESC "default page size (no of entities, subscriptions, registrations)"
Expand Down Expand Up @@ -462,9 +457,6 @@ PaArgument paArgs[] =
{ "-noArrayReduction", &noArrayReduction, "NO_ARRAY_REDUCTION", PaBool, PaHid, false, false, true, NO_ARR_REDUCT_DESC },
{ "-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 },
{ "-configFile", configFile, "CONFIG_FILE", PaString, PaOpt, _i "", PaNL, PaNL, CONFIG_FILE_DESC },
{ "-duc", defaultUserContextUrl, "DUC_URL", PaString, PaOpt, _i "", PaNL, PaNL, DUC_URL_DESC },

Expand Down Expand Up @@ -1129,6 +1121,8 @@ int main(int argC, char* argV[])
entityMapsEnabled = true;
else if (strcmp(wipV[ix], "distSubs") == 0)
distSubsEnabled = true;
else if (strcmp(wipV[ix], "dds") == 0)
ddsSupport = true;
else
LM_X(1, ("Invalid value for -wip comma-separated list (allowed: 'entityMaps', 'distSubs')"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ Usage: orionld [option '-U' (extended usage)]
[option '-brokerId' <identity of this broker instance for registrations - for the Via header>]
[option '-subordinateEndpoint' <endpoint URL for reception of notificatiopns from subordinate subscriptions (distributed subscriptions)>]
[option '-pageSize' <default page size (no of entities, subscriptions, registrations)>]
[option '-dds' (turn on DDS support)]
[option '-ddsSubsTopics' <topics to subscribe to on DDS>]
[option '-ddsTopicType' <DDS topic type>]
[option '-configFile' <Path to configuration file>]
[option '-duc' <URL to default user context>]

Expand Down
3 changes: 0 additions & 3 deletions test/functionalTest/cases/0000_cli/command_line_options.test
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,6 @@ Usage: orionld [option '-U' (extended usage)]
[option '-brokerId' <identity of this broker instance for registrations - for the Via header>]
[option '-subordinateEndpoint' <endpoint URL for reception of notificatiopns from subordinate subscriptions (distributed subscriptions)>]
[option '-pageSize' <default page size (no of entities, subscriptions, registrations)>]
[option '-dds' (turn on DDS support)]
[option '-ddsSubsTopics' <topics to subscribe to on DDS>]
[option '-ddsTopicType' <DDS topic type>]
[option '-configFile' <Path to configuration file>]
[option '-duc' <URL to default user context>]

Expand Down
4 changes: 2 additions & 2 deletions test/functionalTest/cases/0000_dds/dds_notifications.test
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ the test client publishes on DDS, the broker receives DDS notifications and crea
$REPO_HOME/scripts/configFile.sh "P1,Camera,urn:ngsi-ld:camera:cam1,shutterSpeed" "P2,Arm,urn:ngsi-ld:arm:arm1,armReach" > $HOME/.orionld
$REPO_HOME/scripts/configFile.sh "P1,Camera,urn:ngsi-ld:camera:cam1,shutterSpeed" "P2,Arm,urn:ngsi-ld:arm:arm1,armReach" > $HOME/.ftClient
dbInit CB
orionldStart CB -mongocOnly -dds
orionldStart CB -mongocOnly -wip dds
ftClientStart -t 0-5000

--SHELL--
Expand Down Expand Up @@ -97,7 +97,7 @@ echo
# echo "========================================================================="
# brokerStop
# dbInit CB > /dev/null
# orionldStart CB -mongocOnly -dds -ddsConfigFile /tmp/ddsConfig > /dev/null
# orionldStart CB -mongocOnly -wip dds -ddsConfigFile /tmp/ddsConfig > /dev/null
# echo Orion-LD is running again
# echo
# echo
Expand Down

0 comments on commit 4c0c66d

Please sign in to comment.