Skip to main content
1-Visitor
July 10, 2014
Solved

Find the connection status using groovy

  • July 10, 2014
  • 2 replies
  • 1422 views

Does this property(in Bold😞

 

AssetCriteria assetCriteria = new AssetCriteria();

assetCriteria.setModelNumber(parameters.model);

FindAssetResult result = assetBridge.find(assetCriteria);

List assets = result.getAssets();

 

assets.each() {

    if (it.isOffline()){

        row.put("Status", "Not Connected");

    }else{

        row.put("Status", "Connected");

    }

}

 

correlate to this platform column (circled in yellow):

Capture.PNG

because I'm getting back false for every asset on the platform.

Thanks

Jay

    Best answer by cdovholuk

    It's a really easy thing to confuse but this is actually the 'missing' property not the offline property. Our documentation isn't very crisp here but from what I can tell 'offline' is used to describe the connection between an asset and a gateway device.

    So the property you're looking for here is the 'missing' property...

    2 replies

    cdovholuk5-Regular MemberAnswer
    5-Regular Member
    July 14, 2014

    It's a really easy thing to confuse but this is actually the 'missing' property not the offline property. Our documentation isn't very crisp here but from what I can tell 'offline' is used to describe the connection between an asset and a gateway device.

    So the property you're looking for here is the 'missing' property...

    jw614h1-VisitorAuthor
    1-Visitor
    July 15, 2014

    That worked.

    Thanks

    Jay