cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get current property in edge client by Java SDK

SOLVED
anishi
12-Amethyst

How to get current property in edge client by Java SDK

Hi,

I'm trying to make edge client application by Java SDK.

My idea is user can operate the device by changing value (Number) in mashup page and the client application watch the property value then it acts based on the number value.

I'm checking sample code and help but I only found updating the property from edge client, not by platform.

Is there anyone who have such sample regarding getting property in client side?

1 ACCEPTED SOLUTION

Accepted Solutions
anishi
12-Amethyst
(To:anishi)

I got answer as following.

For example, to get property "temerature"

double temp=(Double)getProperty("temperature").getValue().getValue();

I hope this will help someone has same problem.

View solution in original post

3 REPLIES 3
anishi
12-Amethyst
(To:anishi)

I got answer as following.

For example, to get property "temerature"

double temp=(Double)getProperty("temperature").getValue().getValue();

I hope this will help someone has same problem.

View solution in original post

bkaba
1-Newbie
(To:anishi)

Hi,

Are therey any aspects that should be set for this to properly work. Because after running the code as above ( in .net sdk btw), I cannot get the value from the platform.

Thanks

supandey
19-Tanzanite
(To:bkaba)

Bkaba, the aspect pushType should be either Always or Pushed based on Value change if you want the property value to be uploaded to the platform something like this "pushType:ALWAYS", otherwise the property will not be pushed to the platform.

BTW, this Aspect will work only for sending the data to the platform i.e. to the Thingworx server.

The code Akira is using is working for Java SDK, you might want to reconfirm the code you are writing if it complies with the requirement of .Net SDK.

Sushant

Announcements