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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

Find the connection status using groovy

jw614h
1-Newbie

Find the connection status using groovy

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

1 ACCEPTED SOLUTION

Accepted Solutions
cdovholuk
6-Contributor
(To:jw614h)

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...

View solution in original post

2 REPLIES 2
cdovholuk
6-Contributor
(To:jw614h)

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...

That worked.

Thanks

Jay

Top Tags