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
Copy file name to clipboardExpand all lines: README.md
+2-4Lines changed: 2 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -154,7 +154,7 @@ This example illustrates how a Weather Agent can be modeled using a Thing Descri
154
154
155
155
The `SimpleThing` class defines a Web of Things (WoT) model with properties, actions, and events using annotations. This structure allows external systems to interact with the Thing's state, invoke functionality, and subscribe to real-time notifications, all described in a Thing Description (TD), making it a flexible and extensible component for AI/IoT applications.
156
156
157
-
One of the key benefits of the Web of Things (WoT) framework is that developers can focus on building the core functionality of their applications without needing to delve into the low-level details of communication protocols like MQTT, WebSockets, or AMQP. By abstracting these protocols, kotlin-wot allows developers to use higher-level constructs such as coroutines and flows for managing asynchronous behavior and real-time interactions. With coroutines, developers can write non-blocking, concurrent code in a sequential and readable manner, simplifying the development of complex workflows. Flows, on the other hand, provide a powerful way to handle streams of data that can be emitted over time, making it easier to work with dynamic or event-driven environments. This abstraction minimizes the need for developers to manage protocol-specific intricacies and allows them to focus on implementing the logic and behavior of Things, enabling faster and more intuitive development.
157
+
One of the key benefits of the Web of Things (WoT) framework is that developers can focus on building the core functionality of their applications without needing to delve into the low-level details of communication protocols like MQTT, WebSockets, or AMQP. By abstracting these protocols, kotlin-wot allows developers to use constructs such as coroutines and flows for managing asynchronous behavior and real-time interactions. With coroutines, developers can write non-blocking, concurrent code in a sequential and readable manner, simplifying the development of complex workflows. Flows, on the other hand, provide a powerful way to handle streams of data that can be emitted over time, making it easier to work with dynamic or event-driven environments. This abstraction minimizes the need for developers to manage protocol-specific intricacies and allows them to focus on implementing the logic and behavior of Things, enabling faster and more intuitive development.
158
158
159
159
```kotlin
160
160
@Thing(
@@ -220,7 +220,7 @@ The `ThingDescription (TD)` is **automatically generated** based on the class pa
220
220
221
221
-**Properties** are derived from readable or writable fields.
222
222
-**Actions** are identified from callable methods.
223
-
-**Events** can be generated and configured using Kotlin flows or reactive streams.
223
+
-**Events** can be generated and configured using Kotlin flows.
224
224
225
225
```kotlin
226
226
val wot =Wot.create(servient)
@@ -247,8 +247,6 @@ servient.expose("agent")
247
247
-**Automatic TD Creation**: Save time and reduce errors with automatically generated Thing Descriptions.
248
248
-**Standards Compliance**: Ensures all Things are described in a standardized format, promoting interoperability.
249
249
250
-
With kotlin-wot, developers can focus on implementing business logic while the framework handles the complexities of protocol management and Thing Description generation.
251
-
252
250
## Step-by-Step Guide to Consuming a Thing and Interacting with It
253
251
254
252
Here’s how to consume a Thing and interact with its properties and actions in a Web of Things (WoT) setup. Below are the main steps extracted from the provided code:
0 commit comments