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

Community Tip - Want the oppurtunity to discuss enhancements to PTC products? Join a working group! X

Find the connection status using groovy

jw614h
7-Bedrock

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

ACCEPTED SOLUTION

Accepted Solutions
cdovholuk
12-Amethyst
(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
12-Amethyst
(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

Announcements


Top Tags