Skip to content

Commit

Permalink
Merge pull request #1979 from SoftwareAG/DM-3581-measurement-request-…
Browse files Browse the repository at this point in the history
…operation-part-2

DM-3582: corrected and improved the measurement request operation docs
  • Loading branch information
BeateRixen committed May 23, 2024
2 parents 288f872 + 1d17589 commit f9f6e34
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ The following fragments can be added to the ```c8y_SupportedOperations``` fragme
<td>Requests a device to send a log file and view the log file in the log viewer</td>
</tr>
<tr>
<td><a href="#measurements">c8y_MeasurementRequestOperation</a></td>
<td>Displays a "Get measurements" action in the device action menu that sends an operation for retrieving measurements from a device.</td>
<td><a href="#measurement-request">c8y_MeasurementRequestOperation</a></td>
<td>Displays a "Get measurements" action in the device action menu that sends an operation for triggering a manual status update of a device.</td>
</tr>
<tr>
<td><a href="#connectivity">c8y_Mobile</a></td>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
weight: 130
title: Manual status update
layout: bundle
section:
- device_management
---

For cases where devices need a manual trigger for uploading a status update to the platform, the **Get measurements** button in the action bar of a device is available. It is shown when the device's `c8y_SupportedOperations` contains `c8y_MeasurementRequestOperation`.

This action creates a `c8y_MeasurementRequestOperation` operation.

```json
{
"c8y_MeasurementRequestOperation": {}
}
```

There is no additional configuration to specify the set of requested data points available. We recommend triggering an upload of the complete device state.

On receiving the operation the device is expected to perform the following actions:

1. Set the operation status to EXECUTING.
2. Upload the current status of all data points to the platform.
3. Set the operation status to SUCCESSFUL.

18 changes: 0 additions & 18 deletions content/device-integration/fragment-library-bundle/measurements.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,3 @@ There are several static templates available to create measurements in the 2xx r
`200,c8y_Temperature,T,25`

While using this template is possible for many use cases, we recommend you to create a custom template for all use cases where dynamically defining fragment and series are not required.

**Get measurements**
The **Get measurements** button in the action bar of a device is shown if the `c8y_MeasurementRequestOperation` fragment is present in the device's `c8y_SupportedOperations`.

This action creates a `c8y_MeasurementRequestOperation` operation with the same fragment signature as found in the device’s managed object. Its

```json
{
"creationTime": "2024-04-03T06:53:23.048Z",
"deviceId": "57109603201",
"id": "526001668",
"status": "PENDING",
"description": "Get measurements",
"c8y_MeasurementRequestOperation": {
"requestName": "LOG"
}
}
```

0 comments on commit f9f6e34

Please sign in to comment.