diff --git a/src/app/orionld/orionld.cpp b/src/app/orionld/orionld.cpp index b31833cef3..cbb0217e92 100644 --- a/src/app/orionld/orionld.cpp +++ b/src/app/orionld/orionld.cpp @@ -252,6 +252,7 @@ bool noArrayReduction = false; bool ddsSupport = false; char ddsSubsTopics[512]; char ddsTopicType[512]; +char ddsConfigFile[512]; @@ -349,6 +350,7 @@ char ddsTopicType[512]; #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 DDS_CONFIG_FILE_DESC "DDS configuration file" @@ -360,6 +362,7 @@ char ddsTopicType[512]; +#define DDS_CONF_FILE "src/app/orionld/.ddsConfig" /* **************************************************************************** * * paArgs - option vector for the Parse CLI arguments library @@ -373,90 +376,91 @@ PaArgument paArgs[] = { { "-coreContext", coreContextVersion, "CORE_CONTEXT", PaString, PaOpt, _i ORIONLD_CORE_CONTEXT_URL_DEFAULT, PaNL, PaNL, CORE_CONTEXT_DESC }, - { "-fg", &fg, "FOREGROUND", PaBool, PaOpt, false, false, true, FG_DESC }, - { "-localIp", bindAddress, "LOCALIP", PaString, PaOpt, IP_ALL, PaNL, PaNL, LOCALIP_DESC }, - { "-port", &port, "PORT", PaInt, PaOpt, 1026, 1024, 65535, PORT_DESC }, - { "-pidpath", pidPath, "PID_PATH", PaString, PaOpt, PIDPATH, PaNL, PaNL, PIDPATH_DESC }, - { "-dbhost", dbHost, "MONGO_HOST", PaString, PaOpt, LOCALHOST, PaNL, PaNL, DBHOST_DESC }, - { "-rplSet", rplSet, "MONGO_REPLICA_SET", PaString, PaOpt, _i "", PaNL, PaNL, RPLSET_DESC }, - { "-dbuser", dbUser, "MONGO_USER", PaString, PaOpt, _i "", PaNL, PaNL, DBUSER_DESC }, - { "-dbpwd", dbPwd, "MONGO_PASSWORD", PaString, PaOpt, _i "", PaNL, PaNL, DBPASSWORD_DESC }, - { "-dbAuthMech", dbAuthMechanism, "MONGO_AUTH_MECH", PaString, PaOpt, _i "", PaNL, PaNL, DBAUTHMECHANISM_DESC }, - { "-dbAuthDb", dbAuthDb, "MONGO_AUTH_SOURCE", PaString, PaOpt, _i "", PaNL, PaNL, DBAUTHDB_DESC }, - { "-dbSSL", &dbSSL, "MONGO_SSL", PaBool, PaOpt, false, false, true, DBSSL_DESC }, - { "-dbCertFile", &dbCertFile, "MONGO_CERT_FILE", PaString, PaOpt, _i "", PaNL, PaNL, DBCERTFILE_DESC }, - { "-dbURI", &dbURI, "MONGO_URI", PaString, PaOpt, _i "", PaNL, PaNL, DBURI_DESC }, - { "-db", dbName, "MONGO_DB", PaString, PaOpt, _i "orion", PaNL, PaNL, DB_DESC }, - { "-dbTimeout", &dbTimeout, "MONGO_TIMEOUT", PaDouble, PaOpt, 10000, PaNL, PaNL, DB_TMO_DESC }, - { "-dbPoolSize", &dbPoolSize, "MONGO_POOL_SIZE", PaInt, PaOpt, 10, 1, 10000, DBPS_DESC }, - { "-writeConcern", &writeConcern, "MONGO_WRITE_CONCERN", PaInt, PaOpt, 1, 0, 1, WRITE_CONCERN_DESC }, - { "-ipv4", &useOnlyIPv4, "USEIPV4", PaBool, PaOpt, false, false, true, USEIPV4_DESC }, - { "-ipv6", &useOnlyIPv6, "USEIPV6", PaBool, PaOpt, false, false, true, USEIPV6_DESC }, - { "-https", &https, "HTTPS", PaBool, PaOpt, false, false, true, HTTPS_DESC }, - { "-key", httpsKeyFile, "HTTPS_KEYFILE", PaString, PaOpt, _i "", PaNL, PaNL, HTTPSKEYFILE_DESC }, - { "-cert", httpsCertFile, "HTTPS_CERTFILE", PaString, PaOpt, _i "", PaNL, PaNL, HTTPSCERTFILE_DESC }, - { "-multiservice", &multitenancy, "MULTI_SERVICE", PaBool, PaOpt, false, false, true, MULTISERVICE_DESC }, - { "-httpTimeout", &httpTimeout, "HTTP_TIMEOUT", PaLong, PaOpt, -1, -1, MAX_L, HTTP_TMO_DESC }, - { "-reqTimeout", &reqTimeout, "REQ_TIMEOUT", PaLong, PaOpt, 0, 0, PaNL, REQ_TMO_DESC }, - { "-reqMutexPolicy", reqMutexPolicy, "MUTEX_POLICY", PaString, PaOpt, _i "none", PaNL, PaNL, MUTEX_POLICY_DESC }, - { "-corsOrigin", allowedOrigin, "CORS_ALLOWED_ORIGIN", PaString, PaOpt, _i "", PaNL, PaNL, ALLOWED_ORIGIN_DESC }, - { "-corsMaxAge", &maxAge, "CORS_MAX_AGE", PaInt, PaOpt, 86400, -1, 86400, CORS_MAX_AGE_DESC }, - { "-cprForwardLimit", &cprForwardLimit, "CPR_FORWARD_LIMIT", PaUInt, PaOpt, 1000, 0, UINT_MAX, CPR_FORWARD_LIMIT_DESC }, - { "-subCacheIval", &subCacheInterval, "SUBCACHE_IVAL", PaInt, PaOpt, 0, 0, 3600, SUB_CACHE_IVAL_DESC }, - { "-subCacheFlushIval", &subCacheFlushInterval, "SUBCACHE_FLUSH_IVAL", PaInt, PaOpt, 10, 0, 3600, SUB_CACHE_FLUSH_IVAL_DESC }, - { "-noCache", &noCache, "NOCACHE", PaBool, PaOpt, false, false, true, NO_CACHE }, - { "-connectionMemory", &connectionMemory, "CONN_MEMORY", PaUInt, PaOpt, 64, 0, 1024, CONN_MEMORY_DESC }, - { "-maxConnections", &maxConnections, "MAX_CONN", PaUInt, PaOpt, 1020, 1, PaNL, MAX_CONN_DESC }, - { "-reqPoolSize", &reqPoolSize, "TRQ_POOL_SIZE", PaUInt, PaOpt, 0, 0, 1024, REQ_POOL_SIZE }, - - { "-inReqPayloadMaxSize", &inReqPayloadMaxSize, "IN_REQ_PAYLOAD_MAX_SIZE", PaULong, PaOpt, MB(1), 0, PaNL, IN_REQ_PAYLOAD_MAX_SIZE_DESC }, - { "-outReqMsgMaxSize", &outReqMsgMaxSize, "OUT_REQ_MSG_MAX_SIZE", PaULong, PaOpt, MB(8), 0, PaNL, OUT_REQ_MSG_MAX_SIZE_DESC }, - { "-notificationMode", ¬ificationMode, "NOTIF_MODE", PaString, PaOpt, _i "transient", PaNL, PaNL, NOTIFICATION_MODE_DESC }, - { "-simulatedNotification", &simulatedNotification, "DROP_NOTIF", PaBool, PaOpt, false, false, true, SIMULATED_NOTIF_DESC }, - { "-statCounters", &statCounters, "STAT_COUNTERS", PaBool, PaOpt, false, false, true, STAT_COUNTERS }, - { "-statSemWait", &statSemWait, "STAT_SEM_WAIT", PaBool, PaOpt, false, false, true, STAT_SEM_WAIT }, - { "-statTiming", &statTiming, "STAT_TIMING", PaBool, PaOpt, false, false, true, STAT_TIMING }, - { "-statNotifQueue", &statNotifQueue, "STAT_NOTIF_QUEUE", PaBool, PaOpt, false, false, true, STAT_NOTIF_QUEUE }, - { "-logSummary", &lsPeriod, "LOG_SUMMARY_PERIOD", PaInt, PaOpt, 0, 0, ONE_MONTH_PERIOD, LOG_SUMMARY_DESC }, - { "-relogAlarms", &relogAlarms, "RELOG_ALARMS", PaBool, PaOpt, false, false, true, RELOGALARMS_DESC }, - { "-strictNgsiv1Ids", &strictIdv1, "CHECK_ID_V1", PaBool, PaOpt, false, false, true, CHECK_v1_ID_DESC }, - { "-disableCustomNotifications", &disableCusNotif, "DISABLE_CUSTOM_NOTIF", PaBool, PaOpt, false, false, true, DISABLE_CUSTOM_NOTIF }, - { "-logForHumans", &logForHumans, "LOG_FOR_HUMANS", PaBool, PaOpt, false, false, true, LOG_FOR_HUMANS_DESC }, - { "-disableFileLog", &disableFileLog, "DISABLE_FILE_LOG", PaBool, PaOpt, false, false, true, DISABLE_FILE_LOG }, - { "-disableMetrics", &disableMetrics, "DISABLE_METRICS", PaBool, PaOpt, false, false, true, METRICS_DESC }, - { "-insecureNotif", &insecureNotif, "INSECURE_NOTIF", PaBool, PaOpt, false, false, true, INSECURE_NOTIF }, - { "-ngsiv1Autocast", &ngsiv1Autocast, "NGSIV1_AUTOCAST", PaBool, PaOpt, false, false, true, NGSIV1_AUTOCAST }, - { "-ctxTimeout", &contextDownloadTimeout, "CONTEXT_DOWNLOAD_TIMEOUT", PaInt, PaOpt, 5000, 0, 20000, CTX_TMO_DESC }, - { "-ctxAttempts", &contextDownloadAttempts, "CONTEXT_DOWNLOAD_ATTEMPTS", PaInt, PaOpt, 3, 0, 100, CTX_ATT_DESC }, - { "-pernot", &pernot, "PERNOT", PaBool, PaOpt, false, false, true, PERNOT_DESC }, - { "-troe", &troe, "TROE", PaBool, PaOpt, false, false, true, TROE_DESC }, - { "-troeHost", troeHost, "TROE_HOST", PaString, PaOpt, _i "localhost", PaNL, PaNL, TROE_HOST_DESC }, - { "-troePort", &troePort, "TROE_PORT", PaInt, PaOpt, 5432, PaNL, PaNL, TROE_PORT_DESC }, - { "-troeUser", troeUser, "TROE_USER", PaString, PaOpt, _i "postgres", PaNL, PaNL, TROE_HOST_USER }, - { "-troePwd", troePwd, "TROE_PWD", PaString, PaOpt, _i "password", PaNL, PaNL, TROE_HOST_PWD }, - { "-troePoolSize", &troePoolSize, "TROE_POOL_SIZE", PaInt, PaOpt, 10, 0, 1000, TROE_POOL_DESC }, - { "-noNotifyFalseUpdate", &noNotifyFalseUpdate, "NO_NOTIFY_FALSE_UPDATE", PaBool, PaOpt, false, false, true, NO_NOTIFY_FALSE_UPDATE_DESC }, - { "-experimental", &experimental, "EXPERIMENTAL", PaBool, PaOpt, false, false, true, EXPERIMENTAL_DESC }, - { "-mongocOnly", &mongocOnly, "MONGOCONLY", PaBool, PaOpt, false, false, true, MONGOCONLY_DESC }, - { "-cSubCounters", &cSubCounters, "CSUB_COUNTERS", PaInt, PaOpt, 20, 0, PaNL, CSUBCOUNTERS_DESC }, - { "-distributed", &distributed, "DISTRIBUTED", PaBool, PaOpt, false, false, true, DISTRIBUTED_DESC }, - { "-brokerId", &brokerId, "BROKER_ID", PaStr, PaOpt, _i "", PaNL, PaNL, BROKER_ID_DESC }, - { "-wip", wip, "WIP", PaStr, PaHid, _i "", PaNL, PaNL, WIP_DESC }, - { "-triggerOperation", &triggerOperation, "TRIGGER_OPERATION", PaBool, PaHid, false, false, true, TRIGGER_OPERATION_DESC }, - { "-forwarding", &distributed, "FORWARDING", PaBool, PaHid, false, false, true, FORWARDING_DESC }, - { "-socketService", &socketService, "SOCKET_SERVICE", PaBool, PaHid, false, false, true, SOCKET_SERVICE_DESC }, - { "-ssPort", &socketServicePort, "SOCKET_SERVICE_PORT", PaUShort, PaHid, 1027, PaNL, PaNL, SOCKET_SERVICE_PORT_DESC }, - { "-harakiri", &harakiri, "HARAKIRI", PaBool, PaHid, false, false, true, HARAKIRI_DESC }, - { "-idIndex", &idIndex, "MONGO_ID_INDEX", PaBool, PaHid, false, false, true, ID_INDEX_DESC }, - { "-noswap", &noswap, "NOSWAP", PaBool, PaHid, false, false, true, NOSWAP_DESC }, - { "-lmtmp", &lmtmp, "TMP_TRACES", PaBool, PaHid, true, false, true, TMPTRACES_DESC }, - { "-debugCurl", &debugCurl, "DEBUG_CURL", PaBool, PaHid, false, false, true, DEBUG_CURL_DESC }, - { "-lmtmp", &lmtmp, "TMP_TRACES", PaBool, PaHid, true, false, true, TMPTRACES_DESC }, - { "-noprom", &noprom, "NO_PROM", PaBool, PaHid, false, false, true, NO_PROM_DESC }, - { "-noArrayReduction", &noArrayReduction, "NO_ARRAY_REDUCTION", PaBool, PaHid, false, false, true, NO_ARR_REDUCT_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 }, + { "-fg", &fg, "FOREGROUND", PaBool, PaOpt, false, false, true, FG_DESC }, + { "-localIp", bindAddress, "LOCALIP", PaString, PaOpt, IP_ALL, PaNL, PaNL, LOCALIP_DESC }, + { "-port", &port, "PORT", PaInt, PaOpt, 1026, 1024, 65535, PORT_DESC }, + { "-pidpath", pidPath, "PID_PATH", PaString, PaOpt, PIDPATH, PaNL, PaNL, PIDPATH_DESC }, + { "-dbhost", dbHost, "MONGO_HOST", PaString, PaOpt, LOCALHOST, PaNL, PaNL, DBHOST_DESC }, + { "-rplSet", rplSet, "MONGO_REPLICA_SET", PaString, PaOpt, _i "", PaNL, PaNL, RPLSET_DESC }, + { "-dbuser", dbUser, "MONGO_USER", PaString, PaOpt, _i "", PaNL, PaNL, DBUSER_DESC }, + { "-dbpwd", dbPwd, "MONGO_PASSWORD", PaString, PaOpt, _i "", PaNL, PaNL, DBPASSWORD_DESC }, + { "-dbAuthMech", dbAuthMechanism, "MONGO_AUTH_MECH", PaString, PaOpt, _i "", PaNL, PaNL, DBAUTHMECHANISM_DESC }, + { "-dbAuthDb", dbAuthDb, "MONGO_AUTH_SOURCE", PaString, PaOpt, _i "", PaNL, PaNL, DBAUTHDB_DESC }, + { "-dbSSL", &dbSSL, "MONGO_SSL", PaBool, PaOpt, false, false, true, DBSSL_DESC }, + { "-dbCertFile", &dbCertFile, "MONGO_CERT_FILE", PaString, PaOpt, _i "", PaNL, PaNL, DBCERTFILE_DESC }, + { "-dbURI", &dbURI, "MONGO_URI", PaString, PaOpt, _i "", PaNL, PaNL, DBURI_DESC }, + { "-db", dbName, "MONGO_DB", PaString, PaOpt, _i "orion", PaNL, PaNL, DB_DESC }, + { "-dbTimeout", &dbTimeout, "MONGO_TIMEOUT", PaDouble, PaOpt, 10000, PaNL, PaNL, DB_TMO_DESC }, + { "-dbPoolSize", &dbPoolSize, "MONGO_POOL_SIZE", PaInt, PaOpt, 10, 1, 10000, DBPS_DESC }, + { "-writeConcern", &writeConcern, "MONGO_WRITE_CONCERN", PaInt, PaOpt, 1, 0, 1, WRITE_CONCERN_DESC }, + { "-ipv4", &useOnlyIPv4, "USEIPV4", PaBool, PaOpt, false, false, true, USEIPV4_DESC }, + { "-ipv6", &useOnlyIPv6, "USEIPV6", PaBool, PaOpt, false, false, true, USEIPV6_DESC }, + { "-https", &https, "HTTPS", PaBool, PaOpt, false, false, true, HTTPS_DESC }, + { "-key", httpsKeyFile, "HTTPS_KEYFILE", PaString, PaOpt, _i "", PaNL, PaNL, HTTPSKEYFILE_DESC }, + { "-cert", httpsCertFile, "HTTPS_CERTFILE", PaString, PaOpt, _i "", PaNL, PaNL, HTTPSCERTFILE_DESC }, + { "-multiservice", &multitenancy, "MULTI_SERVICE", PaBool, PaOpt, false, false, true, MULTISERVICE_DESC }, + { "-httpTimeout", &httpTimeout, "HTTP_TIMEOUT", PaLong, PaOpt, -1, -1, MAX_L, HTTP_TMO_DESC }, + { "-reqTimeout", &reqTimeout, "REQ_TIMEOUT", PaLong, PaOpt, 0, 0, PaNL, REQ_TMO_DESC }, + { "-reqMutexPolicy", reqMutexPolicy, "MUTEX_POLICY", PaString, PaOpt, _i "none", PaNL, PaNL, MUTEX_POLICY_DESC }, + { "-corsOrigin", allowedOrigin, "CORS_ALLOWED_ORIGIN", PaString, PaOpt, _i "", PaNL, PaNL, ALLOWED_ORIGIN_DESC }, + { "-corsMaxAge", &maxAge, "CORS_MAX_AGE", PaInt, PaOpt, 86400, -1, 86400, CORS_MAX_AGE_DESC }, + { "-cprForwardLimit", &cprForwardLimit, "CPR_FORWARD_LIMIT", PaUInt, PaOpt, 1000, 0, UINT_MAX, CPR_FORWARD_LIMIT_DESC }, + { "-subCacheIval", &subCacheInterval, "SUBCACHE_IVAL", PaInt, PaOpt, 0, 0, 3600, SUB_CACHE_IVAL_DESC }, + { "-subCacheFlushIval", &subCacheFlushInterval, "SUBCACHE_FLUSH_IVAL", PaInt, PaOpt, 10, 0, 3600, SUB_CACHE_FLUSH_IVAL_DESC }, + { "-noCache", &noCache, "NOCACHE", PaBool, PaOpt, false, false, true, NO_CACHE }, + { "-connectionMemory", &connectionMemory, "CONN_MEMORY", PaUInt, PaOpt, 64, 0, 1024, CONN_MEMORY_DESC }, + { "-maxConnections", &maxConnections, "MAX_CONN", PaUInt, PaOpt, 1020, 1, PaNL, MAX_CONN_DESC }, + { "-reqPoolSize", &reqPoolSize, "TRQ_POOL_SIZE", PaUInt, PaOpt, 0, 0, 1024, REQ_POOL_SIZE }, + + { "-inReqPayloadMaxSize", &inReqPayloadMaxSize, "IN_REQ_PAYLOAD_MAX_SIZE", PaULong, PaOpt, MB(1), 0, PaNL, IN_REQ_PAYLOAD_MAX_SIZE_DESC }, + { "-outReqMsgMaxSize", &outReqMsgMaxSize, "OUT_REQ_MSG_MAX_SIZE", PaULong, PaOpt, MB(8), 0, PaNL, OUT_REQ_MSG_MAX_SIZE_DESC }, + { "-notificationMode", ¬ificationMode, "NOTIF_MODE", PaString, PaOpt, _i "transient", PaNL, PaNL, NOTIFICATION_MODE_DESC }, + { "-simulatedNotification", &simulatedNotification, "DROP_NOTIF", PaBool, PaOpt, false, false, true, SIMULATED_NOTIF_DESC }, + { "-statCounters", &statCounters, "STAT_COUNTERS", PaBool, PaOpt, false, false, true, STAT_COUNTERS }, + { "-statSemWait", &statSemWait, "STAT_SEM_WAIT", PaBool, PaOpt, false, false, true, STAT_SEM_WAIT }, + { "-statTiming", &statTiming, "STAT_TIMING", PaBool, PaOpt, false, false, true, STAT_TIMING }, + { "-statNotifQueue", &statNotifQueue, "STAT_NOTIF_QUEUE", PaBool, PaOpt, false, false, true, STAT_NOTIF_QUEUE }, + { "-logSummary", &lsPeriod, "LOG_SUMMARY_PERIOD", PaInt, PaOpt, 0, 0, ONE_MONTH_PERIOD, LOG_SUMMARY_DESC }, + { "-relogAlarms", &relogAlarms, "RELOG_ALARMS", PaBool, PaOpt, false, false, true, RELOGALARMS_DESC }, + { "-strictNgsiv1Ids", &strictIdv1, "CHECK_ID_V1", PaBool, PaOpt, false, false, true, CHECK_v1_ID_DESC }, + { "-disableCustomNotifications", &disableCusNotif, "DISABLE_CUSTOM_NOTIF", PaBool, PaOpt, false, false, true, DISABLE_CUSTOM_NOTIF }, + { "-logForHumans", &logForHumans, "LOG_FOR_HUMANS", PaBool, PaOpt, false, false, true, LOG_FOR_HUMANS_DESC }, + { "-disableFileLog", &disableFileLog, "DISABLE_FILE_LOG", PaBool, PaOpt, false, false, true, DISABLE_FILE_LOG }, + { "-disableMetrics", &disableMetrics, "DISABLE_METRICS", PaBool, PaOpt, false, false, true, METRICS_DESC }, + { "-insecureNotif", &insecureNotif, "INSECURE_NOTIF", PaBool, PaOpt, false, false, true, INSECURE_NOTIF }, + { "-ngsiv1Autocast", &ngsiv1Autocast, "NGSIV1_AUTOCAST", PaBool, PaOpt, false, false, true, NGSIV1_AUTOCAST }, + { "-ctxTimeout", &contextDownloadTimeout, "CONTEXT_DOWNLOAD_TIMEOUT", PaInt, PaOpt, 5000, 0, 20000, CTX_TMO_DESC }, + { "-ctxAttempts", &contextDownloadAttempts, "CONTEXT_DOWNLOAD_ATTEMPTS", PaInt, PaOpt, 3, 0, 100, CTX_ATT_DESC }, + { "-pernot", &pernot, "PERNOT", PaBool, PaOpt, false, false, true, PERNOT_DESC }, + { "-troe", &troe, "TROE", PaBool, PaOpt, false, false, true, TROE_DESC }, + { "-troeHost", troeHost, "TROE_HOST", PaString, PaOpt, _i "localhost", PaNL, PaNL, TROE_HOST_DESC }, + { "-troePort", &troePort, "TROE_PORT", PaInt, PaOpt, 5432, PaNL, PaNL, TROE_PORT_DESC }, + { "-troeUser", troeUser, "TROE_USER", PaString, PaOpt, _i "postgres", PaNL, PaNL, TROE_HOST_USER }, + { "-troePwd", troePwd, "TROE_PWD", PaString, PaOpt, _i "password", PaNL, PaNL, TROE_HOST_PWD }, + { "-troePoolSize", &troePoolSize, "TROE_POOL_SIZE", PaInt, PaOpt, 10, 0, 1000, TROE_POOL_DESC }, + { "-noNotifyFalseUpdate", &noNotifyFalseUpdate, "NO_NOTIFY_FALSE_UPDATE", PaBool, PaOpt, false, false, true, NO_NOTIFY_FALSE_UPDATE_DESC }, + { "-experimental", &experimental, "EXPERIMENTAL", PaBool, PaOpt, false, false, true, EXPERIMENTAL_DESC }, + { "-mongocOnly", &mongocOnly, "MONGOCONLY", PaBool, PaOpt, false, false, true, MONGOCONLY_DESC }, + { "-cSubCounters", &cSubCounters, "CSUB_COUNTERS", PaInt, PaOpt, 20, 0, PaNL, CSUBCOUNTERS_DESC }, + { "-distributed", &distributed, "DISTRIBUTED", PaBool, PaOpt, false, false, true, DISTRIBUTED_DESC }, + { "-brokerId", &brokerId, "BROKER_ID", PaStr, PaOpt, _i "", PaNL, PaNL, BROKER_ID_DESC }, + { "-wip", wip, "WIP", PaStr, PaHid, _i "", PaNL, PaNL, WIP_DESC }, + { "-triggerOperation", &triggerOperation, "TRIGGER_OPERATION", PaBool, PaHid, false, false, true, TRIGGER_OPERATION_DESC }, + { "-forwarding", &distributed, "FORWARDING", PaBool, PaHid, false, false, true, FORWARDING_DESC }, + { "-socketService", &socketService, "SOCKET_SERVICE", PaBool, PaHid, false, false, true, SOCKET_SERVICE_DESC }, + { "-ssPort", &socketServicePort, "SOCKET_SERVICE_PORT", PaUShort, PaHid, 1027, PaNL, PaNL, SOCKET_SERVICE_PORT_DESC }, + { "-harakiri", &harakiri, "HARAKIRI", PaBool, PaHid, false, false, true, HARAKIRI_DESC }, + { "-idIndex", &idIndex, "MONGO_ID_INDEX", PaBool, PaHid, false, false, true, ID_INDEX_DESC }, + { "-noswap", &noswap, "NOSWAP", PaBool, PaHid, false, false, true, NOSWAP_DESC }, + { "-lmtmp", &lmtmp, "TMP_TRACES", PaBool, PaHid, true, false, true, TMPTRACES_DESC }, + { "-debugCurl", &debugCurl, "DEBUG_CURL", PaBool, PaHid, false, false, true, DEBUG_CURL_DESC }, + { "-lmtmp", &lmtmp, "TMP_TRACES", PaBool, PaHid, true, false, true, TMPTRACES_DESC }, + { "-noprom", &noprom, "NO_PROM", PaBool, PaHid, false, false, true, NO_PROM_DESC }, + { "-noArrayReduction", &noArrayReduction, "NO_ARRAY_REDUCTION", PaBool, PaHid, false, false, true, NO_ARR_REDUCT_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 DDS_CONF_FILE, PaNL, PaNL, DDS_CONFIG_FILE_DESC }, PA_END_OF_ARGS }; @@ -1424,7 +1428,7 @@ int main(int argC, char* argV[]) pernotLoopStart(); if (ddsSupport == true) - ddsInit(ddsTopicType, ddsSubsTopics, DDSOpModeDefault); + ddsInit(kjsonP, ddsConfigFile, ddsTopicType, ddsSubsTopics, DDSOpModeDefault); if (socketService == true) { diff --git a/src/lib/orionld/common/traceLevels.h b/src/lib/orionld/common/traceLevels.h index 4ff094d200..039eca8b37 100644 --- a/src/lib/orionld/common/traceLevels.h +++ b/src/lib/orionld/common/traceLevels.h @@ -39,7 +39,8 @@ typedef enum OrionldTraceLevels StDds = 201, StDdsPublish = 202, StDump = 203, - StDdsDump = 204 + StDdsDump = 204, + StDdsConfig = 205 } OrionldTraceLevels; #endif // SRC_LIB_ORIONLD_COMMON_TRACELEVELS_H_ diff --git a/src/lib/orionld/dds/CMakeLists.txt b/src/lib/orionld/dds/CMakeLists.txt index c1f6a2709d..67af1f3c24 100644 --- a/src/lib/orionld/dds/CMakeLists.txt +++ b/src/lib/orionld/dds/CMakeLists.txt @@ -32,6 +32,8 @@ SET (SOURCES ddsNotification.cpp ddsInit.cpp kjTreeLog.cpp + ddsConfigTopicToAttribute.cpp + ddsConfigLoad.cpp ) # Include directories diff --git a/src/lib/orionld/dds/ddsConfigLoad.cpp b/src/lib/orionld/dds/ddsConfigLoad.cpp new file mode 100644 index 0000000000..5501e2f650 --- /dev/null +++ b/src/lib/orionld/dds/ddsConfigLoad.cpp @@ -0,0 +1,55 @@ +/* +* +* Copyright 2024 FIWARE Foundation e.V. +* +* This file is part of Orion-LD Context Broker. +* +* Orion-LD Context Broker is free software: you can redistribute it and/or +* modify it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* Orion-LD Context Broker is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero +* General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with Orion-LD Context Broker. If not, see http://www.gnu.org/licenses/. +* +* For those usages not covered by this license please contact with +* orionld at fiware dot org +* +* Author: Ken Zangelin +*/ +extern "C" +{ +#include "kbase/kFileRead.h" // kFileRead +#include "kjson/kjson.h" // Kjson +#include "kjson/kjParse.h" // kjParse +#include "ktrace/kTrace.h" // trace messages - ktrace library +} + +#include "orionld/dds/ddsConfigLoad.h" // Own interface + + + +KjNode* ddsConfigTree = NULL; +// ----------------------------------------------------------------------------- +// +// ddsConfigLoad - +// +int ddsConfigLoad(Kjson* kjP, const char* configFile) +{ + char* buf = NULL; + int bufLen = 0; + + if (kFileRead((char*) "", (char*) configFile, &buf, &bufLen) != 0) + KT_RE(1, ("Error reading the DDS configuration file")); + + ddsConfigTree = kjParse(kjP, buf); + if (ddsConfigTree == NULL) + KT_RE(1, ("Error parsing the DDS configuration file")); + + return 0; +} diff --git a/src/lib/orionld/dds/ddsConfigLoad.h b/src/lib/orionld/dds/ddsConfigLoad.h new file mode 100644 index 0000000000..65480c402c --- /dev/null +++ b/src/lib/orionld/dds/ddsConfigLoad.h @@ -0,0 +1,41 @@ +#ifndef SRC_LIB_ORIONLD_DDS_DDSCONFIGLOAD_H_ +#define SRC_LIB_ORIONLD_DDS_DDSCONFIGLOAD_H_ + +/* +* +* Copyright 2024 FIWARE Foundation e.V. +* +* This file is part of Orion-LD Context Broker. +* +* Orion-LD Context Broker is free software: you can redistribute it and/or +* modify it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* Orion-LD Context Broker is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero +* General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with Orion-LD Context Broker. If not, see http://www.gnu.org/licenses/. +* +* For those usages not covered by this license please contact with +* orionld at fiware dot org +* +* Author: Ken Zangelin +*/ +extern "C" +{ +#include "kjson/kjson.h" // Kjson +} + + + +// ----------------------------------------------------------------------------- +// +// ddsConfigLoad - +// +extern int ddsConfigLoad(Kjson* kjP, const char* configFile); + +#endif // SRC_LIB_ORIONLD_DDS_DDSCONFIGLOAD_H_ diff --git a/src/lib/orionld/dds/ddsConfigTopicToAttribute.cpp b/src/lib/orionld/dds/ddsConfigTopicToAttribute.cpp new file mode 100644 index 0000000000..378dedeee5 --- /dev/null +++ b/src/lib/orionld/dds/ddsConfigTopicToAttribute.cpp @@ -0,0 +1,82 @@ +/* +* +* Copyright 2024 FIWARE Foundation e.V. +* +* This file is part of Orion-LD Context Broker. +* +* Orion-LD Context Broker is free software: you can redistribute it and/or +* modify it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* Orion-LD Context Broker is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero +* General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with Orion-LD Context Broker. If not, see http://www.gnu.org/licenses/. +* +* For those usages not covered by this license please contact with +* orionld at fiware dot org +* +* Author: Ken Zangelin +*/ +extern "C" +{ +#include "kjson/KjNode.h" // KjNode +#include "kjson/kjLookup.h" // kjLookup +#include "ktrace/kTrace.h" // trace messages - ktrace library +} + +#include "orionld/common/orionldState.h" // ddsConfigTree +#include "orionld/kjTree/kjNavigate.h" // kjNavigate +#include "orionld/dds/ddsConfigTopicToAttribute.h" // Own interface + + + +// ----------------------------------------------------------------------------- +// +// ddsConfigTree - "hidden" external variable +// +// It's the KjNode tree of the DDS config file +// +extern KjNode* ddsConfigTree; // Better not to put this variable in any header file ... + + + +// ----------------------------------------------------------------------------- +// +// ddsConfigTopicToAttribute - +// +char* ddsConfigTopicToAttribute(const char* topic, char** entityIdPP, char** entityTypePP) +{ + if (ddsConfigTree == NULL) + return NULL; // No error - it's OK to not have a DDS Config File + + const char* path[3] = { "dds", "topics", NULL }; + static KjNode* topicsP = kjNavigate(ddsConfigTree, path, NULL, NULL); + KjNode* topicP = kjLookup(topicsP, topic); + + if (topicP == NULL) + KT_RE(NULL, "topic '%s' not found in DDS config file", topic); + + KjNode* attributeP = kjLookup(topicP, "attribute"); + + if (attributeP == NULL) + KT_RE(NULL, "topic '%s' without 'attribute' member in DDS config file", topic); + + if (entityIdPP != NULL) + { + KjNode* entityIdNodeP = kjLookup(topicP, "entityId"); + *entityIdPP = (entityIdNodeP != NULL)? entityIdNodeP->value.s : NULL; + } + + if (entityTypePP != NULL) + { + KjNode* entityTypeNodeP = kjLookup(topicP, "entityType"); + *entityTypePP = (entityTypeNodeP != NULL)? entityTypeNodeP->value.s : NULL; + } + + return attributeP->value.s; +} diff --git a/src/lib/orionld/dds/ddsConfigTopicToAttribute.h b/src/lib/orionld/dds/ddsConfigTopicToAttribute.h new file mode 100644 index 0000000000..973aba2f66 --- /dev/null +++ b/src/lib/orionld/dds/ddsConfigTopicToAttribute.h @@ -0,0 +1,37 @@ +#ifndef SRC_LIB_ORIONLD_DDS_DDSCONFIGTOPICTOATTRIBUTE_H_ +#define SRC_LIB_ORIONLD_DDS_DDSCONFIGTOPICTOATTRIBUTE_H_ + +/* +* +* Copyright 2024 FIWARE Foundation e.V. +* +* This file is part of Orion-LD Context Broker. +* +* Orion-LD Context Broker is free software: you can redistribute it and/or +* modify it under the terms of the GNU Affero General Public License as +* published by the Free Software Foundation, either version 3 of the +* License, or (at your option) any later version. +* +* Orion-LD Context Broker is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero +* General Public License for more details. +* +* You should have received a copy of the GNU Affero General Public License +* along with Orion-LD Context Broker. If not, see http://www.gnu.org/licenses/. +* +* For those usages not covered by this license please contact with +* orionld at fiware dot org +* +* Author: Ken Zangelin +*/ + + + +// ----------------------------------------------------------------------------- +// +// ddsConfigTopicToAttribute - +// +extern char* ddsConfigTopicToAttribute(const char* topic, char** entityIdPP, char** entityTypePP); + +#endif // SRC_LIB_ORIONLD_DDS_DDSCONFIGTOPICTOATTRIBUTE_H_ diff --git a/src/lib/orionld/dds/ddsInit.cpp b/src/lib/orionld/dds/ddsInit.cpp index f90014e8c8..374d9ba2e9 100644 --- a/src/lib/orionld/dds/ddsInit.cpp +++ b/src/lib/orionld/dds/ddsInit.cpp @@ -22,15 +22,23 @@ * * Author: Ken Zangelin */ +#include // access + extern "C" { #include "ktrace/kTrace.h" // trace messages - ktrace library #include "kbase/kStringSplit.h" // kStringSplit +#include "kjson/kjson.h" // Kjson +#include "kjson/KjNode.h" // KjNode } -#include "orionld/common/orionldState.h" // orionldState, kjTreeLog +#include "orionld/common/traceLevels.h" // kjTreeLog2 +#include "orionld/kjTree/kjNavigate.h" // kjNavigate #include "orionld/dds/ddsSubscribe.h" // ddsSubscribe #include "orionld/dds/ddsNotification.h" // ddsNotification +#include "orionld/dds/ddsConfigLoad.h" // ddsConfigLoad +#include "orionld/dds/ddsConfigTopicToAttribute.h" // ddsConfigTopicToAttribute - TMP: debugging +#include "orionld/dds/kjTreeLog.h" // kjTreeLog2 #include "orionld/dds/ddsInit.h" // Own interface @@ -52,10 +60,57 @@ DdsOperationMode ddsOpMode; // * ddsSubsTopics // * mode - the DDS mode the broker is working in // -int ddsInit(const char* ddsTopicType, char* ddsSubsTopics, DdsOperationMode _ddsOpMode) +int ddsInit(Kjson* kjP, const char* ddsConfigFile, const char* ddsTopicType, char* ddsSubsTopics, DdsOperationMode _ddsOpMode) { - ddsOpMode = _ddsOpMode; + ddsOpMode = _ddsOpMode; // Not yet in use ... invent usage or remove ! + + // + // DDS Configuration File + // + errno = 0; + if (access(ddsConfigFile, R_OK) == 0) + { + if (ddsConfigLoad(kjP, ddsConfigFile) != 0) + KT_X(1, "Error reading/parsing the DDS config file '%s'", ddsConfigFile); + +#ifdef DEBUG + extern KjNode* ddsConfigTree; + kjTreeLog2(ddsConfigTree, "DDS Config", StDdsConfig); + KT_T(StDdsConfig, "Topics:"); + const char* path[3] = { "dds", "topics", NULL }; + KjNode* topics = kjNavigate(ddsConfigTree, path , NULL, NULL); + + if (topics != NULL) + { + for (KjNode* topicP = topics->value.firstChildP; topicP != NULL; topicP = topicP->next) + { + char* entityId = (char*) "N/A"; + char* entityType = (char*) "N/A"; + char* attribute = ddsConfigTopicToAttribute(topicP->name, &entityId, &entityType); + + KT_T(StDdsConfig, "Topic: '%s':", topicP->name); + KT_T(StDdsConfig, " Attribute: '%s'", attribute); + KT_T(StDdsConfig, " Entity ID: '%s'", entityId); + KT_T(StDdsConfig, " Entity Type: '%s'", entityType); + } + } +#endif + } +// else +// KT_X(1, ("Unable to read the DDS config file '%s' (%s)", ddsConfigFile, strerror(errno)); + + // + // DDS Subscriptions + // + // For now, the topics to subscribe to is input to the broker, as a CLI parameter with + // the topics as a comma-separated list. + // This is temporary, just to be able to test things. + // + // I imagine in the end, all DDS topics will be found via dicovery and the broker will + // subscribe to all of them. Or, perhaps some filter. We'll see. + // For now, just a CSV. + // if (ddsSubsTopics[0] == 0) return 0; diff --git a/src/lib/orionld/dds/ddsInit.h b/src/lib/orionld/dds/ddsInit.h index 45f5fff5cf..a421e19283 100644 --- a/src/lib/orionld/dds/ddsInit.h +++ b/src/lib/orionld/dds/ddsInit.h @@ -25,6 +25,10 @@ * * Author: Ken Zangelin */ +extern "C" +{ +#include "kjson/kjson.h" // Kjson +} @@ -42,6 +46,6 @@ typedef enum DdsOperationMode // // ddsInit - // -extern int ddsInit(const char* ddsTopicType, char* ddsSubsTopics, DdsOperationMode ddsOpMode); +extern int ddsInit(Kjson* kjP, const char* ddsConfigFile, const char* ddsTopicType, char* ddsSubsTopics, DdsOperationMode ddsOpMode); #endif // SRC_LIB_ORIONLD_DDS_DDSINIT_H_ diff --git a/src/lib/orionld/dds/ddsNotification.cpp b/src/lib/orionld/dds/ddsNotification.cpp index 64d0375cbe..1599f1a424 100644 --- a/src/lib/orionld/dds/ddsNotification.cpp +++ b/src/lib/orionld/dds/ddsNotification.cpp @@ -35,6 +35,7 @@ extern "C" #include "orionld/common/tenantList.h" // tenant0 #include "orionld/serviceRoutines/orionldPutAttribute.h" // orionldPutAttribute #include "orionld/dds/kjTreeLog.h" // kjTreeLog2 +#include "orionld/dds/ddsConfigTopicToAttribute.h" // ddsConfigTopicToAttribute #include "orionld/dds/ddsNotification.h" // Own interface @@ -43,7 +44,7 @@ extern "C" // // ddsNotification - // -void ddsNotification(const char* entityType, const char* entityId, const char* attrName, KjNode* notificationP) +void ddsNotification(const char* entityType, const char* entityId, const char* topicName, KjNode* notificationP) { KT_V("Got a notification from DDS"); kjTreeLog2(notificationP, "notification", StDds); @@ -59,16 +60,48 @@ void ddsNotification(const char* entityType, const char* entityId, const char* a return; } - // orionldState.payloadIdNode = idNodeP; - // orionldState.payloadTypeNode = typeNodeP; + // + // Criteria for obtaining the necessary attribute info (Entity ID+Type + Attribute long name): + // + // 1. Set the attribute long name to the topic name + // 2. Take all three from the DDS config file (depending on the topic name) + // 3. Override entity id+type with entityType+entityId from the parameters of this function + // + + // + // GET the attribute long name (and entity id+type) from the DDS config file + // + char* eId = NULL; + char* eType = NULL; + char* attributeLongName = ddsConfigTopicToAttribute(topicName, &eId, &eType); + + if (attributeLongName == NULL) // Topic name NOT found in DDS config file + attributeLongName = (char*) topicName; + + // Take entity id+type from config file unless given as parameters to this function (which would override) + if (entityType == NULL) + entityType = eType; + if (entityId == NULL) + entityId = eId; + + // What to do if we have no entity id+type ? + // - The entity id is MANDATORY - cannot continue if we don't know the entity ID + // - The entity type is onbly needed when creating the entity - and we don't know right now whether the entity already exists. + // So, we let it pass and get an error later (404 Not Found) + if (entityId == NULL) + { + KT_E(("Got a DDS sample for an entity whose ID cannot be obtained")); + return; + } + + orionldState.uriParams.type = (char*) entityType; orionldState.wildcard[0] = (char*) entityId; - orionldState.wildcard[1] = (char*) attrName; // The topic is the attribute long name + orionldState.wildcard[1] = (char*) attributeLongName; // The topic is the attribute long name orionldState.requestTree = aValueNodeP; orionldState.tenantP = &tenant0; // FIXME ... Use tenants? - orionldState.uriParams.type = (char*) entityType; - orionldState.in.pathAttrExpanded = (char*) attrName; + orionldState.in.pathAttrExpanded = (char*) topicName; orionldState.ddsSample = true; KT_T(StDds, "Calling orionldPutAttribute"); diff --git a/src/lib/orionld/dds/ddsNotification.h b/src/lib/orionld/dds/ddsNotification.h index e6c7582e08..d1f45c085b 100644 --- a/src/lib/orionld/dds/ddsNotification.h +++ b/src/lib/orionld/dds/ddsNotification.h @@ -31,6 +31,7 @@ extern "C" } + // ----------------------------------------------------------------------------- // // ddsNotification - diff --git a/src/lib/orionld/dds/ddsPublish.cpp b/src/lib/orionld/dds/ddsPublish.cpp index 8ab51d04de..b9eb7b4ad7 100644 --- a/src/lib/orionld/dds/ddsPublish.cpp +++ b/src/lib/orionld/dds/ddsPublish.cpp @@ -28,9 +28,10 @@ extern "C" #include "kjson/KjNode.h" // KjNode } -#include "orionld/dds/NgsildEntityPubSubTypes.h" -#include "orionld/dds/NgsildEntity.h" -#include "orionld/dds/NgsildPublisher.h" +#include "orionld/common/traceLevels.h" // KT_T trace levels +#include "orionld/dds/NgsildEntityPubSubTypes.h" // NgsildEntityPubSubTypes +#include "orionld/dds/NgsildEntity.h" // NgsildEntity +#include "orionld/dds/NgsildPublisher.h" // NgsildPublisher #include "orionld/dds/config.h" // DDS_RELIABLE, ... diff --git a/test/functionalTest/cases/0000_cli/bool_option_with_value.test b/test/functionalTest/cases/0000_cli/bool_option_with_value.test index 73e7f850b5..3f9a2e7363 100644 --- a/test/functionalTest/cases/0000_cli/bool_option_with_value.test +++ b/test/functionalTest/cases/0000_cli/bool_option_with_value.test @@ -117,5 +117,6 @@ Usage: orionld [option '-U' (extended usage)] [option '-dds' (turn on DDS support)] [option '-ddsSubsTopics' ] [option '-ddsTopicType' ] + [option '-ddsConfigFile' ] --TEARDOWN-- diff --git a/test/functionalTest/cases/0000_cli/command_line_options.test b/test/functionalTest/cases/0000_cli/command_line_options.test index 55fcc83fd6..2e2f892cac 100644 --- a/test/functionalTest/cases/0000_cli/command_line_options.test +++ b/test/functionalTest/cases/0000_cli/command_line_options.test @@ -106,5 +106,6 @@ Usage: orionld [option '-U' (extended usage)] [option '-dds' (turn on DDS support)] [option '-ddsSubsTopics' ] [option '-ddsTopicType' ] + [option '-ddsConfigFile' ] --TEARDOWN-- diff --git a/test/functionalTest/cases/0000_dds/dds_broker_publishes_ftClient_receives.test b/test/functionalTest/cases/0000_dds/dds_broker_publishes_ftClient_receives.test index 455df932da..28a69ed254 100644 --- a/test/functionalTest/cases/0000_dds/dds_broker_publishes_ftClient_receives.test +++ b/test/functionalTest/cases/0000_dds/dds_broker_publishes_ftClient_receives.test @@ -25,7 +25,23 @@ Orion-LD + a DDS test client, the broker publishes, the test client receives not --SHELL-INIT-- dbInit CB -orionldStart CB -mongocOnly -dds +echo '{ + "dds": { + "topics": { + "Robot1/camera": { + "entityId": "urn:ngsi-ld:entities:Robot:1", + "entityType": "urn:ngsi-ld:Camera", + "attribute": "http://smartdatamodels.org/XX/attrs/camera" + }, + "Robot1/arm1": { + "entityId": "urn:ngsi-ld:entities:Arm:1", + "entityType": "urn:ngsi-ld:Arm", + "attribute": "http://smartdatamodels.org/XX/attrs/arm1" + } + } + } +}' > /tmp/ddsConfig +orionldStart CB -mongocOnly -dds -ddsConfigFile /tmp/ddsConfig ftClientStart -v -t 0-5000 --SHELL-- @@ -158,3 +174,4 @@ Date: REGEX(.*) brokerStop CB ftClientStop dbDrop CB +rm -f /tmp/ddsConfig