Avatar
Please consider registering
guest
sp_LogInOut Log Insp_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 RSSsp_TopicIcon
Testing the Java SDK
August 22, 2012
11:38, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1044
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

You will need to override IoManager.writeValue in the MyBigIoManager.

August 23, 2012
12:42, EEST
Avatar
myp
Member
Members
Forum Posts: 17
Member Since:
July 23, 2012
sp_UserOfflineSmall Offline

When doing so, i assume it’s the UaVariable arg2 that i need to modify. This is null however. Any pointers to how i continue?

August 23, 2012
13:26, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1044
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

The DataItem:s are not implemented with UaVariable objects, but inside the MyBigNodeManager.

August 27, 2012
8:42, EEST
Avatar
myp
Member
Members
Forum Posts: 17
Member Since:
July 23, 2012
sp_UserOfflineSmall Offline

Should i interpret that as that there is no relatively easy way to alter the server in such a way that it can update values sent from the client live? Or maybe you would be so kind to elaborate how one would go around and modify the IoManager.writeValue in MyBigIoManager?

August 27, 2012
10:45, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1044
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

It should be pretty straight forward, if you compare against readValue(). E.g.:

@Override
protected boolean writeValue(ServiceContext serviceContext,
NodeId nodeId, UaVariable node, NumericRange indexRange,
DataValue dataValue) throws StatusException {
DataItem dataItem = getDataItem(nodeId);
if (dataItem == null)
throw new StatusException(StatusCodes.Bad_NodeIdInvalid);
dataItem.setValue(dataValue.getValue().doubleValue(),
dataValue.getStatusCode());
return true;
}

Just make sure that simulation is also disabled (in MyBigNodeManager.simulate()), since it is writing the values normally all the time.

Forum Timezone: Europe/Helsinki
Most Users Ever Online: 1919
Currently Online:
Guest(s) 58
Currently Browsing this Page:
2 Guest(s)
Top Posters:
Heikki Tahvanainen: 402
hbrackel: 144
rocket science: 100
pramanj: 86
Francesco Zambon: 83
Ibrahim: 78
Sabari: 62
kapsl: 57
gjevremovic: 49
Xavier: 43
Member Stats:
Guest Posters: 0
Members: 773
Moderators: 7
Admins: 1
Forum Stats:
Groups: 3
Forums: 15
Topics: 1558
Posts: 6567
Newest Members:
aracelyhaley4, raphaelschonell, Ashmag, kathyreimann56, brittanylemos, dorthycundiff76, PromotionToold, CHHinrichs, rodricklienhop, jose_Wanderlei
Moderators: Jouni Aro: 1039, Pyry: 1, Petri: 1, Bjarne Boström: 1054, Jimmy Ni: 26, Matti Siponen: 359, Lusetti: 0
Administrators: admin: 1