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 reading from a numeric NodeID
October 17, 2012
9:10, EEST
Avatar
Jahanzaib
New Member
Members
Forum Posts: 2
Member Since:
October 17, 2012
sp_UserOfflineSmall Offline

Currently I am exploring your UA Java stack for basic android client development, I am successful with basic connectivity by following “http://www.prosysopc.com/blog/2012/02/24/otso/15/”, but I am facing an error message while reading from a user defined numeric NodeID.

dv = myClient.readValue(Identifiers.Server_ServerStatus_CurrentTime); //Came with example and works fine
dv = myClient.readValue(NodeId.get(IdType.String, 4,”Counter1″)); //I added my self and work fine
dv = myClient.readValue(NodeId.get(IdType.Numeric, 4,518)); //throw an error message: ‘java.lang.ClassCastException:java.lang.Integer’

May be i am doing it wrong Frown I will appreciate someone helping me here?
Also I am using the evaluation version, and do not have access to the documentation of Java stack, the one came with evaluation does in list the classes but does not detail the attributes and functions, how can I get access to more detail documentaion to understand the stack more?

October 17, 2012
9:58, EEST
Avatar
Jahanzaib
New Member
Members
Forum Posts: 2
Member Since:
October 17, 2012
sp_UserOfflineSmall Offline

Problem solved Smile
dv = myClient.readValue(new NodeId(4, 518)); //Worked for me

October 17, 2012
11:05, EEST
Avatar
Jouni Aro
Moderator
Moderators
Forum Posts: 1009
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

Yes, the constructors work better than the get() method. The Numeric ID is actually UnsignedInteger, and get() expects such, instead of an int.

October 24, 2012
9:27, EEST
Avatar
xenonforlife
Member
Members
Forum Posts: 10
Member Since:
October 24, 2012
sp_UserOfflineSmall Offline

Jahanzaib said

Currently I am exploring your UA Java stack for basic android client development, I am successful with basic connectivity by following “http://www.prosysopc.com/blog/2012/02/24/otso/15/”, but I am facing an error message while reading from a user defined numeric NodeID.

dv = myClient.readValue(Identifiers.Server_ServerStatus_CurrentTime); //Came with example and works fine
dv = myClient.readValue(NodeId.get(IdType.String, 4,”Counter1″)); //I added my self and work fine
dv = myClient.readValue(NodeId.get(IdType.Numeric, 4,518)); //throw an error message: ‘java.lang.ClassCastException:java.lang.Integer’

May be i am doing it wrong Frown I will appreciate someone helping me here?
Also I am using the evaluation version, and do not have access to the documentation of Java stack, the one came with evaluation does in list the classes but does not detail the attributes and functions, how can I get access to more detail documentaion to understand the stack more?

I am facing a connection issue with the sample console server provided with the sdk. Could you please tell me if u faced similar issues. My emulator is running on android 2.3.3 and I have used opc.tcp://10.0.2.2:52520/OPCUA/SampleConsoleServer as my serverUri which was already present in the current Sample Android Application code, I did not change anything. But I noticed that the myClient.connect call is not being successful and thus my Application is force stopping. Could you please help me incase you faced similar issues. The steps I have followed is:-

1. Compile and run the Server in the console.
2. Compile and run the client on my android emulator.

I am using Eclipse IDE to do everything.

October 24, 2012
10:48, EEST
Avatar
Otso Palonen
Espoo, Finland
Moderator
Moderators
Forum Posts: 32
Member Since:
December 21, 2011
sp_UserOfflineSmall Offline

xenonforlife said

I am facing a connection issue with the sample console server provided with the sdk. Could you please tell me if u faced similar issues. My emulator is running on android 2.3.3 and I have used opc.tcp://10.0.2.2:52520/OPCUA/SampleConsoleServer as my serverUri which was already present in the current Sample Android Application code, I did not change anything. But I noticed that the myClient.connect call is not being successful and thus my Application is force stopping. Could you please help me incase you faced similar issues. The steps I have followed is:-

1. Compile and run the Server in the console.
2. Compile and run the client on my android emulator.

I am using Eclipse IDE to do everything.

We can discuss this issue further in this thread: http://www.prosysopc.com/blog/…..oleserver/

Forum Timezone: Europe/Helsinki

Most Users Ever Online: 518

Currently Online:
17 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 135

pramanj: 86

Francesco Zambon: 81

rocket science: 77

ibrahim: 75

Sabari: 62

kapsl: 57

gjevremovic: 49

Xavier: 43

fred: 41

Member Stats:

Guest Posters: 0

Members: 679

Moderators: 16

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1467

Posts: 6259

Newest Members:

elviralangwell4, Donnavek, Eddiefauth, DonaldPooma, fidelduke938316, Jan-Pfizer, DavidROunc, fen.pang@woodside.com, aytule

Moderators: Jouni Aro: 1009, Otso Palonen: 32, Tuomas Hiltunen: 5, Pyry: 1, Petri: 0, Bjarne Boström: 983, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 26, Teppo Uimonen: 21, Markus Johansson: 42, Niklas Nurminen: 0, Matti Siponen: 321, Lusetti: 0, Ari-Pekka Soikkeli: 5

Administrators: admin: 1