Query on ContentFilter usage for Complex Filter with Array of Simple Structure|OPC UA Standard|Forum|OPC Foundation

Avatar
Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
Lost password?
sp_Feed sp_PrintTopic sp_TopicIcon
Query on ContentFilter usage for Complex Filter with Array of Simple Structure
Avatar
Mohit Agarwal
Member
Members
Forum Posts: 51
Member Since:
10/18/2019
sp_UserOfflineSmall Offline
1
03/20/2023 - 12:40
sp_Permalink sp_Print sp_EditHistory

Hi,

Can someone please help with your inputs on the usage of ContentFilter for a complex filter where we need to parse the property of type Array of Simple Structure as described below?

 

  • Content Filter Usage for Complex Filters using Array of Simple Structure
  • We have a Result structure with following data:
  • Result
    • ResultMetaData
      • ResultId
      • CreationTime
      • IsSimulated
      • IsPartial
      • ProcessingTimes
      • Additional meta data from Joining Specification:
      • AssociatedEntities[] (EntityDataType[])
        • Structure Definition: EntityDataType  
          • TrimmedString EntityId,
          • Int16 EntityType
        • This array will be populated by the joining system to include relevant values.
      • Scenario 1: So, from an content filter aspect, we can always have a filter as follows:
        • CreationTime >= “Time 1” && CreationTime <= “Time 2”
        • This scenario works with the general content filter based on my understanding.
      • Question: Check if an given key-value is available in the array of AssociatedEntities?
        • Input filter: Check if EntityType = 1 && EntityId = “TestId” is available in the AssociatedEntities[] array?
Avatar
Mohit Agarwal
Member
Members
Forum Posts: 51
Member Since:
10/18/2019
sp_UserOfflineSmall Offline
2
04/24/2023 - 00:07
sp_Permalink sp_Print

Hi,

Can anyone who has inputs on the above query please suggest your thoughts?

Avatar
Paul Hunkar
Cleveland, Ohio, USA
Moderator
Members

Moderators-Specifications

Moderators-Companion

Moderators-Implementation

Moderators-Certification

Moderators-COM
Forum Posts: 109
Member Since:
02/24/2014
sp_UserOfflineSmall Offline
3
04/28/2023 - 04:15
sp_Permalink sp_Print

The most common use of ContentFilter are for filtering Event/Alarms.  is that your use case?  or are you trying to use it for an implementation of query?

The content filter was design for simple filters and is related more to looking for objects (i.e. a browse filter).   It does not provide support for structures (especially since structure are typically user defined and considered a blob).  It does provide support for checking values against literal (constants) and it does provide a manner to specify a specific index in an array.   If I understand what you are looking for is to be able to search an array of structures for specific content in the structure, is that correct?   

I would like to better understand your use case, to see what we might need to enhance (either is a model or in content filters)

Paul Hunkar - DSInteroperability

Avatar
Mohit Agarwal
Member
Members
Forum Posts: 51
Member Since:
10/18/2019
sp_UserOfflineSmall Offline
4
05/02/2023 - 02:55
sp_Permalink sp_Print

Hi Paul,

Thank you very much for the reply. Please find the additional context below.

There is a OPC 40001-101 - Machinery Result Transfer which has defined Result Model where it can be transferred via an Event and also via method calls.

In the Events, by default, we have ContentFilter option and The Result Model contains ResultMetaData container with set of properties (of simple data types) which can be used to filter the set of results received from the Server.

In the OPC 40001-101, we also have an option to use the Content Filter as part of the methods similar to Events as given in the following definition: https://reference.opcfoundatio.....cs/7.1.3 

Now, OPC 40001-101 is extended by OPC 40450-1 for Joining Systems (WORK IN PROGRESS and Planned RC in 1-2 months). In the Joining Specification, we extend the ResultMetaData with additional properties and one of those properties is EntityDataType AssociatedEntities[].

Definition of EntityDataType is {TrimmedString EntityId, String Name, Int16 EntityType, couple of other optional properties } 

Hence, for simple types, the ContentFilter can work with LiteralOperands where we can compare CreationTime <= XYZ Time, etc. But the question here is how can we use the filter option for the following use case:

Input filter: Check if EntityType = 1 && EntityId = “TestId” which can be available in the AssociatedEntities[] array?

I hope context is clear but if there are other questions, please let me know and any sugggestions on handling this scenarios are very much helpful 🙂

Forum Timezone: America/Phoenix
Most Users Ever Online: 510
Currently Online:
Guest(s) 29
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Forum Stats:
Groups: 2
Forums: 10
Topics: 1347
Posts: 4572