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: 1026
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
Member
Members
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: 1919

Currently Online:
61 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, edgardo3518

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

Administrators: admin: 1