Skip to content

Commit 47c60b7

Browse files
cristian-recoseanumjeras
authored andcommitted
Documentation changes (#16)
Documentation changes after the feedback from other E&T group members was received
1 parent ce672e5 commit 47c60b7

12 files changed

+340
-264
lines changed

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
# [Work In Progress] AMWA IS-07 NMOS Event & Tally Specification
22

3-
This repository contains details of this AMWA Specification, including core models, transports, event types and a late joiners API.
3+
This repository contains details of this AMWA Specification, including message types, event types, core models, transports, rest api and measurement units guidelines.
44

55
## Getting started
66

77
Readers are advised to be familiar with:
8+
89
* The JT-NM Reference Architecture (http://jt-nm.org/)
910
* The [overview of Networked Media Open Specifications](https://amwa-tv.github.io/nmos)
11+
* The [NMOS Discovery and Registration Specification](https://github.com/AMWA-TV/nmos-discovery-registration) (IS-04)
12+
* The [NMOS Connection Management Specification](https://github.com/AMWA-TV/nmos-device-connection-management) (IS-05)
1013

11-
Readers should read the [documentation](docs/) in this repository.
14+
Readers should read the [documentation](docs/) in this repository, and the [APIs](APIs/), which are written in RAML.
1215

1316
HTML renders of this repo will be made available through [GitHub Pages](https://amwa-tv.github.io/nmos-event-tally)
1417

@@ -18,8 +21,11 @@ It is recommended that the tagged releases are used as a reference for developme
1821

1922
Each version of the specification is available under a v<#MAJOR>.<#MINOR> tag such as 'v1.0'. Once a specification has been released, any updates to its documentation and schemas which do not modify the specification will be made available via a v<#MAJOR>.<#MINOR>.<#UPDATE> tag such as 'v1.0.1'.
2023

24+
## Contents
2125

2226
* README.md -- This file
23-
* [docs](docs/) -- Documentation
27+
* [docs/](docs/) -- Documentation
28+
* [APIs/](APIs/) -- API descriptions
29+
* [examples/](examples/) -- Example JSON requests, responses and event messages
2430
* [LICENSE](LICENSE) -- Licenses for software and text documents
2531
* [NOTICE](NOTICE) -- Disclaimer

docs/1.0. Overview.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ The purpose of the Event & Tally specification is to provide a mechanism by whic
1212

1313
The specification is split into the following sections:
1414

15-
* [Message types](2.0.%20Message_types.md)
16-
* [Event types](3.0.%20Event_types.md)
17-
* [Core models](4.0.%20Core_models.md)
15+
* [Message types](2.0.%20Message%20types.md)
16+
* [Event types](3.0.%20Event%20types.md)
17+
* [Core models](4.0.%20Core%20models.md)
1818
* [Transports](5.0.%20Transports.md)
1919
* [MQTT](5.1.%20Transport%20-%20MQTT.md)
2020
* [Websocket](5.2.%20Transport%20-%20Websocket.md)
21-
* [Event & Tally REST API](6.0.%20Event_and_tally_rest_api.md)
22-
* [Measurement units guidelines](7.0.%20Measurement_units_guidelines.md)
21+
* [Event & Tally REST API](6.0.%20Event%20and%20tally%20rest%20api.md)
22+
* [Measurement units guidelines](7.0.%20Measurement%20units%20guidelines.md)
Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ These are the supported message types:
1919
* connection_lost (only used by MQTT connections)
2020
* health (only used by WebSocket connections)
2121

22+
For clarity, all MQTT message types are sent using the same MQTT topic defined through the transport parameter `broker_topic`.
23+
2224
### 1.1. The state message type
2325

24-
The `state` message type will always be sent when the emitter changes state and issues a new event or in a response to a query state request to the [Event & Tally REST API](6.0.%20Event_and_tally_rest_api.md).
26+
The `state` message type will always be sent when the emitter changes state and issues a new event or in a response to a query state request to the [Event & Tally REST API](6.0.%20Event%20and%20tally%20rest%20api.md).
2527
These will be the predominant message types being sent in an Event & Tally system.
2628

2729
The message structure shall have the following items:
@@ -38,7 +40,8 @@ Message structure
3840
{
3941
"identity":
4042
{
41-
"source_id": "6cbd0441-7882-44cd-9557-842243a0d618"
43+
"source_id": "6cbd0441-7882-44cd-9557-842243a0d618",
44+
"flow_id": "ff455cf3-fb17-448b-8f4c-e6c0e294f5ed"
4245
},
4346
"event_type": "boolean",
4447
"timing":
@@ -63,7 +66,9 @@ The `"action_timestamp"` represents the timestamp at which an event should be tr
6366

6467
The `"action_timestamp"` is not intended to be associated with delays of more than a few seconds, not for example to allow events scheduled in the future, it allows synchronisation of events in complex workflows.
6568

66-
The payload depends on the associated event_type (see [Event types](3.0.%20Event_types.md)).
69+
The payload depends on the associated event_type (see [Event types](3.0.%20Event%20types.md)).
70+
71+
The `flow_id` will _NOT_ be included in the response to a rest apy query state because the state is held by the source which has no dependency on a flow. It will, however, appear when being sent through one of the two specified transports because it will pass from the source through a flow and out on the network through the sender.
6772

6873
### 1.2. The reboot message type
6974

@@ -80,7 +85,8 @@ Message structure
8085
```json
8186
{
8287
"identity":{
83-
"source_id": "6cbd0441-7882-44cd-9557-842243a0d618"
88+
"source_id": "6cbd0441-7882-44cd-9557-842243a0d618",
89+
"flow_id": "ff455cf3-fb17-448b-8f4c-e6c0e294f5ed"
8490
},
8591
"timing":{
8692
"creation_timestamp": "1531680501:280709600"
@@ -106,7 +112,8 @@ Message structure
106112
```json
107113
{
108114
"identity":{
109-
"source_id": "6cbd0441-7882-44cd-9557-842243a0d618"
115+
"source_id": "6cbd0441-7882-44cd-9557-842243a0d618",
116+
"flow_id": "ff455cf3-fb17-448b-8f4c-e6c0e294f5ed"
110117
},
111118
"timing":{
112119
"creation_timestamp": "1531680501:280709600"
@@ -134,17 +141,23 @@ Message structure
134141
```json
135142
{
136143
"identity":{
137-
"source_id": "6cbd0441-7882-44cd-9557-842243a0d618"
144+
"source_id": "6cbd0441-7882-44cd-9557-842243a0d618",
145+
"flow_id": "ff455cf3-fb17-448b-8f4c-e6c0e294f5ed"
138146
},
139147
"message_type": "connection_lost"
140148
}
141149
```
142150

151+
For more information about `MQTT WILL` messages consult the MQTT specification and other MQTT materials:
152+
153+
* http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/csprd02/mqtt-v3.1.1-csprd02.html
154+
* https://www.hivemq.com/blog/mqtt-essentials-part-9-last-will-and-testament
155+
143156
### 1.5. The health message
144157

145158
The `health` message will only be sent on a WebSocket connection as a response to a `health` command see [Websocket transport](5.2.%20Transport%20-%20Websocket.md).
146159

147-
The recommendation for receivers is to detect missing `health` responses (no `health` response is sent back within 5 seconds) and after 2 consecutive missed `health` responses either attempt to reconnect to the WebSocket and re-initialise the subscriptions list or park the subscription and update the IS-04 model in the registry.
160+
The recommendation for receivers is to detect missing `health` responses (no `health` response is sent back within 5 seconds) and after a 12 seconds timeout (two consecutive missed `health` responses plus 2 seconds to allow for latencies) either attempt to reconnect to the WebSocket and re-initialise the subscriptions list or park the subscription and update the IS-04 model in the registry.
148161

149162
The message structure shall have the following items:
150163

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ These are the supported event types:
1616
* enum
1717
* object (out of scope for version 1.0 of this specification)
1818

19-
The types are identified by the corresponding values in the event_type field in an event message and the NMOS source. When additional restrictions are applied to an event type, the *type definition object* will be provided using the Event & Tally REST API (see [Event & Tally REST API](6.0.%20Event_and_tally_rest_api.md)). The type definition object will always define the type of the `value` field and can define restrictions on the value.
19+
The types are identified by the corresponding values in the event_type field in an event message and the NMOS source. When additional restrictions are applied to an event type, the *type definition object* will be provided using the Event & Tally REST API (see [Event & Tally REST API](6.0.%20Event%20and%20tally%20rest%20api.md)). The type definition object will always define the type of the `value` field and can define restrictions on the value.
2020

2121
## 2. Base types
2222

@@ -143,7 +143,7 @@ In the case where a unit of measure is specified for the number type, the event
143143

144144
The definition of the units of measure is out of scope of this specification but the SI system of units is highly recommended.
145145

146-
The recommended strategy for naming measurement units can be read in the [Measurement units guidelines](7.0.%20Measurement_units_guidelines.md) section.
146+
The recommended strategy for naming measurement units can be read in the [Measurement units guidelines](7.0.%20Measurement%20units%20guidelines.md) section.
147147

148148
#### _Example_:
149149

@@ -291,7 +291,7 @@ _Type definition_:
291291
An on/off switch with a bit of added metadata.
292292

293293
_Event Type_:
294-
`bool/enum/OnOff`
294+
`boolean/enum/OnOff`
295295

296296
_Payload_:
297297

@@ -386,16 +386,21 @@ Sources `"event_type"` field always needs to have an exact specific event type (
386386

387387
Receivers `"event_types"` field can have a specific event type or may have a derived partial event type using a wildcard (`*`).
388388

389-
A wildcard (`*`) can only be used at the end of an event_type definition.
389+
A wildcard (`*`) must replace a whole word and can only be used at the end of an event_type definition.
390390

391-
More details about NMOS resources in the section [Core models](4.0.%20Core_models.md).
391+
More details about NMOS resources in the section [Core models](4.0.%20Core%20models.md).
392392

393393
The wildcard allows a smart receiver to advertise a wider capability with a specific category above. This is useful information when building a user interface which handles connection management but also matches capabilities between senders and receivers.
394394

395395
An example of a receiver which may use a wildcard could be a smart software gauge which can auto-calibrate. This could advertise its capability as `number/*`.
396396

397397
Another example could be for a temperature receiver which supports any measurement unit. This could advertise its capability as `number/Temperature/*`.
398398

399-
Finally a temperature receiver which only supports degrees Celsius would advertise its capability as `number/Temperature/C`.
399+
A third example could be that of a temperature receiver which only supports degrees Celsius. It would advertise its capability as `number/Temperature/C`.
400+
401+
The following examples are invalid uses for a wildcard:
402+
403+
* `number/Tempera*`
404+
* `number/*/C`
400405

401406
![Event types capability management](images/event-types-capability-management.png)

0 commit comments

Comments
 (0)