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

No permission to create posts
sp_Feed Topic RSS sp_TopicIcon
Testing the Java SDK
August 22, 2012
11:38, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1026
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: 1026
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: 1026
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.

No permission to create posts
Forum Timezone: Europe/Helsinki

Most Users Ever Online: 1919

Currently Online:
20 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: 744

Moderators: 7

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1529

Posts: 6471

Newest Members:

guadalupechastai, joleenbunnell, WilliamViego, edwardobeckenbau, Charlesslota, hilda21x1388, bertZok, Bernardclila, doylenewbery, mickey21654

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

Administrators: admin: 1