Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 1.4 to master #6554

Merged
merged 52 commits into from
Jun 25, 2024
Merged
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
f083d7a
fix(client): added missing channel state "UA_SECURECHANNELSTATE_OPN_S…
peschuster May 28, 2024
3bf2471
feat(test): Add a test for MonitoredItems on a DataSource with a fixe…
jpfr May 30, 2024
3f40576
fix(build): Correct path for schema files of external build
keba-estr May 31, 2024
8eb85bb
fix(nc): Correct setting of the namespaceIndex. Improve condition for…
NoelGraf Jun 3, 2024
4c148ac
fix(build): fix OpenSSL link flags in build output files
rickboks Jun 4, 2024
dc0c061
refactor(build): Use the SONAME version x.y property to disambiguate …
jpfr Jun 4, 2024
c18a462
refactor(build): Remove UA_PACK_DEBIAN - use the tools/prepare_packag…
jpfr Jun 4, 2024
68ed72e
feat(tests): Extend tests for writing int32 into an enum type
jpfr Jun 4, 2024
11c1a55
refactor(plugins): Make TCP port reuse the default
jpfr Jun 1, 2024
5ddf7ff
feat(server): Avoid malloc when writing "pointerfree" values of the s…
jpfr Jun 4, 2024
3888af3
fix(ns): Add ModelChangeEventType and ConditionType to support subscr…
NoelGraf Jun 5, 2024
069fffd
fix(arch): Fix build error with undefined UA_IPV6
keba-estr Jun 14, 2024
88dae21
fix(client): channel state set to CLOSING without closing underlying …
peschuster Jun 12, 2024
cd44415
test(client) Added test for connection termination when server sent a…
peschuster Jun 14, 2024
5ff50e2
fix(server): Directly write into the external data source if no callb…
jpfr Jun 15, 2024
de087eb
refactor(examples): Move outdated PubSub RT examples to the attic
jpfr Jun 6, 2024
21a6ec8
refactor(tests): Move incomplete ETF tests to the attic
jpfr Jun 15, 2024
caa1e7e
refactor(examples): Clean up server_pubsub_publisher_rt_level.c
jpfr Jun 6, 2024
5cecbde
refactor(examples): Clean up server_pubsub_subscriber_rt_level.c
jpfr Jun 10, 2024
345ed46
refactor(examples): Clean up server_pubsub_rt_field_information_model.c
jpfr Jun 12, 2024
cff036a
refactor(pubsub): Improve the documentation of UA_PubSubRTLevel
jpfr Jun 6, 2024
913ea88
refactor(pubsub): Use UA_PUBSUB_RT_DETERMINISTIC as the ORed combinat…
jpfr Jun 15, 2024
e4b7f42
feat(pubsub): Don't require the server-lock for RT-publishing when th…
jpfr Jun 6, 2024
5702d83
refactor(pubsub): Disentangle cases for the DataSet preparation
jpfr Jun 6, 2024
d0dd4a3
refactor(pubsub): Memset-zero the offset table fields to initialize
jpfr Jun 15, 2024
9aaf137
refactor(pubsub): Store the external value source in the offset table
jpfr Jun 15, 2024
6ab6a32
refactor(pubsub): Update UA_DataSetWriter_prepareDataSet to check for…
jpfr Jun 15, 2024
bf03702
refactor(pubsub): Cache the direct value pointer for the offset table…
jpfr Jun 15, 2024
b30b07d
refactor(pubsub): Cosmetic improvement in ua_pubsub_writergroup.c
jpfr Jun 15, 2024
381e3ad
refactor(pubsub): Explicit sampling in the RT publish path if direct …
jpfr Jun 15, 2024
f98d982
refactor(pubsub): Use the RT configuration as a bit-field
jpfr Jun 15, 2024
5e6841a
fix(pubsub): Use the external value source in the Reader
jpfr Jun 15, 2024
ab2054b
refactor(build): RT examples depend on sigset_t. Do not build on WIN32
jpfr Jun 15, 2024
f0c4533
fix(pubsub): Don't abort Reader with monitoring enabled for messageRe…
jpfr Jun 15, 2024
152e315
fix(pubsub): Don't overwrite the ReaderGroup external value configura…
jpfr Jun 16, 2024
2b76ea7
refactor(tests): Use the RT_DETERMINISTIC setting in check_pubsub_sub…
jpfr Jun 16, 2024
d463871
Merge branch 'publish_pubsub_rt' into merge_14_master_16
jpfr Jun 18, 2024
4f567ac
refactor(pubsub): Replace nested switch with linear if/else for the P…
jpfr Jun 22, 2024
9832cec
refactor(pubsub): Simplify PubSub monitoring handling
jpfr Jun 22, 2024
554369f
refactor(pubsub): Move StandaloneSubscribedDataSet definitions to ua_…
jpfr Jun 22, 2024
c253cd6
refactor(pubsub): Cleanup in ua_pubsub_dataset.c
jpfr Jun 22, 2024
5ae3272
refactor(pubsub): Make the reader connected to the StandaloneSubscrib…
jpfr Jun 22, 2024
7b2094f
refactor(pubsub): Simplifications in ua_pubsub_writer.c
jpfr Jun 22, 2024
dd0dc62
refactor(pubsub): Make the PublishedDataSet attached a Writer a direc…
jpfr Jun 22, 2024
0f61aca
feat(pubsub): Additional size checks for payloads
jpfr Jun 25, 2024
80bcf11
refactor(pubsub): Simplify the handling of payloads with raw content
jpfr Jun 25, 2024
f29aefc
refactor(pubsub): Simplify state handling of the ReaderGroup
jpfr Jun 25, 2024
3aec47a
refactor(pubsub): Remove the dependency on the DataSetMetaData during…
jpfr Jun 25, 2024
7cfea1f
refactor(pubsub): Simplify DataSetReader_processRaw
jpfr Jun 25, 2024
849367e
fix(pubsub): Cleanup allocations after raw decoding
jpfr Jun 25, 2024
018114e
refactor(pubsub): Remove dead code for mirror variables
jpfr Jun 25, 2024
9406efb
refactor(pubsub): Remove unneeded arguments in the DataSetMessage dec…
jpfr Jun 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor(tests): Use the RT_DETERMINISTIC setting in check_pubsub_sub…
…scribe_rt_levels.c
  • Loading branch information
jpfr committed Jun 17, 2024
commit 2b76ea7f6d39c9816d1b8cdba50dfd77cf72ef78
51 changes: 15 additions & 36 deletions tests/pubsub/check_pubsub_subscribe_rt_levels.c
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ START_TEST(SubscribeSingleFieldWithFixedOffsets) {
writerGroupConfig.publishingInterval = 10;
writerGroupConfig.enabled = UA_FALSE;
writerGroupConfig.writerGroupId = 100;
writerGroupConfig.rtLevel = UA_PUBSUB_RT_FIXED_SIZE;
writerGroupConfig.rtLevel = UA_PUBSUB_RT_DETERMINISTIC;
writerGroupConfig.encodingMimeType = UA_PUBSUB_ENCODING_UADP;
UA_UadpWriterGroupMessageDataType *wgm = UA_UadpWriterGroupMessageDataType_new();
wgm->networkMessageContentMask = (UA_UadpNetworkMessageContentMask)(UA_UADPNETWORKMESSAGECONTENTMASK_PUBLISHERID |
Expand All @@ -147,7 +147,7 @@ START_TEST(SubscribeSingleFieldWithFixedOffsets) {
UA_ReaderGroupConfig readerGroupConfig;
memset (&readerGroupConfig, 0, sizeof (UA_ReaderGroupConfig));
readerGroupConfig.name = UA_STRING ("ReaderGroup Test");
readerGroupConfig.rtLevel = UA_PUBSUB_RT_FIXED_SIZE;
readerGroupConfig.rtLevel = UA_PUBSUB_RT_DETERMINISTIC;
retVal = UA_Server_addReaderGroup(server, connectionIdentifier, &readerGroupConfig,
&readerGroupIdentifier);
ck_assert_int_eq(retVal, UA_STATUSCODE_GOOD);
Expand Down Expand Up @@ -289,7 +289,7 @@ START_TEST(SetupInvalidPubSubConfigReader) {
writerGroupConfig.publishingInterval = 10;
writerGroupConfig.enabled = UA_FALSE;
writerGroupConfig.writerGroupId = 100;
writerGroupConfig.rtLevel = UA_PUBSUB_RT_FIXED_SIZE;
writerGroupConfig.rtLevel = UA_PUBSUB_RT_DETERMINISTIC;
writerGroupConfig.encodingMimeType = UA_PUBSUB_ENCODING_UADP;
UA_UadpWriterGroupMessageDataType *wgm = UA_UadpWriterGroupMessageDataType_new();
wgm->networkMessageContentMask = (UA_UadpNetworkMessageContentMask)(UA_UADPNETWORKMESSAGECONTENTMASK_PUBLISHERID |
Expand Down Expand Up @@ -317,7 +317,7 @@ START_TEST(SetupInvalidPubSubConfigReader) {
UA_ReaderGroupConfig readerGroupConfig;
memset (&readerGroupConfig, 0, sizeof (UA_ReaderGroupConfig));
readerGroupConfig.name = UA_STRING ("ReaderGroup Test");
readerGroupConfig.rtLevel = UA_PUBSUB_RT_FIXED_SIZE;
readerGroupConfig.rtLevel = UA_PUBSUB_RT_DETERMINISTIC;
retVal = UA_Server_addReaderGroup(server, connectionIdentifier, &readerGroupConfig,
&readerGroupIdentifier);
ck_assert_int_eq(retVal, UA_STATUSCODE_GOOD);
Expand Down Expand Up @@ -433,7 +433,7 @@ START_TEST(SetupInvalidPubSubConfig) {
writerGroupConfig.publishingInterval = 10;
writerGroupConfig.enabled = UA_FALSE;
writerGroupConfig.writerGroupId = 100;
writerGroupConfig.rtLevel = UA_PUBSUB_RT_FIXED_SIZE;
writerGroupConfig.rtLevel = UA_PUBSUB_RT_DETERMINISTIC;
writerGroupConfig.encodingMimeType = UA_PUBSUB_ENCODING_UADP;
UA_UadpWriterGroupMessageDataType *wgm = UA_UadpWriterGroupMessageDataType_new();
wgm->networkMessageContentMask = (UA_UadpNetworkMessageContentMask)(UA_UADPNETWORKMESSAGECONTENTMASK_PUBLISHERID |
Expand Down Expand Up @@ -482,30 +482,8 @@ START_TEST(SetupInvalidPubSubConfig) {
#define NUMVARS 2
static UA_UInt32 sSubscriberWriteValue[NUMVARS] = {0};
static UA_NodeId sSubscribeWriteCb_TargetVar_Id[NUMVARS];
static void SubscriberBeforeWriteCallback(UA_Server *srv,
const UA_NodeId *readerId,
const UA_NodeId *readerGroupId,
const UA_NodeId *targetVariableId,
void *targetVariableContext,
UA_DataValue **externalDataValue) {

int i = 0;
ck_assert(srv != 0);
ck_assert(UA_NodeId_equal(readerId, &readerIdentifier) == UA_TRUE);
ck_assert(UA_NodeId_equal(readerGroupId, &readerGroupIdentifier) == UA_TRUE);
for (i = 0; i < NUMVARS; i++) {
if (UA_NodeId_equal(targetVariableId, &sSubscribeWriteCb_TargetVar_Id[i]) == UA_TRUE) {
ck_assert(targetVariableContext != 0);
ck_assert_uint_eq(10+i, *((UA_UInt32*) targetVariableContext));
ck_assert(externalDataValue != 0);
ck_assert_uint_eq((**externalDataValue).value.type->memSize, sizeof(sSubscriberWriteValue[i]));
memcpy(&sSubscriberWriteValue[i], (**externalDataValue).value.data, (**externalDataValue).value.type->memSize);
break;
}
}
/* check if variable has been found */
ck_assert(i < NUMVARS);
}
static UA_DataValue subscriberDataValues[NUMVARS];
static UA_DataValue *subscriberIndirectDataValues[NUMVARS];

static void PublishSubscribeWithWriteCallback_Helper(
UA_NodeId *publisherNode,
Expand Down Expand Up @@ -576,7 +554,7 @@ static void PublishSubscribeWithWriteCallback_Helper(
UA_ReaderGroupConfig readerGroupConfig;
memset (&readerGroupConfig, 0, sizeof (UA_ReaderGroupConfig));
readerGroupConfig.name = UA_STRING ("ReaderGroup Test");
readerGroupConfig.rtLevel = UA_PUBSUB_RT_FIXED_SIZE;
readerGroupConfig.rtLevel = UA_PUBSUB_RT_DETERMINISTIC;
retVal |= UA_Server_addReaderGroup(server, connectionIdentifier, &readerGroupConfig, &readerGroupIdentifier);

/* Data Set Reader */
Expand Down Expand Up @@ -629,20 +607,21 @@ static void PublishSubscribeWithWriteCallback_Helper(
dsReaderMessage = 0;
ck_assert_int_eq(retVal, UA_STATUSCODE_GOOD);

/* Create TargetVariables */
UA_FieldTargetVariable targetVar[NUMVARS];
UA_UInt32 DummyTargetVariableContext[NUMVARS];
memset(&targetVar, 0, sizeof(targetVar));
for (i = 0; i < NUMVARS; i++) {
/* For creating Targetvariable */
UA_Variant_setScalar(&subscriberDataValues[i].value, &sSubscriberWriteValue[i],
&UA_TYPES[UA_TYPES_UINT32]);
subscriberIndirectDataValues[i] = &subscriberDataValues[i];
subscriberDataValues[i].hasValue = true;
UA_FieldTargetDataType_init(&targetVar[i].targetVariable);
targetVar[i].targetVariable.attributeId = UA_ATTRIBUTEID_VALUE;
targetVar[i].targetVariable.targetNodeId = sSubscribeWriteCb_TargetVar_Id[i];
targetVar[i].beforeWrite = SubscriberBeforeWriteCallback; /* set subscriber write callback */
DummyTargetVariableContext[i] = 10+i;
targetVar[i].targetVariableContext = &DummyTargetVariableContext[i];
targetVar[i].externalDataValue = &subscriberIndirectDataValues[i];
}
retVal |= UA_Server_DataSetReader_createTargetVariables(server, readerIdentifier,
NUMVARS, &targetVar[0]);
NUMVARS, targetVar);
ck_assert_int_eq(retVal, UA_STATUSCODE_GOOD);
for (i = 0; i < NUMVARS; i++) {
UA_FieldTargetDataType_clear(&targetVar[i].targetVariable);
Expand Down
Loading