Skip to content

Commit a3147c1

Browse files
committed
polishing ExposedThingInit example
1 parent 3e909c9 commit a3147c1

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

index.html

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3417,12 +3417,16 @@ <h2>ExposedThing Examples</h2>
34173417
console.log("Error creating ExposedThing: " + err);
34183418
}
34193419
</pre>
3420-
<p>The example below shows a serialization of a
3421-
<a>ExposedThingInit</a> as a JSON object. It can be noticed that it is not a valid <a>Thing Description</a> because it
3422-
misses the title, @context,
3423-
security information, and forms fields. Nevertheless, it could be used by a runtime as an hint to instantiate
3424-
the correct Thing Description; see <a>expand an ExposedThingInit</a> algorithm for further details.</p>
3425-
<aside class="example ds-selector-tabs" title="TODO">
3420+
<p>
3421+
The following will cover a set of examples for the generation of a <a>Thing Description</a> from
3422+
an <a>ExposedThingInit</a> using <a>expand an ExposedThingInit</a> steps. As hypothesis the runtime
3423+
supports HTTP and COAP protocol bindings and it is hosted at 192.168.0.1.
3424+
</p>
3425+
<p>
3426+
The next example shows how to exploit a <a>ExposedThingInit</a> to create a simple <a>Thing Description</a>
3427+
with one <a>Property</a> with the default values.
3428+
</p>
3429+
<aside class="example ds-selector-tabs" title="Create a Thing Description with one Property afforndace">
34263430
<div class="selectors">
34273431
<button class="selected" data-selects="init">ExposedThingInit</button>
34283432
<button data-selects="td">ThingDescription</button>
@@ -3450,15 +3454,21 @@ <h2>ExposedThing Examples</h2>
34503454
"properties": {
34513455
"temperature": {
34523456
"forms": [{
3453-
"href": "http://localhost:8080/properties/temperature",
3457+
"href": "http://192.168.0.1:8080/properties/temperature",
34543458
"contentType": "application/json"
3459+
},
3460+
{
3461+
"href": "coap://192.168.0.1:9090/properties/temperature",
3462+
"contentType": "application/json"
34553463
}]
34563464
}
34573465
}
34583466
}
34593467
</pre>
34603468
</aside>
3461-
3469+
<p class="ednote">
3470+
TODO: add more examples where the <a>ExposedThingInit</a> contains suggested values that are replaced by the algorithm.
3471+
</p>
34623472
</section> <!-- ExposedThing Examples -->
34633473
</section> <!-- ExposedThing -->
34643474

0 commit comments

Comments
 (0)