Avatar

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Problem in Euromap 83 model or prosys SDK?
January 18, 2019
9:30, EET
Avatar
Manfred Hausmann
Member
Members
Forum Posts: 18
Member Since:
September 21, 2018
sp_UserOfflineSmall Offline

Hallo

Euromap 83 defines an Event ParameterChangeLogType which is a subtype of LogbookEventType (subtype of BaseEventType) which has a component User of type UserType. The UserType has the mandatory properties Id, Name and IsPresent.

We observe the following behaviour: if a ParameterChangeLogType is triggered UaExpert (used as test client) does not show the properties Id, Name and IsPresent of the user.

But when we change the method com.prosysopc.ua.EventData.addComponentFields(UaNode, List) slightly, everything works as expected.
Here the changed method body (one statement added, see // <== added):

  private void addComponentFields(UaNode node, List basePath) {
    final UaReference[] components = node.getReferences(Identifiers.HasComponent, false);
    if (logger.isDebugEnabled()) {
      logger.debug("addComponentFields: components=" + Arrays.toString(components));
    }
    for (UaReference r : components) {
      final UaNode targetNode = r.getTargetNode();
      List browsePath = new ArrayList();
      if (basePath != null) {
        browsePath.addAll(basePath);
      }
      browsePath.add(targetNode.getBrowseName());
      if (targetNode instanceof UaVariable) {
        final UaVariable targetVariable = (UaVariable) targetNode;
        final Variant value = getVariableValue(targetVariable);
        if ((value != null) && !value.isEmpty()) {
          setFieldValue(browsePath, value);
        }
        addPropertyFields(targetVariable, browsePath);
      } else {
        addPropertyFields(targetNode, browsePath); // <== added
        addComponentFields(targetNode, browsePath);
      }
    }
  }

Do we have a problem with the Euromap model or is this a bug in the prosys Java SDK?

Regards,
Manfred

January 18, 2019
12:23, EET
Avatar
Bjarne Boström
Moderator
Moderators
Forum Posts: 1032
Member Since:
April 3, 2012
sp_UserOfflineSmall Offline

Hi,

Based on what I know about that model currently, it requires UA 1.04, i.e. in practice needs future SDK 4.0.0 in order to work. However your case is a bit special so I would prefer to continue via mail in this case. Additionally given that the source code is only available for the source-edition customers, preferably issues related to it should not be posted on the forum.

However thank you for reporting this. That might be an actual bug in the SDK, as UserType is an ObjectType. It is possible that that is the first Object InstanceDeclaration an EventType has had, which would fail direct Properties below it (as they have reference HasProperty).

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
15 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Heikki Tahvanainen: 402

hbrackel: 144

rocket science: 88

pramanj: 86

Francesco Zambon: 83

Ibrahim: 78

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

Member Stats:

Guest Posters: 0

Members: 730

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

rondawolinski7, Marypof5711, roycedelargie91, kourtneyquisenbe, ellis87832073466, zkxwilliemae, gabriellabachus, Deakin, KTP25Zof, Wojciech Kubala

Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1032, Jimmy Ni: 26, Matti Siponen: 349, Lusetti: 0

Administrators: admin: 1