From b53e89785ec55d86c991cdf83f45f468095a00eb Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Mon, 20 Feb 2023 16:01:32 +0200 Subject: [PATCH] Cleanup comments. --- coupler/keep_alive_publisher.h | 20 ---------------- coupler/keep_alive_subscriber.h | 42 --------------------------------- 2 files changed, 62 deletions(-) diff --git a/coupler/keep_alive_publisher.h b/coupler/keep_alive_publisher.h index 08a9127..2c19905 100644 --- a/coupler/keep_alive_publisher.h +++ b/coupler/keep_alive_publisher.h @@ -8,8 +8,6 @@ UA_NodeId connectionIdent, publishedDataSetIdent, writerGroupIdent; static void addPubSubConnection(UA_Server *server, UA_String *transportProfile, UA_NetworkAddressUrlDataType *networkAddressUrl){ - /* Details about the connection configuration and handling are located - * in the pubsub connection tutorial */ UA_PubSubConnectionConfig connectionConfig; memset(&connectionConfig, 0, sizeof(connectionConfig)); connectionConfig.name = UA_STRING("UADP Connection 1"); @@ -27,13 +25,6 @@ static void addPubSubConnection(UA_Server *server, UA_String *transportProfile, UA_Server_addPubSubConnection(server, &connectionConfig, &connectionIdent); } -/** - * **PublishedDataSet handling** - * - * The PublishedDataSet (PDS) and PubSubConnection are the toplevel entities and - * can exist alone. The PDS contains the collection of the published fields. All - * other PubSub elements are directly or indirectly linked with the PDS or - * connection. */ static void addPublishedDataSet(UA_Server *server) { /* The PublishedDataSetConfig contains all necessary public * information for the creation of a new PublishedDataSet */ @@ -45,11 +36,6 @@ static void addPublishedDataSet(UA_Server *server) { UA_Server_addPublishedDataSet(server, &publishedDataSetConfig, &publishedDataSetIdent); } -/** - * **WriterGroup handling** - * - * The WriterGroup (WG) is part of the connection and contains the primary - * configuration parameters for the message creation. */ static void addWriterGroup(UA_Server *server) { /* Now we create a new WriterGroupConfig and add the group to the existing * PubSubConnection. */ @@ -81,12 +67,6 @@ static void addWriterGroup(UA_Server *server) { UA_UadpWriterGroupMessageDataType_delete(writerGroupMessage); } -/** - * **DataSetWriter handling** - * - * A DataSetWriter (DSW) is the glue between the WG and the PDS. The DSW is - * linked to exactly one PDS and contains additional information for the - * message generation. */ static void addDataSetWriter(UA_Server *server) { /* We need now a DataSetWriter within the WriterGroup. This means we must * create a new DataSetWriterConfig and add call the addWriterGroup function. */ diff --git a/coupler/keep_alive_subscriber.h b/coupler/keep_alive_subscriber.h index 1278360..de51a52 100644 --- a/coupler/keep_alive_subscriber.h +++ b/coupler/keep_alive_subscriber.h @@ -4,9 +4,7 @@ #include <open62541/server.h> #include <open62541/server_config_default.h> #include <open62541/types_generated.h> - #include "ua_pubsub.h" - #include <stdio.h> #include <signal.h> #include <stdlib.h> @@ -104,13 +102,6 @@ static UA_StatusCode addPubSubConnectionSubscriber(UA_Server *server, UA_String return retval; } -/** - * **ReaderGroup** - * - * ReaderGroup is used to group a list of DataSetReaders. All ReaderGroups are - * created within a PubSubConnection and automatically deleted if the connection - * is removed. All network message related filters are only available in the DataSetReader. */ -/* Add ReaderGroup to the created connection */ static UA_StatusCode addReaderGroup(UA_Server *server) { if(server == NULL) { return UA_STATUSCODE_BADINTERNALERROR; @@ -126,15 +117,6 @@ static UA_StatusCode addReaderGroup(UA_Server *server) { return retval; } -/** - * **DataSetReader** - * - * DataSetReader can receive NetworkMessages with the DataSetMessage - * of interest sent by the Publisher. DataSetReader provides - * the configuration necessary to receive and process DataSetMessages - * on the Subscriber side. DataSetReader must be linked with a - * SubscribedDataSet and be contained within a ReaderGroup. */ -/* Add DataSetReader to the ReaderGroup */ static UA_StatusCode addDataSetReader(UA_Server *server) { if(server == NULL) { return UA_STATUSCODE_BADINTERNALERROR; @@ -143,11 +125,6 @@ static UA_StatusCode addDataSetReader(UA_Server *server) { UA_StatusCode retval = UA_STATUSCODE_GOOD; memset (&readerConfig, 0, sizeof(UA_DataSetReaderConfig)); readerConfig.name = UA_STRING("DataSet Reader 1"); - /* Parameters to filter which DataSetMessage has to be processed - * by the DataSetReader */ - /* The following parameters are used to show that the data published by - * tutorial_pubsub_publish.c is being subscribed and is being updated in - * the information model */ UA_UInt16 publisherIdentifier = PUBLISHER_ID; readerConfig.publisherId.type = &UA_TYPES[UA_TYPES_UINT16]; readerConfig.publisherId.data = &publisherIdentifier; @@ -162,11 +139,6 @@ static UA_StatusCode addDataSetReader(UA_Server *server) { return retval; } -/** - * **SubscribedDataSet** - * - * Set SubscribedDataSet type to TargetVariables data type. - * Add subscribedvariables to the DataSetReader */ static UA_StatusCode addSubscribedVariables(UA_Server *server, UA_NodeId dataSetReaderId) { if(server == NULL) return UA_STATUSCODE_BADINTERNALERROR; @@ -193,12 +165,6 @@ static UA_StatusCode addSubscribedVariables(UA_Server *server, UA_NodeId dataSet folderBrowseName, UA_NODEID_NUMERIC (0, UA_NS0ID_BASEOBJECTTYPE), oAttr, NULL, &folderId); -/** - * **TargetVariables** - * - * The SubscribedDataSet option TargetVariables defines a list of Variable mappings between - * received DataSet fields and target Variables in the Subscriber AddressSpace. - * The values subscribed from the Publisher are updated in the value field of these variables */ /* Create the TargetVariables with respect to DataSetMetaData fields */ UA_FieldTargetVariable *targetVars = (UA_FieldTargetVariable *) UA_calloc(readerConfig.dataSetMetaData.fieldsSize, sizeof(UA_FieldTargetVariable)); @@ -241,14 +207,6 @@ static UA_StatusCode addSubscribedVariables(UA_Server *server, UA_NodeId dataSet return retval; } -/** - * **DataSetMetaData** - * - * The DataSetMetaData describes the content of a DataSet. It provides the information necessary to decode - * DataSetMessages on the Subscriber side. DataSetMessages received from the Publisher are decoded into - * DataSet and each field is updated in the Subscriber based on datatype match of TargetVariable fields of Subscriber - * and PublishedDataSetFields of Publisher */ -/* Define MetaData for TargetVariables */ static void fillTestDataSetMetaData(UA_DataSetMetaDataType *pMetaData) { if(pMetaData == NULL) { return; -- 2.30.9