You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're excited to announce the release of WLDT version 0.4.0! This update brings powerful new features to enhance your Digital Twin (DT) experience, including event observation capabilities, a robust storage layer, and a flexible query system.
18
+
19
+
For detailed information about these changes and their impact, please refer to the information provided:
-**WldtEventObserver**: A new class has been introduced, simplifying the observation of specific events generated by Digital Twins and their components
27
+
-**Storage Layer**: The new storage layer allows DTs to store data related to their state, events, actions, and more. It consists of:
28
+
-`Storage Manager`: Manage and use various storage systems (e.g., in-memory, file-based, DBMS) simultaneously.
29
+
-`WldtStorage`: An abstract class to implement custom storage systems. The default in-memory storage is available for development and testing.
30
+
-`Query System`: The query system enables external components like Digital Adapters to retrieve stored data efficiently, supporting both synchronous and asynchronous queries.
31
+
32
+
WLDT 0.4.0 significantly enhances the flexibility and capabilities of Digital Twins, making it easier to manage and retrieve data, and observe events. We encourage developers to explore these new features and integrate them into their projects.
Copy file name to clipboardExpand all lines: content/docs/adapters/http_digital.md
+87-5
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,7 @@ Key Features:
25
25
-**Dynamic Configuration:** Offers a flexible configuration mechanism through the HttpDigitalAdapterConfiguration, allowing developers to customize the adapter's behavior based on specific requirements.
26
26
-**State Monitoring:** Monitors changes in the Digital Twin state and provides HTTP endpoints to query the state of the Digital Twin (properties, events, actions and relationships).
27
27
-**Event Notifications:** Allows developers to retrieve event notifications triggered by changes in the Digital Twin state.
28
+
-**Storage & Query:** Since version 0.2 the HTTP Digital Adapter is able to retrieve Storage Statistics and execute query on the target DT
28
29
29
30

30
31
@@ -34,9 +35,10 @@ A complete example is provided in the `test` folder with a complete DT Creation
34
35
35
36
The correct mapping and compatibility between versions is reported in the following table
@@ -198,8 +200,88 @@ Available endpoints with the associated methods are:
198
200
-`POST``/state/actions/{actionKey}`: Triggers the specified action (e.g., /state/actions/switch_on) in the Digital Twin state. The raw body contains the action request payload.
199
201
-`GET``/state/relationships`: Retrieves the list of relationships in the Digital Twin state.
200
202
-`GET``/state/relationships/{relationshipName}/instances`: Retrieves the instances of the specified relationship (e.g., /state/relationships/insideIn/instances) in the Digital Twin state.
203
+
-`GET``/storage`: Retrieves Storage Statistics from the target Digital Twin
204
+
-`POST``/storage/query`: Allows the execution of a query, where the query structure is specified through a JSON Message in the request Body. For additional information about the Query System see [Query System Page](/docs/guides/storage-layer/)
201
205
202
206
Note: Replace {propertyKey}, {actionKey}, and {relationshipName} with the actual values you want to retrieve or trigger.
203
207
Make sure to use the appropriate HTTP method (GET, POST) and include any required parameters or payload as described in each endpoint's description. For more detailed information, refer to the Postman Collection for this API available in the folder `api`: [http_adapter_api_postman.json](https://github.com/wldt/http-digital-adapter-java/blob/master/api/http_adapter_api_postman.json)
204
208
209
+
Example of Storage Query Requests are the following:
205
210
211
+
Retrieve the first 4 Digital Twin State Variations
212
+
213
+
```json
214
+
{
215
+
"resourceType": "DIGITAL_TWIN_STATE",
216
+
"queryType": "SAMPLE_RANGE",
217
+
"startIndex": 0,
218
+
"endIndex": 3
219
+
}
220
+
```
221
+
222
+
Retrieve Digital Twin State Variations in a Time Range
223
+
224
+
```json
225
+
{
226
+
"resourceType": "DIGITAL_TWIN_STATE",
227
+
"queryType": "TIME_RANGE",
228
+
"startIndex": 161989898,
229
+
"endIndex": 162989898
230
+
}
231
+
```
232
+
233
+
Retrieve the last Digital Twin State
234
+
235
+
```json
236
+
{
237
+
"resourceType": "DIGITAL_TWIN_STATE",
238
+
"queryType": "LAST_VALUE"
239
+
}
240
+
```
241
+
242
+
Available keywords for Query Resource Type and Query Type are the following (as explained in the dedicated [Query System Page](/docs/guides/storage-layer/)):
0 commit comments