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: sdf.md
+48-42Lines changed: 48 additions & 42 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -119,7 +119,7 @@ For example, this reference :
119
119
```
120
120
Creates a new definition "temperatureProperty" that contains all of the qualities defined in the definition at /odmData/temperatureData.
121
121
122
-
If a JSON Pointer is used without the "$ref" tag, it simply points to an SDF element. See the sections on "odmRequired" for an example.
122
+
If a JSON Pointer is used without the "$ref" tag, it points to an SDF element. See the sections on "odmRequired" for an example.
123
123
124
124
### Namespace Prefix
125
125
@@ -153,8 +153,6 @@ The keyword "odmRequired" is provided to apply a constraint for which definition
153
153
154
154
The value of "odmRequired" is an array JSON pointers, each indicating one mandatory definition.
155
155
156
-
The example uses [Relative JSON Pointer][] syntax to point to nearby definitions.
157
-
158
156
```json
159
157
{
160
158
"odmObject": {
@@ -186,6 +184,29 @@ The example uses [Relative JSON Pointer][] syntax to point to nearby definitions
186
184
}
187
185
```
188
186
187
+
The above example uses [Relative JSON Pointer][] syntax to point to nearby definitions.
188
+
189
+
The prefix of a relative JSON pointer indicates how many levels above the parent element of the JSON Pointer the following path string is relative to.
190
+
191
+
In this section, the pointer prefix "0" indicates that the following path is relative to the parent element "temperatureWithAlarm".
192
+
193
+
```json
194
+
"temperatureWithAlarm": {
195
+
"odmRequired": [
196
+
"0/odmData/temperatureData",
197
+
"0/odmEvent/overTemperatureEvent"
198
+
],
199
+
}
200
+
```
201
+
202
+
In this section, the pointer prefix of "4" indicates that the following path is relative to the element four levels above the parent element, in this case also pointing to the element "temperatureWithAlarm".
The following SDF keywords are used to create type definitions in the target namespace.
@@ -206,14 +227,12 @@ The odmObject keyword denotes zero or more Object definitions. A object may cont
206
227
|odmType|object|no|reference to a definition to be used as a template for a new definition|N/A |
207
228
|odmRequired|array|no|Array of JSON Pointers to mandatory items in a valid definition | N/A |
208
229
209
-
-odmObject may define or include
230
+
odmObject may define or include the following odmTypes:
210
231
211
-
|odmType|
212
-
|---|
213
-
|odmProperty|
214
-
|odmAction|
215
-
|odmEvent|
216
-
|odmData|
232
+
- odmProperty
233
+
- odmAction
234
+
- odmEvent
235
+
- odmData
217
236
218
237
219
238
### odmProperty
@@ -256,11 +275,9 @@ Properties are used to model elements of state.
256
275
|const|number, boolean, string|no|specifies a constant value for a data item or property| N/A |
257
276
258
277
259
-
-odmProperty may define or include
278
+
odmProperty may define or include the following odmTypes:
260
279
261
-
|odmType|
262
-
|---|
263
-
|odmData|
280
+
- odmData
264
281
265
282
### odmAction
266
283
@@ -283,11 +300,9 @@ Actions are used to model commands and methods which are invoked. Actions have p
283
300
|odmInclude|array|no|Array of JSON Pointers to definitions to be included|N/A|
284
301
|odmType|object|no|reference to a definition to be used as a template for a new definition|
285
302
286
-
-odmAction may define or include
303
+
odmAction may define or include the following odmTypes:
287
304
288
-
|odmType|
289
-
|---|
290
-
|odmData|
305
+
- odmData
291
306
292
307
293
308
### odmEvent
@@ -309,11 +324,9 @@ Events are used to model asynchronous occurrences that may be communicated proac
309
324
|odmInclude|array|no|Array of JSON Pointers to definitions to be included|N/A|
310
325
|odmType|object|no|reference to a definition to be used as a template for a new definition|
311
326
312
-
- odmTypes Event may define or include
327
+
odmEvent may define or include the following odmTypes:
313
328
314
-
|odmType|
315
-
|---|
316
-
|odmData|
329
+
- odmData
317
330
318
331
319
332
### odmData
@@ -353,11 +366,9 @@ odmData is used for Action parameters, for Event data, and for reusable constrai
353
366
|default|number, boolean, string|no|specifies the default value for initialization|
354
367
|const|number, boolean, string|no|specifies a constant value for a data item or property|
355
368
356
-
-odmData may define or contain
369
+
odmData may define or contain the following odmTypes:
357
370
358
-
|odmType|
359
-
|---|
360
-
|(JSON Schema Types with numeric constraint extensions)|
371
+
- JSON Schema Types with numeric constraint extensions
361
372
362
373
363
374
## Example Simple Object Definition:
@@ -419,10 +430,9 @@ Modular composition of definitions enables an existing definition (could be in t
419
430
An existing definition may be used as a template for a new definition, that is, a new definition is created in the target namespace which uses the defined qualities of some existing definition. This pattern will use the keyword "odmType" as a quality of a new definition with a value consisting of a reference to the existing definition that is to be used as a template. Optionally, new qualities may be added and values of optional qualities and quality values may be defined.
420
431
421
432
#### The "odmInclude" keyword
422
-
An existing definition may be used, with its name and its path in the model namespace, as virtual element in a new definition. This has the effect of linking to an instance when the model is deployed as run time. This pattern is useful to link properties, actions, and events from one object to another object, or to link objects together in a complex thing definition. This, aling with named views, supports modeling of the OCF "interface type" feature denoted by the "if" query parameter.
433
+
One or more existing definition may be used, with its name and its path in the model namespace, as virtual element in a new definition. This has the effect of linking to an instance when the model is deployed as run time. This pattern is useful to link properties, actions, and events from one object to another object, or to link objects together in a complex thing definition. This, aling with named views, supports modeling of the OCF "interface type" feature denoted by the "if" query parameter.
423
434
424
435
### odmView
425
-
426
436
The odmView element provides a composed type that defines a named view, and which uses the odmInclude keyword to populate the view with one or more instances of odmThing, odmObject, odmProperty, odmEvent, or odmAction.
427
437
428
438
- Qualities of odmView
@@ -437,15 +447,13 @@ The odmView element provides a composed type that defines a named view, and whic
437
447
|odmInclude|array|no|Array of JSON Pointers to definitions to be included|N/A|
438
448
439
449
440
-
-odmView may define or include
450
+
odmView may define or include the following odmTypes:
441
451
442
-
|odmType|
443
-
|---|
444
-
|odmThing|
445
-
|odmObject|
446
-
|odmProperty|
447
-
|odmAction|
448
-
|odmEvent|
452
+
- odmThing
453
+
- odmObject
454
+
- odmProperty
455
+
- odmAction
456
+
- odmEvent
449
457
450
458
451
459
### odmThing
@@ -468,13 +476,11 @@ Thing definitions carry semantic meaning, such as a defined refrigerator compart
468
476
|odmInclude|array|no|Array of JSON Pointers to definitions to be included|N/A|
469
477
|odmType|object|no|reference to a definition to be used as a template for a new definition|
470
478
471
-
-odmThing may define or include
479
+
odmThing may define or include the following odmTypes:
0 commit comments