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: 914
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: 267

Currently Online:
12 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

hbrackel: 111

pramanj: 86

ibrahim: 74

kapsl: 57

gjevremovic: 49

Xavier: 42

TimK: 41

fred: 41

Fransua33: 39

rocket science: 36

Member Stats:

Guest Posters: 0

Members: 1590

Moderators: 17

Admins: 1

Forum Stats:

Groups: 3

Forums: 15

Topics: 1192

Posts: 5057

Newest Members:

warnerfleming, Raymond23Freex, Charles1UsadY, Robertvem, albertinaduff53, wilbertrignall, Rogerbeedo, letamunn4183992, Lizazooda, Hectorner

Moderators: Jouni Aro: 914, Otso Palonen: 32, Tuomas Hiltunen: 5, janimakela: 0, Pyry: 1, Terho: 0, Petri: 0, Bjarne Boström: 695, Heikki Tahvanainen: 402, Jukka Asikainen: 1, moldzh08: 0, Jimmy Ni: 24, Teppo Uimonen: 21, Markus Johansson: 36, Niklas Nurminen: 0, Matti Siponen: 161, Lusetti: 0

Administrators: admin: 1