Skip to content

Commit ed3df2f

Browse files
authored
Added the topic property to messages (#15)
Schemas have been updated to match the documentation changes
1 parent 47c60b7 commit ed3df2f

16 files changed

+191
-63
lines changed

APIs/schemas/event_core.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
"description": "ID of the source that holds the state that has changed",
2929
"type": "string",
3030
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
31+
},
32+
"flow_id": {
33+
"description": "ID of the flow carrying the message",
34+
"type": "string",
35+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
3136
}
3237
}
3338
},

APIs/schemas/message_connection_lost.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@
2525
"description": "ID of the source which identifies the emitter of the event",
2626
"type": "string",
2727
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
28+
},
29+
"flow_id": {
30+
"description": "ID of the flow carrying the message",
31+
"type": "string",
32+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
2833
}
2934
}
3035
}

APIs/schemas/message_shutdown_reboot.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
"description": "ID of the source which identifies the emitter of the event",
2727
"type": "string",
2828
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
29+
},
30+
"flow_id": {
31+
"description": "ID of the flow carrying the message",
32+
"type": "string",
33+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
2934
}
3035
}
3136
},
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"$id": "https://www.amwa.tv/event_and_tally/receiver_transport_params_ext.json",
3+
"$schema": "http://json-schema.org/draft-04/schema#",
4+
"description": "Describes external Sender transport parameters defined for IS-07 NMOS Event & Tally specification. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint.",
5+
"title": "External Sender Transport Parameters",
6+
"type": "object",
7+
"properties": {
8+
"ext_is_07_rest_api_url": {
9+
"type": [
10+
"string",
11+
"null"
12+
],
13+
"description": "the event and tally rest api url targeting the associated source"
14+
},
15+
"ext_is_07_source_id": {
16+
"type": [
17+
"string",
18+
"null"
19+
],
20+
"description": "ID of the related source",
21+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
22+
}
23+
}
24+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$id": "https://www.amwa.tv/event_and_tally/sender_transport_params_ext.json",
3+
"$schema": "http://json-schema.org/draft-04/schema#",
4+
"description": "Describes external Sender transport parameters defined for IS-07 NMOS Event & Tally specification. The constraints in this schema are minimum constraints, but may be further constrained at the constraints endpoint.",
5+
"title": "External Sender Transport Parameters",
6+
"type": "object",
7+
"properties": {
8+
"ext_is_07_rest_api_url": {
9+
"type": "string",
10+
"description": "the event and tally rest api url targeting the associated source"
11+
},
12+
"ext_is_07_source_id": {
13+
"type": "string",
14+
"description": "ID of the related source",
15+
"pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$"
16+
}
17+
}
18+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"sender_id": "eae33112-b56c-4a36-8b68-05ab5b6268bc",
3+
"master_enable": true,
4+
"activation": {
5+
"mode": "activate_immediate",
6+
"requested_time": "1541508905:0",
7+
"activation_time": "1541508905:263900"
8+
},
9+
"transport_file": {
10+
"data": null,
11+
"type": null
12+
},
13+
"transport_params": [
14+
{
15+
"source_host": "broker.mydomain.com",
16+
"source_port": 1883,
17+
"broker_topic": "my_topic_name",
18+
"ext_is_07_rest_api_url": "http://hostname/x-nmos/events/v1.0/sources/6cbd0441-7882-44cd-9557-842243a0d618",
19+
}
20+
]
21+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"sender_id": "eae33112-b56c-4a36-8b68-05ab5b6268bc",
3+
"master_enable": true,
4+
"activation": {
5+
"mode": "activate_immediate",
6+
"requested_time": "1541508905:0",
7+
"activation_time": "1541508905:263900"
8+
},
9+
"transport_file": {
10+
"data": null,
11+
"type": null
12+
},
13+
"transport_params": [{
14+
"connection_uri": "ws://hostname/x-nmos/events/v1.0/device_id/58f6b536-ca4c-43fd-880a-9df2501fc125",
15+
"ext_is_07_rest_api_url": "http://hostname/x-nmos/events/v1.0/sources/6cbd0441-7882-44cd-9557-842243a0d618",
16+
"ext_is_07_source_id": "6cbd0441-7882-44cd-9557-842243a0d618"
17+
}]
18+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"receiver_id": "69744dfb-0557-4202-b1f1-4d1a741ee2bb",
3+
"master_enable": true,
4+
"activation": {
5+
"mode": "activate_immediate",
6+
"requested_time": "1541508905:0",
7+
"activation_time": "1541508905:0"
8+
},
9+
"transport_params": [{
10+
"destination_host": "broker.mydomain.com",
11+
"destination_port": 1883,
12+
"broker_topic": "my_topic_name",
13+
"ext_is_07_rest_api_url": "http://hostname/x-nmos/events/v1.0/sources/6cbd0441-7882-44cd-9557-842243a0d618",
14+
}]
15+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"receiver_id": "69744dfb-0557-4202-b1f1-4d1a741ee2bb",
3+
"master_enable": true,
4+
"activation": {
5+
"mode": "activate_immediate",
6+
"requested_time": "1541508905:0",
7+
"activation_time": "1541508905:0"
8+
},
9+
"transport_params": [{
10+
"connection_uri": "ws://hostname/x-nmos/events/v1.0/device_id/58f6b536-ca4c-43fd-880a-9df2501fc125",
11+
"ext_is_07_rest_api_url": "http://hostname/x-nmos/events/v1.0/sources/6cbd0441-7882-44cd-9557-842243a0d618",
12+
"ext_is_07_source_id": "6cbd0441-7882-44cd-9557-842243a0d618"
13+
}]
14+
}
Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"identity":{
3-
"source_id": "6cbd0441-7882-44cd-9557-842243a0d618"
4-
},
5-
"message_type": "connection_lost"
2+
"identity":{
3+
"source_id": "6cbd0441-7882-44cd-9557-842243a0d618",
4+
"flow_id": "0febba81-d924-4bbf-b1d9-83a11fbabc61"
5+
},
6+
"message_type": "connection_lost"
67
}

0 commit comments

Comments
 (0)