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: docs/Device implementation tutorial.md
+24-24Lines changed: 24 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ Further detail for each step is included in the [Guidance](#guidance) section.
54
54
55
55
This section provides guidance in select focus areas required for device implementations.
56
56
57
-
For full definitions of models referred to in this document please check the models published in the [Framework](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Framework.html) or the [Feature Sets Register](https://specs.amwa.tv/nmos-control-feature-sets/).
57
+
For full definitions of models referred to in this document please check the models published in the [Framework](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html) or the [Feature Sets Register](https://specs.amwa.tv/nmos-control-feature-sets/).
58
58
59
59
The basic device workflow follows the diagram below where individual steps are detailed in the following subsections.
60
60
@@ -64,13 +64,13 @@ The basic device workflow follows the diagram below where individual steps are d
64
64
65
65
### Modelling the control classes
66
66
67
-
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/NcObject.html) specification all control classes inherit from `NcObject`.
67
+
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/latest/docs/NcObject.html) specification all control classes inherit from `NcObject`.
68
68
69
-
This base control class exposes important properties but also [generic methods](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/NcObject.html#generic-getter-and-setter) for getting and setting property values.
69
+
This base control class exposes important properties but also [generic methods](https://specs.amwa.tv/ms-05-02/latest/docs/NcObject.html#generic-getter-and-setter) for getting and setting property values.
70
70
71
-
`NcObject` also defines the [PropertyChanged](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/NcObject.html#propertychanged-event) event which is fundamental for subscriptions and notifications to work.
71
+
`NcObject` also defines the [PropertyChanged](https://specs.amwa.tv/ms-05-02/latest/docs/NcObject.html#propertychanged-event) event which is fundamental for subscriptions and notifications to work.
72
72
73
-
As per the [MS-05-01](https://specs.amwa.tv/ms-05-01/branches/v1.0.x/docs/Identification.html) specification there are different types of identifiers which ultimately can be split into two categories:
73
+
As per the [MS-05-01](https://specs.amwa.tv/ms-05-01/latest/docs/Identification.html) specification there are different types of identifiers which ultimately can be split into two categories:
74
74
75
75
- dynamic identifiers (object identifiers)
76
76
- persistent identifiers (roles, class identities and data type names)
@@ -81,19 +81,19 @@ As per the [MS-05-01](https://specs.amwa.tv/ms-05-01/branches/v1.0.x/docs/Identi
81
81
82
82
#### Block control classes
83
83
84
-
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Blocks.html) specification blocks are containers for other control classes.
84
+
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/latest/docs/Blocks.html) specification blocks are containers for other control classes.
85
85
86
86
All devices have at the very least a `root block` which is the top most block in the device model. The root block has an `oid` of 1 and the role of `root`.
87
87
88
-
Control classes which are nested inside a block are advertised using descriptors in the `members` property of [NcBlock](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Framework.html#ncblock).
88
+
Control classes which are nested inside a block are advertised using descriptors in the `members` property of [NcBlock](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html#ncblock).
89
89
90
-
The `members` property in blocks enables [device model discovery](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Blocks.html#device-model-discovery) of the device structure.
90
+
The `members` property in blocks enables [device model discovery](https://specs.amwa.tv/ms-05-02/latest/docs/Blocks.html#device-model-discovery) of the device structure.
91
91
92
-
Blocks are also useful for quickly finding a particular control class by using the [search methods](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Blocks.html#search-methods) provided.
92
+
Blocks are also useful for quickly finding a particular control class by using the [search methods](https://specs.amwa.tv/ms-05-02/latest/docs/Blocks.html#search-methods) provided.
93
93
94
94
#### Manager control classes
95
95
96
-
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Managers.html) specification managers are special classes which collate information which pertains to the entire device.
96
+
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/latest/docs/Managers.html) specification managers are special classes which collate information which pertains to the entire device.
97
97
98
98
Typical managers included in the root block are:
99
99
@@ -102,7 +102,7 @@ Typical managers included in the root block are:
102
102
103
103
#### Worker control classes
104
104
105
-
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Workers.html) specification workers are special classes which handle control or monitoring features for a particular specific device domain.
105
+
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/latest/docs/Workers.html) specification workers are special classes which handle control or monitoring features for a particular specific device domain.
106
106
107
107
Different devices will need to use different workers depending on their functionality set.
108
108
@@ -112,13 +112,13 @@ Indeed, sometimes devices might also need to expose vendor specific functionalit
112
112
113
113
[BCP-008-01](https://specs.amwa.tv/bcp-008-01/) and [BCP-008-01](https://specs.amwa.tv/bcp-008-02/) define specialised NcReceiverMonitor and NcSenderMonitor worker classes which report relevant statuses, status messages and status transition counters for relevant domains like Connectivity, Synchronization or Stream validation.
114
114
115
-
Objects implementing these classes MUST publish the IS-04 resource identity they are monitoring (Sender or Receiver) through the [context identity mapping mechanism](#context-identity-mapping).
115
+
Objects implementing these classes publish the IS-04 resource identity they are monitoring (Sender or Receiver) through the [context identity mapping mechanism](#context-identity-mapping).
116
116
117
117
Sender and Receiver monitors derive from the base class NcStatusMonitor which specified an `overallStatus` property. This property combines the specific domain statuses of a monitor into a single status which can be more easily observed and displayed by a simple client.
118
118
119
119
#### Context identity mapping
120
120
121
-
[MS-05-02](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/NcObject.html#touchpoints) specifies an identity mapping mechanism available in the base `NcObject` class. This touchpoint mechanism can be used to associate identities from outside contexts with entities inside the control structure of the device.
121
+
[MS-05-02](https://specs.amwa.tv/ms-05-02/latest/docs/NcObject.html#touchpoints) specifies an identity mapping mechanism available in the base `NcObject` class. This touchpoint mechanism can be used to associate identities from outside contexts with entities inside the control structure of the device.
122
122
123
123
Examples include [Receiver monitors](https://specs.amwa.tv/bcp-008-01/branches/v1.0-dev/docs/Overview.html#touchpoints-and-is-04-receivers) and [Sender monitors](https://specs.amwa.tv/bcp-008-02/branches/v1.0-dev/docs/Overview.html#touchpoints-and-is-04-senders) which is express domain health statuses for an attached stream receiver or sender.
124
124
@@ -132,7 +132,7 @@ A device is expected to offer touchpoints to map identities wherever relevant (F
132
132
133
133
#### Typical device structure
134
134
135
-
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Blocks.html) specification all MS-05 / IS-12 devices need to expose a structure starting with the root block which always has an `oid` of 1.
135
+
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/latest/docs/Blocks.html) specification all MS-05 / IS-12 devices need to expose a structure starting with the root block which always has an `oid` of 1.
136
136
137
137
A minimal implementation of a device will have at least two [managers](Device%20implementation%20tutorial.md#manager-control-classes) listed in the root block:
138
138
@@ -147,9 +147,9 @@ A device is expected to allow its structure to be discovered (see [Block control
147
147
148
148
#### Non-standard classes used to model vendor specific functionality
149
149
150
-
Non-standard control classes can be created by branching off from a standard control class and following the class ID generation guidelines specified in [MS-05-01](https://specs.amwa.tv/ms-05-01/branches/v1.0.x/docs/Appendix_A_-_Class_ID_Format.html).
150
+
Non-standard control classes can be created by branching off from a standard control class and following the class ID generation guidelines specified in [MS-05-01](https://specs.amwa.tv/ms-05-01/latest/docs/Appendix_A_-_Class_ID_Format.html).
151
151
152
-
Here is an example of a new worker control class called `DemoClassAlpha`. It inherits from [NcWorker](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Framework.html#ncworker) which has an classId of `[1, 2]` and adds the authority key (in this case 0, but would be a negative number if the vendor has an OUI or CID) followed by the index 1.
152
+
Here is an example of a new worker control class called `DemoClassAlpha`. It inherits from [NcWorker](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html#ncworker) which has an classId of `[1, 2]` and adds the authority key (in this case 0, but would be a negative number if the vendor has an OUI or CID) followed by the index 1.
153
153
154
154
```json
155
155
{
@@ -191,7 +191,7 @@ A subsequent non-standard worker would look like this:
191
191
192
192
ensuring class identity uniqueness.
193
193
194
-
Alternatively the following diagram shows how a vendor may create a vendor specific Receiver monitor by deriving the standard Receiver monitor class.
194
+
Alternatively the following diagram shows how a vendor could create a vendor specific Receiver monitor by deriving the standard Receiver monitor class.
@@ -201,11 +201,11 @@ Alternatively the following diagram shows how a vendor may create a vendor speci
201
201
202
202
After a device has initiated its device model structure and allocated oids to every control class instance, it then either waits for external commands which interact with these entities (e.g. get/set values, invoke actions) or sends notifications for properties which have changed if there are subscriptions.
203
203
204
-
[IS-12](https://specs.amwa.tv/is-12/branches/v1.0.x/docs/Protocol_messaging.html) defines the protocol messaging behavior but also what the different JSON representations are for specific [data types](https://specs.amwa.tv/is-12/branches/v1.0.x/docs/Data_type_marshalling.html).
204
+
[IS-12](https://specs.amwa.tv/is-12/latest/docs/Protocol_messaging.html) defines the protocol messaging behavior but also what the different JSON representations are for specific [data types](https://specs.amwa.tv/is-12/latest/docs/Data_type_marshalling.html).
205
205
206
206
#### Control endpoint advertisement (in NMOS IS-04)
207
207
208
-
The [NMOS IS-12](https://specs.amwa.tv/is-12/branches/v1.0.x/docs/IS-04_interactions.html) specification explains that the control endpoint is advertised in the controls array as part of the NMOS device resource. The schema for the NMOS device resource is available in the [NMOS IS-04](https://specs.amwa.tv/is-04/branches/v1.3.1/APIs/schemas/with-refs/device.html) specification.
208
+
The [NMOS IS-12](https://specs.amwa.tv/is-12/latest/docs/IS-04_interactions.html) specification explains that the control endpoint is advertised in the controls array as part of the NMOS device resource. The schema for the NMOS device resource is available in the [NMOS IS-04](https://specs.amwa.tv/is-04/latest/APIs/schemas/with-refs/device.html) specification.
209
209
210
210
It is expected that an IS-12 enabled device exposes a `urn:x-nmos:control:ncp` control type in the controls array for its NMOS device resource.
211
211
@@ -234,26 +234,26 @@ Control endpoint example:
234
234
235
235
#### Mapping commands and returning responses
236
236
237
-
As per the [NMOS IS-12](https://specs.amwa.tv/is-12/branches/v1.0.x/docs/Protocol_messaging.html#command-message-type) specification a device is expected to respond to [Commands](https://specs.amwa.tv/is-12/branches/v1.0.x/docs/Sending_commands.html) sent by a controller.
237
+
As per the [NMOS IS-12](https://specs.amwa.tv/is-12/latest/docs/Protocol_messaging.html#command-message-type) specification a device is expected to respond to [Commands](https://specs.amwa.tv/is-12/latest/docs/Sending_commands.html) sent by a controller.
238
238
239
239
`Note`: Multiple commands can be sent in the commands array.
240
240
241
-
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/NcObject.html#generic-getter-and-setter) specification all control classes inherit from `NcObject` which specifies generic `Get` and `Set` methods.
241
+
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/latest/docs/NcObject.html#generic-getter-and-setter) specification all control classes inherit from `NcObject` which specifies generic `Get` and `Set` methods.
242
242
243
243
These methods can be used by a controller to get the value of a property in a control class or set the value of a property in a control class if write allowed. Furthermore, any control class could have other methods which can be invoked in the same way as the generic methods.
244
244
245
-
As specified by `MS-05-02` any method response inherits from the base data type [NcMethodResult](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Framework.html#ncmethodresult).
245
+
As specified by `MS-05-02` any method response inherits from the base data type [NcMethodResult](https://specs.amwa.tv/ms-05-02/latest/docs/Framework.html#ncmethodresult).
246
246
247
247
||
248
248
|:--:|
249
249
|_**Command example**_|
250
250
251
251
#### Subscriptions, events and notifications
252
252
253
-
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/NcObject.html#propertychanged-event) specification all control classes inherit from `NcObject` which specifies the `PropertyChanged` event.
253
+
As per the [MS-05-02](https://specs.amwa.tv/ms-05-02/latest/docs/NcObject.html#propertychanged-event) specification all control classes inherit from `NcObject` which specifies the `PropertyChanged` event.
254
254
255
255
This means any object in the device model can be subscribed to in order to receive property change notifications.
256
-
A device is expected to allow controllers to [Subscribe](https://specs.amwa.tv/is-12/branches/v1.0.x/docs/Subscribing_to_events.html) to object ids it is interested in by correctly handling `Subscription` messages and sending back `SubscriptionResponse` messages as specified in [NMOS IS-12](https://specs.amwa.tv/is-12/branches/v1.0.x/docs/Protocol_messaging.html).
256
+
A device is expected to allow controllers to [Subscribe](https://specs.amwa.tv/is-12/latest/docs/Subscribing_to_events.html) to object ids it is interested in by correctly handling `Subscription` messages and sending back `SubscriptionResponse` messages as specified in [NMOS IS-12](https://specs.amwa.tv/is-12/latest/docs/Protocol_messaging.html).
257
257
258
258
A device is also expected to use the underlying WebSocket control protocol context and the subscriptions received in order to determine when a notification message needs to be sent to a controller.
0 commit comments