View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008425 | CTT UA Scripts | 1 - Script Issue | public | 2022-11-03 15:59 | 2023-07-21 16:32 |
Reporter | V. Monfort | Assigned To | Yannik Klaass | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 1.03.503 | ||||
Summary | 0008425: basicCreateMonitoredItemsTest.js does not manage subscriptionObjectReference correctly | ||||
Description | basicCreateMonitoredItemsTest.js does not manage subscriptionObjectReference correctly (version setup-opc-ua-1.03-compliance-test-tool-v1.03.09-01.00.500-20220807) The following tests of "Monitor Value Change" conformance unit were supposed to use MonitorBasicSubscription reference but are not due to the issue (another subscription is created): 002, 004, 005, 006, 007, 008 By applying the following patches, it is possible to obtain the expected behavior and to avoid use of several subscriptions while it is not necessary and not supported by all profiles. {{{
| ||||
Tags | No tags attached. | ||||
Files Affected | /library/ServiceBased/MonitoredItemServiceSet/CreateMonitoredItems/basicCreateMonitoredItemsTest.js | ||||
|
Sorry about the previous note, this is not the expected patch. The expected one is this one. editor: removed previous patch (5,593 bytes)
--- a./library/ServiceBased/MonitoredItemServiceSet/CreateMonitoredItems/basicCreateMonitoredItemsTest.js +++ b./library/ServiceBased/MonitoredItemServiceSet/CreateMonitoredItems/basicCreateMonitoredItemsTest.js @@ -41,9 +41,14 @@ function basicCreateMonitoredItemsMultipleNodes( nodes, mode, filter, queueLengt var PublishHelper; // this will become a Publish helper (further down) // create the required number of subscriptions for( s=0; s<subscriptionCount; s++ ) { - if( subscriptionObjectReference !== undefined && subscriptionObjectReference !== null ) subscriptions[s] = subscriptionObjectReference; - else subscriptions[s] = new Subscription( scanrates[s], true ); - createSubscriptionsSuccess[s] = CreateSubscriptionHelper.Execute( { Subscription: subscriptions[s] } ); + if( s == 0 && subscriptionObjectReference !== undefined && subscriptionObjectReference !== null ) { + subscriptions[s] = subscriptionObjectReference; + createSubscriptionsSuccess[s] = true; + } + else{ + subscriptions[s] = new Subscription( scanrates[s], true ); + createSubscriptionsSuccess[s] = CreateSubscriptionHelper.Execute( { Subscription: subscriptions[s] } ); + } if( createSubscriptionsSuccess[s] ) { // define our Publish service call helper instance. @@ -139,7 +144,7 @@ function basicCreateMonitoredItemsMultipleNodes( nodes, mode, filter, queueLengt // CLEAN UP // delete the subscriptions for( s=0; s<subscriptionCount; s++ ) { - if( subscriptionObjectReference !== undefined && subscriptionObjectReference !== null ) { + if( s == 0 && subscriptionObjectReference !== undefined && subscriptionObjectReference !== null ) { DeleteMonitoredItemsHelper.Execute( { ItemsToDelete: monitoredItems[s], SubscriptionId: subscriptionObjectReference } ); } else { @@ -156,5 +161,5 @@ function basicCreateMonitoredItemsTest( mode, filter, queueLength, timestamps, s addWarning( "Unable to get or convert the NodeId from the NumbericSettings into a Monitored Item. Aborting test." ); return( false ); } - basicCreateMonitoredItemsMultipleNodes( items, mode, filter, queueLength, timestamps, 1, subscriptionObjectReference ); -} \ No newline at end of file + basicCreateMonitoredItemsMultipleNodes( items, mode, filter, queueLength, timestamps, 1, null, subscriptionObjectReference ); +} --- a./maintree/Monitored Item Services/Monitor Items Deadband Filter/Test Cases/001.js +++ b./maintree/Monitored Item Services/Monitor Items Deadband Filter/Test Cases/001.js @@ -11,8 +11,8 @@ function createMonitoredItems591003() { const FILTER = Event.GetDataChangeFilter( DeadbandType.Absolute, 0, DataChangeTrigger.StatusValue ); // needs to reflect whatever "ON" means????? const QUEUE = 1; const TIMES = TimestampsToReturn.Server; - basicCreateMonitoredItemsTest( MODE, FILTER, QUEUE, TIMES ); + basicCreateMonitoredItemsTest( MODE, FILTER, QUEUE, TIMES, MonitorBasicSubscription ); return( true ); } --- a./maintree/Monitored Item Services/Monitor Items Deadband Filter/Test Cases/002.js +++ b./maintree/Monitored Item Services/Monitor Items Deadband Filter/Test Cases/002.js @@ -13,8 +13,8 @@ function createMonitoredItems591006() { const FILTER = Event.GetDataChangeFilter( DeadbandType.Absolute, 0, DataChangeTrigger.StatusValue ); const QUEUE = 1; const TIMES = TimestampsToReturn.Server; - basicCreateMonitoredItemsTest( MODE, FILTER, QUEUE, TIMES ); + basicCreateMonitoredItemsTest( MODE, FILTER, QUEUE, TIMES, MonitorBasicSubscription ); return( true ); } --- a./maintree/Monitored Item Services/Monitor Items Deadband Filter/Test Cases/003.js +++ b./maintree/Monitored Item Services/Monitor Items Deadband Filter/Test Cases/003.js @@ -13,8 +13,8 @@ function createMonitoredItems591007() { const FILTER = Event.GetDataChangeFilter( DeadbandType.Absolute, 0, DataChangeTrigger.StatusValue ); const QUEUE = 0; const TIMES = TimestampsToReturn.Server; - basicCreateMonitoredItemsTest( MODE, FILTER, QUEUE, TIMES ) + basicCreateMonitoredItemsTest( MODE, FILTER, QUEUE, TIMES, MonitorBasicSubscription ) return( true ); } --- a./maintree/Monitored Item Services/Monitor Items Deadband Filter/Test Cases/004.js +++ b./maintree/Monitored Item Services/Monitor Items Deadband Filter/Test Cases/004.js @@ -13,8 +13,8 @@ function createMonitoredItems591010() { const FILTER = Event.GetDataChangeFilter( DeadbandType.Absolute, 0, DataChangeTrigger.StatusValue ); const QUEUE = 1; const TIMES = TimestampsToReturn.Server; - basicCreateMonitoredItemsTest( MODE, FILTER, QUEUE, TIMES ); + basicCreateMonitoredItemsTest( MODE, FILTER, QUEUE, TIMES, MonitorBasicSubscription ); return( true ); } --- a./maintree/Monitored Item Services/Monitor Items Deadband Filter/Test Cases/005.js +++ b./maintree/Monitored Item Services/Monitor Items Deadband Filter/Test Cases/005.js @@ -13,8 +13,8 @@ function createMonitoredItems591011() { const FILTER = Event.GetDataChangeFilter( DeadbandType.Absolute, 0, DataChangeTrigger.StatusValue ); const QUEUE = 0; const TIMES = TimestampsToReturn.Server; - basicCreateMonitoredItemsTest( MODE, FILTER, QUEUE, TIMES ); + basicCreateMonitoredItemsTest( MODE, FILTER, QUEUE, TIMES, MonitorBasicSubscription ); return( true ); } |
|
Fixed code to make basicCreateMonitoredItemsMultipleNodes() use the passed subscription as the first one. |
|
Adding affected files |
|
reviewed changes in call, agreed and closed issue |
Date Modified | Username | Field | Change |
---|---|---|---|
2022-11-03 15:59 | V. Monfort | New Issue | |
2022-11-03 15:59 | V. Monfort | File Added: patchs | |
2022-11-03 16:17 | V. Monfort | Note Added: 0018099 | |
2022-11-03 16:17 | V. Monfort | File Added: patch | |
2022-11-18 16:49 | Paul Hunkar | File Deleted: patchs | |
2022-11-18 16:49 | Paul Hunkar | Note Edited: 0018099 | |
2022-11-18 16:51 | Paul Hunkar | Assigned To | => Yannik Klaass |
2022-11-18 16:51 | Paul Hunkar | Status | new => assigned |
2023-07-03 09:36 | Yannik Klaass | Status | assigned => resolved |
2023-07-03 09:36 | Yannik Klaass | Resolution | open => fixed |
2023-07-03 09:36 | Yannik Klaass | Note Added: 0019688 | |
2023-07-21 10:09 | Yannik Klaass | Status | resolved => feedback |
2023-07-21 10:09 | Yannik Klaass | Resolution | fixed => reopened |
2023-07-21 10:12 | Yannik Klaass | Files Affected |
=> /library/ServiceBased/MonitoredItemServiceSet/CreateMonitoredItems/basicCreateMonitoredItemsTest.js
/maintree/Monitored Item Services/Monitor Items Deadband Filter/Test Cases/001.js /maintree/Monitored Item Services/Monitor Items Deadband Filter/Test... |
2023-07-21 10:12 | Yannik Klaass | Note Added: 0019696 | |
2023-07-21 10:13 | Yannik Klaass | Status | feedback => resolved |
2023-07-21 10:13 | Yannik Klaass | Resolution | reopened => fixed |
2023-07-21 16:31 | Paul Hunkar | Project | Compliance Test Tool (CTT) Unified Architecture => CTT UA Scripts |
2023-07-21 16:32 | Paul Hunkar | Status | resolved => closed |
2023-07-21 16:32 | Paul Hunkar | Fixed in Version | => 1.03.503 |
2023-07-21 16:32 | Paul Hunkar | Note Added: 0019709 |