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
{{ message }}
This repository was archived by the owner on Aug 5, 2022. It is now read-only.
Copy file name to clipboardExpand all lines: api/ocf/README.md
+22-15Lines changed: 22 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,6 @@ The `options` optional parameter is an object that may contain the following pro
64
64
65
65
The method runs the following steps:
66
66
- Return a [`Promise`](../README.md/#promise) object `promise` and continue [in parallel](https://html.spec.whatwg.org/#in-parallel).
67
-
- Let `ocf` denote the API object (equal to the `this` property of `start()`).
68
67
- If the `mode` argument is `undefined`, let `mode` be `"client-server"`.
69
68
- Otherwise if the `mode` argument is not `"client"`, or `"server"`, or `"client-server"`, reject `promise` with a `TypeError` and abort these steps.
70
69
- If the `mode` parameter is `"client"`, then run the following sub-steps:
@@ -93,31 +92,39 @@ Exposes information about the OCF device that runs the current OCF stack instanc
93
92
|Property |Type |Optional |Default value |Represents |
94
93
| --- | --- | --- | --- | --- |
95
94
|`uuid`| string | no |`undefined`| UUID of the device |
96
-
|`url`| string | yes |`undefined`| host:port|
97
95
|`name`| string | yes |`undefined`| Name of the device |
98
96
|`types`| array of strings | no |`[]`| List of supported OCF device types |
99
97
|`dataModels`| array of strings | no |`[]`| List of supported OCF data models |
100
98
|`coreSpecVersion`| string | no |`undefined`| OCF Core Specification version |
101
99
102
-
The `types` property is a list of the OCF Device types that are supported. It comforms to the same syntax constraints as [resource](./client.md/#resource) types. OCF mandates that every device supports at least the properties defined in the `"oic.wk.d"` resource type, that represents a resource for a "basic device". Other specifications, such as the OCF Smart Home Device Specification can define more device types, for instance `"oic.d.fan"`, `"oic.d.thermostat"`, `"oic.d.light"`, `"oic.d.airconditioner"`, etc. The properties exposed by these device types are defined in [oneiota.org](http://www.oneiota.org). The values in `types`may be used in [device discovery](./client.md/#finddevices) filters. For a client-only device `types`is an empty array.
100
+
The `uuid` property is generated by the underlying OCF stack during the on-boarding process. Applications may provide this property, but it may be changed by the implementation after the device is started.
103
101
104
-
The `dataModels` property is in the following format: `vertical.major.minor` where `major` and `minor` are numbers and `vertical` is a string such as `"Smart Home"`.
102
+
The `name` property represents the device name as provided by the application. Users can also set a free-form device name using the [configure()](./client.md/#configure) method that updates the `oic.wk.con` resource, hence does not alter `name`.
103
+
104
+
The `types` property is a list of the OCF Device types that are supported. It comforms to the same syntax constraints as [resource](./client.md/#resource) types. OCF mandates that every device supports at least the properties defined in the `"oic.wk.d"` resource type, that represents a resource for a "basic device". Other specifications, such as the OCF Smart Home Device Specification can define more device types, for instance `"oic.d.fan"`, `"oic.d.thermostat"`, `"oic.d.light"`, `"oic.d.airconditioner"`, etc. The properties exposed by these device types are defined in [oneiota.org](http://www.oneiota.org). The values in `types` may be used in [device discovery](./client.md/#finddevices) filters. For a client-only device `types` is an empty array. When a server device registers a new resource with a new resource type, this property SHOULD be updated by the implementation.
105
+
106
+
Elements of the `dataModels` property are in the following format: `vertical.major.minor.version` where `major`, `minor` and `version` are numbers and `vertical` is a string. For instance, in the OIC 1.1.0 Core Specification the supported data model version is `"res.1.1.0"`.
107
+
108
+
The `coreSpecVersion` is `"1.1.0"` in this version of the specification.
105
109
106
110
<aname="ocfplatform"></a>
107
111
### The `OcfPlatform` object
108
112
Exposes information about the OCF platform that hosts the current device.
109
113
110
-
|Property |Type |Optional |Default value |Represents |
111
-
| --- | --- | --- | --- | --- |
112
-
|`id`| string | no |`undefined`| Platform identifier |
113
-
|`osVersion`| string | yes |`undefined`| OS version |
114
-
|`model`| string | yes |`undefined`| Model of the hardware |
115
-
|`manufacturerName`| string | no |`undefined`| Manufacturer name |
116
-
|`manufacturerURL`| string | no |`undefined`| Manufacturer web page |
117
-
|`manufacturerDate`| Date | no |`undefined`| Manufacturing date |
118
-
|`platformVersion`| string | no |`undefined`| Platform version |
119
-
|`firmwareVersion`| string | no |`undefined`| Firmware version |
120
-
|`supportURL`| string | no |`undefined`| Product support web page |
114
+
|Property |Type |Optional |Default value |Represents |
115
+
| --- | --- | --- | --- | --- |
116
+
|`id`| string | no |`undefined`| Platform identifier |
117
+
|`model`| string | yes |`undefined`| Model of the hardware |
118
+
|`manufacturerName`| string | no |`undefined`| Manufacturer name |
119
+
|`manufacturerLink`| string | yes |`undefined`| Manufacturer URI |
120
+
|`manufactureDate`| Date | yes |`undefined`| Manufacturing date |
121
+
|`vendorId`| string | yes |`undefined`| Vendor ID |
122
+
|`osVersion`| string | yes |`undefined`| OS version |
123
+
|`platformVersion`| string | yes |`undefined`| Platform version |
124
+
|`firmwareVersion`| string | yes |`undefined`| Firmware version |
125
+
|`hardwareVersion`| string | yes |`undefined`| Firmware version |
126
+
|`supportURL`| string | yes |`undefined`| Product support web page |
127
+
|`datetime`| Date | yes |`undefined`| System time of the device |
0 commit comments