Skip to content

Commit

Permalink
Documentation updated for the release 0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
piconem committed Sep 5, 2024
1 parent 0b8dd66 commit 048a15b
Show file tree
Hide file tree
Showing 12 changed files with 957 additions and 15 deletions.
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,52 @@ npm run lint
```

and follow the linting reccomendations.

## Run the Local Server

```bash
npm run dev
```

## Page Creation

Some examples of page creation through npm commands:

```bash
npm run create docs/guides/dt_model.md
npm run create docs/guides/dt-model/dt_model.md
npm run create docs/guides/dt-model.md
npm run create docs/guides/dt-life-cycle.md
npm run create docs/introduction/library-structure.md
npm run create docs/guides/physical-adapter.md
npm run create docs/guides/_index.md
npm run create docs/guides/shadowing-function.md
npm run create docs/guides/digital-adapter.md
npm run create docs/guides/dt-process.md
npm run create docs/guides/digital-actions.md
npm run create docs/guides/dt-relationships.md
npm run create docs/guides/configurable-adapters.md
npm run create docs/change-logs/change-log-0.3.0.md
npm run create docs/change-logs/_index.md
npm run create docs/adapters/_index.md
npm run create docs/adapters/mqtt_physical.md
npm run create docs/adapters/mqtt_digital.md
npm run create docs/adapters/http_digital.md
```

#### New Change Log Creation

```bash
npm run create docs/change-logs/change-log-0.4.0.md
```

#### Blog Post Creation

```bash
npm run create blog/release_040.md
```

## References

- Hyas: https://gethyas.com/
- Thulite Docs: https://docs.thulite.io/
Binary file added assets/images/wldt_events.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion content/blog/release_030.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "ls WLDT Library Version 0.3.0"
title: "WLDT Library Version 0.3.0"
description: "Introducing WLDT Library Version 0.3.0"
summary: ""
date: 2024-03-13T16:27:22+02:00
Expand Down
34 changes: 34 additions & 0 deletions content/blog/release_040.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
---
title: "WLDT Library Version 0.4.0"
description: ""
summary: ""
date: 2024-08-29T17:40:54+02:00
lastmod: 2024-08-29T17:40:54+02:00
draft: false
weight: 50
images: []
categories: []
tags: []
contributors: []
pinned: false
homepage: false
---

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.

For detailed information about these changes and their impact, please refer to the information provided:

- [Official Changelog](/docs/change-logs/change-log-0.4.0/)
- [Official Documentation](/docs/guides/storage-layer/)

## Key Highlights

- **WldtEventObserver**: A new class has been introduced, simplifying the observation of specific events generated by Digital Twins and their components
- **Storage Layer**: The new storage layer allows DTs to store data related to their state, events, actions, and more. It consists of:
- `Storage Manager`: Manage and use various storage systems (e.g., in-memory, file-based, DBMS) simultaneously.
- `WldtStorage`: An abstract class to implement custom storage systems. The default in-memory storage is available for development and testing.
- `Query System`: The query system enables external components like Digital Adapters to retrieve stored data efficiently, supporting both synchronous and asynchronous queries.

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.

Stay tuned for more updates!
92 changes: 87 additions & 5 deletions content/docs/adapters/http_digital.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ Key Features:
- **Dynamic Configuration:** Offers a flexible configuration mechanism through the HttpDigitalAdapterConfiguration, allowing developers to customize the adapter's behavior based on specific requirements.
- **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).
- **Event Notifications:** Allows developers to retrieve event notifications triggered by changes in the Digital Twin state.
- **Storage & Query:** Since version 0.2 the HTTP Digital Adapter is able to retrieve Storage Statistics and execute query on the target DT

![HTTP Digital Adapter](images/http_digital_adapter_schema.jpg)

Expand All @@ -34,9 +35,10 @@ A complete example is provided in the `test` folder with a complete DT Creation

The correct mapping and compatibility between versions is reported in the following table

| **http-digital-adapter** | wldt-core 0.2.1 | wldt-core 0.3.0 |
|:------------------------:|:------------------:|:------------------:|
| 0.1.1 | :x: | :white_check_mark: |
| **http-digital-adapter** | wldt-core 0.2.1 | wldt-core 0.3.0 | wldt-core 0.4.0 |
|:------------------------:|:------------------:|:------------------:|:------------------:|
| 0.1.1 | :x: | :white_check_mark: | :white_check_mark: |
| 0.2 | :x: | :x: | :white_check_mark: |

## Installation

Expand All @@ -48,14 +50,14 @@ To use HttpDigitalAdapter in your Java project, you can include it as a dependen
<dependency>
<groupId>io.github.wldt</groupId>
<artifactId>http-digital-adapter</artifactId>
<version>0.1.1</version>
<version>0.2</version>
</dependency>
```

### Gradle

```groovy
implementation 'io.github.wldt:http-digital-adapter:0.1.1'
implementation 'io.github.wldt:http-digital-adapter:0.2'
```

## Class Structure & Functionalities
Expand Down Expand Up @@ -198,8 +200,88 @@ Available endpoints with the associated methods are:
- `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.
- `GET` `/state/relationships`: Retrieves the list of relationships in the Digital Twin state.
- `GET` `/state/relationships/{relationshipName}/instances`: Retrieves the instances of the specified relationship (e.g., /state/relationships/insideIn/instances) in the Digital Twin state.
- `GET` `/storage`: Retrieves Storage Statistics from the target Digital Twin
- `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/)

Note: Replace {propertyKey}, {actionKey}, and {relationshipName} with the actual values you want to retrieve or trigger.
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)

Example of Storage Query Requests are the following:

Retrieve the first 4 Digital Twin State Variations

```json
{
"resourceType": "DIGITAL_TWIN_STATE",
"queryType": "SAMPLE_RANGE",
"startIndex": 0,
"endIndex": 3
}
```

Retrieve Digital Twin State Variations in a Time Range

```json
{
"resourceType": "DIGITAL_TWIN_STATE",
"queryType": "TIME_RANGE",
"startIndex": 161989898,
"endIndex": 162989898
}
```

Retrieve the last Digital Twin State

```json
{
"resourceType": "DIGITAL_TWIN_STATE",
"queryType": "LAST_VALUE"
}
```

Available keywords for Query Resource Type and Query Type are the following (as explained in the dedicated [Query System Page](/docs/guides/storage-layer/)):

- PHYSICAL_ASSET_PROPERTY_VARIATION
- TIME_RANGE
- SAMPLE_RANGE
- COUNT
- PHYSICAL_ASSET_EVENT_NOTIFICATION
- TIME_RANGE
- SAMPLE_RANGE
- COUNT
- PHYSICAL_ACTION_REQUEST
- TIME_RANGE
- SAMPLE_RANGE
- COUNT
- DIGITAL_ACTION_REQUEST
- TIME_RANGE
- SAMPLE_RANGE
- COUNT
- DIGITAL_TWIN_STATE
- TIME_RANGE
- SAMPLE_RANGE
- COUNT
- LAST_VALUE
- NEW_PAD_NOTIFICATION
- TIME_RANGE
- SAMPLE_RANGE
- COUNT
- UPDATED_PAD_NOTIFICATION
- TIME_RANGE
- SAMPLE_RANGE
- COUNT
- PHYSICAL_RELATIONSHIP_INSTANCE_CREATED_NOTIFICATION
- TIME_RANGE
- SAMPLE_RANGE
- COUNT
- PHYSICAL_RELATIONSHIP_INSTANCE_DELETED_NOTIFICATION
- TIME_RANGE
- SAMPLE_RANGE
- COUNT
- LIFE_CYCLE_EVENT
- TIME_RANGE
- SAMPLE_RANGE
- COUNT
- LAST_VALUE
- STORAGE_STATS
- LAST_VALUE
8 changes: 4 additions & 4 deletions content/docs/adapters/mqtt_digital.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ a test MQTT consumer.

The correct mapping and compatibility between versions is reported in the following table

| **mqtt-digital-adapter** | wldt-core 0.2.1 | wldt-core 0.3.0 |
|:------------------------:|:------------------:|:------------------:|
| 0.1.0 | :white_check_mark: | :x: |
| 0.1.1 | :x: | :white_check_mark: |
| **mqtt-digital-adapter** | wldt-core 0.2.1 | wldt-core 0.3.0 | wldt-core 0.4.0 |
|:------------------------:|:------------------:|:------------------:|:------------------:|
| 0.1.0 | :white_check_mark: | :x: | :x: |
| 0.1.1 | :x: | :white_check_mark: | :white_check_mark: |

## Installation

Expand Down
8 changes: 4 additions & 4 deletions content/docs/adapters/mqtt_physical.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ a test MQTT consumer.

The correct mapping and compatibility between versions is reported in the following table

| **mqtt-physical-adapter** | wldt-core 0.2.1 | wldt-core 0.3.0 |
|:-------------------------:|:------------------:|:------------------:|
| 0.1.0 | :white_check_mark: | :x: |
| 0.1.1 | :x: | :white_check_mark: |
| **mqtt-physical-adapter** | wldt-core 0.2.1 | wldt-core 0.3.0 | wldt-core 0.4.0 |
|:-------------------------:|:------------------:|:------------------:|:------------------:|
| 0.1.0 | :white_check_mark: | :x: | :x: |
| 0.1.1 | :x: | :white_check_mark: | :white_check_mark: |

## Installation

Expand Down
Loading

0 comments on commit 048a15b

Please sign in to comment.