Skip to main content
14-Alexandrite
November 20, 2015
Solved

How to get current property in edge client by Java SDK

  • November 20, 2015
  • 1 reply
  • 2065 views

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?

Best answer by 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.

1 reply

anishi14-AlexandriteAuthorAnswer
14-Alexandrite
November 25, 2015

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.

1-Visitor
June 3, 2016

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

5-Regular Member
July 15, 2016

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