View Issue Details

IDProjectCategoryView StatusLast Update
0005913NodeSets, XSDs and Generated CodeApi Changepublic2021-02-23 17:25
ReporterJim Luth Assigned ToRandy Armstrong  
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status closedResolutionfixed 
Summary0005913: Indication if a subtype is allowed as value
Description

We have different places where a DataType is provided but a subtype can be used.

  • Variable Value
  • Event Field
  • Method Argument

We have currently no way to indicate if a subtype is allowed or even expected. Only if an abstract base type is used, a concrete subtype must be used.

Most clients or implementations of information models in a server can only handle the exact type and are not prepared for subtypes.

Options for this additional information should be:

  • Exact DataType defined must be used
  • Any subtype is allowed
  • A subtype is required
TagsNo tags attached.
Commit Version
Fix Due Date

Relationships

related to 0004422 closedJeff Harding 10000-003: Address Space Indication if a subtype is allowed as value 

Activities

Gerhard Gappmeier

2020-08-25 13:08

reporter   ~0012705

This is especially true for method arguments. If structures used in methods typically concrete types are meant and polymorphic datatypes are the exception.
We need to extend the argument description to add the information 'InlcudeSubTypes', which by default should be False. (This is similar to other places like e.g. Browse service, where we can specify if subtypes of a ReferenceType should be followed too).

This has a big impact on generating methods stubs, especially on non-object-oriented languages like C. The programmer expects a method signature like e.g.

int method_add(struct vector *a, struct vector *b, struct vector *sum);

If the arguments are polymorphic by default we cannot use this kind of methods signature, instead, the programmer must deal with complex extensionobject structures, which are hard to use.
So it is better to have this only for the rare cases where polymorphic types are expected and not for the normal case.

Jim Luth

2020-08-25 13:08

administrator   ~0012706

Should be clarified in Part 3.

Jeff Harding

2020-08-25 13:08

reporter   ~0012707

UA Working Group discussion

We could add an access level flag to a Variable to indicate if subtypes of the DataType are allowed. name could be 'allowSubDataTypes'
This flag is not applicable to abstract types only concrete types.
This can be applied to methods by using the method meta data.
This can be applied to event fields as there are just variables.
When subtyping a variable the datatype is sealed and can not be changed.
The default behavior, when the access level flag is not there, is to not allow subtypes of the DataType. We did not agree the default should be not allow.

Jeff Harding

2020-08-25 13:08

reporter   ~0012708

Added new Field 'NoSubDataTypes' to AccessLevelExType which indicates a Variable’s ability to SubType its DataType in 8.58

Randy Armstrong

2020-09-07 20:46

administrator   ~0012759

Add NoSubDataTypes bit = 0x800.

Jim Luth

2021-02-23 17:25

administrator   ~0013774

agreed to changes in telecon.

Issue History

Date Modified Username Field Change
2020-08-25 13:08 Jim Luth New Issue
2020-08-25 13:08 Jim Luth Status new => assigned
2020-08-25 13:08 Jim Luth Assigned To => Jeff Harding
2020-08-25 13:08 Jim Luth Issue generated from: 0004422
2020-08-25 13:08 Jim Luth Note Added: 0012705
2020-08-25 13:08 Jim Luth Note Added: 0012706
2020-08-25 13:08 Jim Luth Note Added: 0012707
2020-08-25 13:08 Jim Luth Note Added: 0012708
2020-08-25 13:08 Jim Luth Relationship added related to 0004422
2020-08-25 13:08 Jim Luth Project 10000-003: Address Space => NodeSets, XSDs and Generated Code
2020-08-25 13:08 Jim Luth Category Spec => Api Change
2020-08-25 13:09 Jim Luth Assigned To Jeff Harding => Randy Armstrong
2020-09-07 20:46 Randy Armstrong Status assigned => resolved
2020-09-07 20:46 Randy Armstrong Resolution open => fixed
2020-09-07 20:46 Randy Armstrong Note Added: 0012759
2020-11-10 17:46 Jim Luth Target Version => 1.05
2021-02-23 17:25 Jim Luth Status resolved => closed
2021-02-23 17:25 Jim Luth Fixed in Version => 1.05
2021-02-23 17:25 Jim Luth Note Added: 0013774