Skip to content

Commit 23ea723

Browse files
author
Rohit Mohan
authored
Merge pull request #22 from ietf-wg-asdf/review-bart
review edits
2 parents 9472590 + 4013632 commit 23ea723

1 file changed

Lines changed: 34 additions & 27 deletions

File tree

draft-ietf-asdf-sdf-protocol-mapping.md

Lines changed: 34 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -71,22 +71,26 @@ Format (SDF) to enable mapping of protocol-agnostic SDF affordances to
7171
protocol-specific operations. The protocol mapping mechanism allows SDF models
7272
to specify how properties, actions, and events should be accessed using specific
7373
non-IP and IP protocols such as Bluetooth Low Energy, Zigbee or HTTP and CoAP.
74+
This document also describes a method to extend SCIM with an SDF model mappping.
7475

7576
--- middle
7677

7778
# Introduction
7879

80+
## Protocol Mapping
81+
7982
The Semantic Definition Format (SDF) {{-sdf}} provides a protocol-agnostic way
8083
to describe IoT devices and their capabilities through properties, actions, and
81-
events (collectively called affordances). However, when implementing these
82-
affordances on actual devices using specific communication protocols, there
84+
events (collectively called affordances). When implementing the SDF model
85+
for a device on an actual implementation using specific communication protocols, there
8386
needs to be a mechanism to map the protocol-agnostic SDF definitions to
84-
protocol-specific operations.
87+
protocol-specific operations, translating the model into a real-world implementation.
8588

8689
This document defines such a mechanism using the `sdfProtocolMap` keyword,
8790
which allows SDF models to include protocol-specific mapping information
88-
alongside the protocol-agnostic definitions. The mapping enables use cases
89-
such as multi-protocol gateways that translate between different IoT protocols,
91+
attached to the protocol-agnostic definitions. An `sdfProtocolMap` can be applied to
92+
an sdfAffordance, be it an sdfProperty, sdfEvent and sdfAction. The mapping enables use cases
93+
such as application gateways or multi-protocol gateways that translate between different IoT protocols,
9094
automated generation of protocol-specific implementations from SDF models, and
9195
interoperability across heterogeneous device ecosystems.
9296

@@ -96,23 +100,26 @@ and {{Zigbee30}}, as well as IP-based protocols such as HTTP {{?RFC9110}} or
96100
CoAP {{?RFC7252}}. This document registers mappings for BLE and Zigbee; future
97101
specifications can define mappings for additional protocols.
98102

103+
## SCIM SDF model extension
104+
105+
SDF providers a way to describe a class of devices and SCIM describes a device instance. The SDF model extension in this document defines a SCIM extension that enables inclusion of the SDF model for the class of devices a device belongs to in the SCIM object for that device.
99106

100107
# Conventions and Definitions
101108

102109
{::boilerplate bcp14-tagged}
103110

104111
# Structure
105112

106-
This section defines the structure of the protocol mapping mechanism.
113+
This section defines the structure of an `sdfProtocolMap`.
107114
Because each protocol has its own addressing model, a single SDF
108115
affordance requires a distinct mapping per protocol. For example, BLE
109116
addresses a property as a service characteristic, while Zigbee addresses
110117
it as an attribute in a cluster of an endpoint.
111118

112119
A protocol mapping object is a JSON object identified by the `sdfProtocolMap`
113-
keyword, inside an SDF affordance definition (sdfProperty, sdfAction,
120+
keyword, nested inside an SDF affordance definition (sdfProperty, sdfAction,
114121
or sdfEvent). Protocol-specific attributes are embedded within this object,
115-
keyed by a registered protocol name, e.g., "ble" or "zigbee".
122+
keyed by an IANA registered protocol name, e.g., "ble" or "zigbee".
116123

117124
~~~ aasvg
118125
sdfProperty / sdfAction / sdfEvent
@@ -184,7 +191,7 @@ new-protocol-property = {
184191
~~~
185192
{: #prop-ext-example title="Example Property Protocol Map Extension"}
186193

187-
The corresponding JSON in an SDF model would look like:
194+
The corresponding JSON in an SDF model looks like:
188195

189196
~~~ json
190197
{
@@ -300,7 +307,7 @@ new-protocol-event = {
300307
~~~
301308
{: #event-ext-example title="Example Event Protocol Map Extension"}
302309

303-
The corresponding JSON in an SDF model would look like:
310+
The corresponding JSON in an SDF model looks like:
304311

305312
~~~ json
306313
{
@@ -362,7 +369,7 @@ Where:
362369
- `serviceID` is the BLE service ID that corresponds to the SDF property.
363370
- `characteristicID` is the BLE characteristic ID that corresponds to the SDF property.
364371

365-
For example, a BLE protocol mapping for a temperature property might look like:
372+
For example, a BLE protocol mapping for a temperature property:
366373

367374
~~~ json
368375
{
@@ -380,7 +387,7 @@ For example, a BLE protocol mapping for a temperature property might look like:
380387
~~~
381388

382389
For a temperature property that has different mappings for read and write operations,
383-
the BLE protocol mapping might look like:
390+
here is an example of the BLE protocol mapping:
384391

385392
~~~ json
386393
{
@@ -405,7 +412,7 @@ the BLE protocol mapping might look like:
405412

406413
### Events
407414

408-
For SDF events, the BLE protocol mapping structure is similar, but it may
415+
For SDF events, the BLE protocol mapping structure is similar to SDF properties, but it must
409416
include additional attributes such as the type of the event.
410417

411418
~~~ cddl
@@ -421,7 +428,7 @@ Where:
421428
- `serviceID` and `characteristicID` are optional attributes that are
422429
specified if the type is "gatt".
423430

424-
For example, a BLE event mapping for a heart rate measurement event might look like:
431+
For example, a BLE event mapping for a heart rate measurement event:
425432

426433
~~~ json
427434
{
@@ -439,7 +446,7 @@ For example, a BLE event mapping for a heart rate measurement event might look l
439446
}
440447
~~~
441448

442-
Another example of an `isPresent` event using BLE advertisements:
449+
Here is an example of an `isPresent` event using BLE advertisements:
443450

444451
~~~ json
445452
{
@@ -479,9 +486,9 @@ Where:
479486
- `attributeID` is the Zigbee attribute ID that corresponds to the SDF property.
480487
- `attributeType` is the Zigbee data type of the attribute.
481488

482-
For example, a Zigbee protocol mapping for a temperature property might look like:
489+
For example, a Zigbee protocol mapping for a temperature property:
483490

484-
~~~ jsonc
491+
~~~ json
485492
{
486493
"sdfProperty": {
487494
"temperature": {
@@ -508,9 +515,9 @@ event protocol mapping structure is defined as follows:
508515
~~~
509516
{: #zigmap-event title="CDDL definition for Zigbee Protocol Mapping for events"}
510517

511-
For example, a Zigbee event mapping for a temperature change report might look like:
518+
For example, a Zigbee event mapping for a temperature change report:
512519

513-
~~~ jsonc
520+
~~~ json
514521
{
515522
"sdfEvent": {
516523
"temperatureChange": {
@@ -542,9 +549,9 @@ Where:
542549
- `clusterID` is the Zigbee cluster ID that corresponds to the SDF action.
543550
- `commandID` is the Zigbee command ID that corresponds to the SDF action.
544551

545-
For example, a Zigbee protocol mapping to set a temperature might look like:
552+
For example, a Zigbee protocol mapping to set a temperature:
546553

547-
~~~ jsonc
554+
~~~ json
548555
{
549556
"sdfAction": {
550557
"setTemperature": {
@@ -560,10 +567,9 @@ For example, a Zigbee protocol mapping to set a temperature might look like:
560567
}
561568
~~~
562569

563-
564570
# SCIM SDF Extension {#scim-sdf-extension}
565571

566-
While SDF provides a way to describe a device, a method is needed to associate a
572+
While SDF provides a way to describe a device class and SCIM defines a device instance, a method is needed to associate a
567573
mapping between an instance of a device and its associated SDF models. To
568574
accomplish this, we define a SCIM extension that can be used in conjunction with
569575
{{!I-D.ietf-scim-device-model}} in {{scim-sdf-extension-schema}}. Implementation
@@ -576,7 +582,7 @@ The SCIM schema attributes used here are described in Section 7 of {{!RFC7643}}.
576582
~~~
577583
{: #scim-sdf-extension-schema title="SCIM SDF Extension Schema"}
578584

579-
An example SCIM device schema extension might look like:
585+
Here is an example SCIM device schema extension with SDF models:
580586

581587
~~~ json
582588
{
@@ -596,6 +602,8 @@ An example SCIM device schema extension might look like:
596602
}
597603
~~~
598604

605+
An SDF model must be referenced with the `sdf` keyword inside the SCIM device schema as described in {{!I-D.ietf-scim-device-model}}
606+
599607
# Security Considerations
600608

601609
The security considerations of {{-sdf}} apply to this document as well.
@@ -694,7 +702,6 @@ The following non-normative model is provided for convenience of the implementor
694702
~~~~~~
695703
{: #protocolmapzigbee}
696704

697-
# Acknowledgments
698-
{:numbered="false"}
705+
# Acknowledgements
699706

700-
TODO acknowledge.
707+
This document relies on SDF models described in {{!RFC9880}}, as such, we are grateful to the authors of this document for putting their time and effort into defining SDF in depth, allowing us to make use of it. The authors would also like to thank the ASDF working group for their excellent feedback and steering of the document.

0 commit comments

Comments
 (0)