

12:21, EEST

March 28, 2023

Hi,
We use the PROSYS client server SDK 4.10.4. We have a client implementation that uses EnumStrings and TrueState and FalseState properties to resolve points as an MultiStateDiscreetType and TwoStateDiscreet type as enums, because checks like “dataValue instanceof Enumeration” don’t seem to work. We’re trying to add support for MultiStateValueDiscreetType by checking for “EnumValues” property. But the simulation server doesn’t allow us to add an array of EnumValueType as the value of “EnumValues,” so we’ve been stuck with that part. Is that a known bug?
10:36, EEST

Moderators
February 11, 2020

Hello,
I’m not sure what you are applying the “dataValue instanceof Enumeration” check to, but the Values of TwoStateDiscreteType and MultiStateValueDiscreteType are not Enumerations. Those VariableTypes have Properties that provide descriptions of their Values but the Values of these Properties are LocalizedText and EnumValueType for TwoStateDiscreteType and MultiStateValueDiscreteType respectively. The intended way of using these VariableTypes is to read their Values as usual and then check the Properties for the meanings of those Values.
For example, if the Value of a MultiStateValueDiscreteType Variable is 3, then you could check its EnumValues Property for the meaning of 3 by searching the list of EnumValueType values for one with 3 as the value of its value field. Similarly for TwoStateDiscreteType, if the Value is True, then you would check the TrueState Property for the meaning of this Value.
Regarding Simulation Server, you should be able to define an array of EnumValueType values for the EnumValues Property of a MultiStateValueDiscreteType Variable, but apparently there is a bug that prevents doing that and instead allows you to define only one EnumValueType value. We are investigating the cause of this bug and it shall be fixed in a future release. Thank you for bringing this bug to our attention.
12:08, EEST

March 28, 2023

Thanks Matti,
After writing here, I went on to follow the same methodology you mentioned, and I was able to parse the values as non-contiguous Enum. I had to use the UaCPP server to simulate the MultiStateValueDiscreetType for the time being. It would be nice to have a simulated point for MultiStateValueDiscreetType on the PROSYS simulation server.
Regards,
Gaurav
Most Users Ever Online: 1919
Currently Online:
118 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: 793
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1538
Posts: 6493
Newest Members:
sophiadavis, Waynegalse, Phillipbus, Oscarsat, WilliamJer, WilliamTunse, mvsjonah79, RaymondSmutt, Merlin AI pap, patlawrence98Moderators: Jouni Aro: 1027, Pyry: 1, Petri: 0, Bjarne Boström: 1037, Jimmy Ni: 26, Matti Siponen: 353, Lusetti: 0
Administrators: admin: 1