9:25, EEST
January 27, 2012
In my project I implemented an extension to OffNormalAlarmType. Thus, I thought that any method of parent classes will be inherited by my own AlarmType class.
However, when I browse to an instance of my AlarmType (extends of OffNormalAlarmType) either using UaExpert or SampleConsoleClient, I do not see methods “TimedShelve”, “OneShotShelve”, and “Unshelve”. Strange thing for me is that I do see the object “ShelvingState” with its variables CurrentState and LastTransition.
How will I get access to the methods of ShelvingState? What might I have done wrong?
Thanks
8:21, EEST
December 21, 2011
8:33, EEST
December 21, 2011
Well, I think it is and it isn’t as it should be 🙂
The methods are defined in the type, so you can handle them anyway, since the MethodId is defined in the type, and the call gets the object that the method is called as a parameter.
However, for ConditionType, for example, we have used registerOverridePlainMethod() to add a reference to the method nodes also to every instance.
For some reason (memory optimization to avoid extra references), the method references have been removed from the ShelvingStateMachineType. I am considering whether we should add them there again – or whether there should some option to define whether the method nodes should be added or not. It is probably best to add them there.
Anyway, as I explained, you should still be able to use the methods, even when they are not defined for every instance.
Most Users Ever Online: 1919
Currently Online:
23 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: 734
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1523
Posts: 6449
Newest Members:
christamcdowall, redaahern07571, nigelbdhmp, travistimmons, AnnelCib, dalenegettinger, howardkennerley, Thomassnism, biancacraft16, edgardo3518Moderators: Jouni Aro: 1026, Pyry: 1, Petri: 0, Bjarne Boström: 1026, Jimmy Ni: 26, Matti Siponen: 346, Lusetti: 0
Administrators: admin: 1