Skip to content

Commit 11db167

Browse files
Merge pull request #462 from lo-simon/line-up-control-protocol-dataset
Update control protocol dataset
2 parents 6780e97 + c8d100b commit 11db167

13 files changed

+543
-118
lines changed

Development/nmos/api_utils.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ namespace nmos
168168
{ U("nc_manager"), nmos::types::nc_manager },
169169
{ U("nc_device_manager"), nmos::types::nc_device_manager },
170170
{ U("nc_class_manager"), nmos::types::nc_class_manager },
171-
{ U("nc_receiver_monitor"), nmos::types::nc_receiver_monitor },
172-
{ U("nc_receiver_monitor_protected"), nmos::types::nc_receiver_monitor_protected },
171+
{ U("nc_status_monitor"), nmos::types::nc_status_monitor }, // this is commonly used for nc_receiver_monitor and nc_sender_monitor
173172
{ U("nc_ident_beacon"), nmos::types::nc_ident_beacon }
174173
};
175174
return types_from_resourceType.at(resourceType);
@@ -195,8 +194,7 @@ namespace nmos
195194
{ nmos::types::nc_manager, U("nc_manager") },
196195
{ nmos::types::nc_device_manager, U("nc_device_manager") },
197196
{ nmos::types::nc_class_manager, U("nc_class_manager") },
198-
{ nmos::types::nc_receiver_monitor, U("nc_receiver_monitor") },
199-
{ nmos::types::nc_receiver_monitor_protected, U("nc_receiver_monitor_protected") },
197+
{ nmos::types::nc_status_monitor, U("nc_status_monitor") }, // this is commonly used for nc_receiver_monitor and nc_sender_monitor
200198
{ nmos::types::nc_ident_beacon, U("nc_ident_beacon") }
201199
};
202200
return resourceTypes_from_type.at(type);

Development/nmos/control_protocol_handlers.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,27 +74,24 @@ namespace nmos
7474
{
7575
return [&resources](const resource& connection_resource)
7676
{
77-
auto found = find_control_protocol_resource(resources, nmos::types::nc_receiver_monitor, connection_resource.id);
77+
auto found = find_control_protocol_resource(resources, nmos::types::nc_status_monitor, connection_resource.id);
7878
if (resources.end() != found && nc_receiver_monitor_class_id == details::parse_nc_class_id(nmos::fields::nc::class_id(found->data)))
7979
{
8080
// update receiver-monitor's connectionStatus and payloadStatus properties
8181

8282
const auto active = nmos::fields::master_enable(nmos::fields::endpoint_active(connection_resource.data));
83-
const web::json::value connection_status = active ? nc_connection_status::connected : nc_connection_status::disconnected;
84-
const web::json::value payload_status = active ? nc_payload_status::payload_ok : nc_payload_status::undefined;
83+
const web::json::value connection_status = active ? nc_connection_status::healthy : nc_connection_status::inactive;
8584

86-
// hmm, maybe updating connectionStatusMessage and payloadStatusMessage too
85+
// hmm, maybe updating connectionStatusMessage
8786

8887
const auto property_changed_event = make_property_changed_event(nmos::fields::nc::oid(found->data),
8988
{
9089
{ nc_receiver_monitor_connection_status_property_id, nc_property_change_type::type::value_changed, connection_status },
91-
{ nc_receiver_monitor_payload_status_property_id, nc_property_change_type::type::value_changed, payload_status }
9290
});
9391

9492
modify_control_protocol_resource(resources, found->id, [&](nmos::resource& resource)
9593
{
9694
resource.data[nmos::fields::nc::connection_status] = connection_status;
97-
resource.data[nmos::fields::nc::payload_status] = payload_status;
9895

9996
}, property_changed_event);
10097
}

Development/nmos/control_protocol_resource.cpp

Lines changed: 254 additions & 29 deletions
Large diffs are not rendered by default.

Development/nmos/control_protocol_resource.h

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,14 @@ namespace nmos
177177
// See https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Framework.html#ncworker
178178
web::json::value make_nc_worker(const nc_class_id& class_id, nc_oid oid, bool constant_oid, nc_oid owner, const utility::string_t& role, const web::json::value& user_label, const utility::string_t& description, const web::json::value& touchpoints, const web::json::value& runtime_property_constraints, bool enabled);
179179

180+
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncstatusmonitor
181+
web::json::value make_nc_status_monitor(const nc_class_id& class_id, nc_oid oid, bool constant_oid, nc_oid owner, const utility::string_t& role, const utility::string_t& user_label, const utility::string_t& description, const web::json::value& touchpoints, const web::json::value& runtime_property_constraints, bool enabled, nc_overall_status::status overall_status, const utility::string_t& overall_status_message, uint64_t status_reporting_delay);
182+
180183
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncreceivermonitor
181-
web::json::value make_receiver_monitor(const nc_class_id& class_id, nc_oid oid, bool constant_oid, nc_oid owner, const utility::string_t& role, const utility::string_t& user_label, const utility::string_t& description, const web::json::value& touchpoints, const web::json::value& runtime_property_constraints, bool enabled,
182-
nc_connection_status::status connection_status, const utility::string_t& connection_status_message, nc_payload_status::status payload_status, const utility::string_t& payload_status_message);
184+
web::json::value make_receiver_monitor(const nc_class_id& class_id, nc_oid oid, bool constant_oid, nc_oid owner, const utility::string_t& role, const utility::string_t& user_label, const utility::string_t& description, const web::json::value& touchpoints, const web::json::value& runtime_property_constraints, bool enabled, nc_overall_status::status overall_status, const utility::string_t& overall_status_message, nc_link_status::status link_status, const utility::string_t& link_status_message, nc_connection_status::status connection_status, const utility::string_t& connection_status_message, nc_synchronization_status::status external_synchronization_status, const utility::string_t& external_synchronization_status_message, const web::json::value& synchronization_source_id, nc_stream_status::status stream_status, const utility::string_t& stream_status_message, uint32_t status_reporting_delay, bool auto_reset_monitor);
185+
186+
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncsendermonitor
187+
web::json::value make_sender_monitor(const nc_class_id& class_id, nc_oid oid, bool constant_oid, nc_oid owner, const utility::string_t& role, const utility::string_t& user_label, const utility::string_t& description, const web::json::value& touchpoints, const web::json::value& runtime_property_constraints, bool enabled, nc_overall_status::status overall_status, const utility::string_t& overall_status_message, nc_link_status::status link_status, const utility::string_t& link_status_message, nc_transmission_status::status transmission_status, const utility::string_t& transmission_status_message, nc_synchronization_status::status external_synchronization_status, const utility::string_t& external_synchronization_status_message, const web::json::value& synchronization_source_id, nc_essence_status::status essence_status, const utility::string_t& essence_status_message, uint32_t status_reporting_delay, bool auto_reset_monitor);
183188

184189
// See https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Framework.html#ncmanager
185190
web::json::value make_nc_manager(const nc_class_id& class_id, nc_oid oid, bool constant_oid, const web::json::value& owner, const utility::string_t& role, const web::json::value& user_label, const utility::string_t& description, const web::json::value& touchpoints, const web::json::value& runtime_property_constraints);
@@ -236,10 +241,10 @@ namespace nmos
236241
web::json::value make_nc_ident_beacon_class();
237242
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncreceivermonitor
238243
web::json::value make_nc_receiver_monitor_class();
239-
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncreceivermonitorprotected
240-
web::json::value make_nc_receiver_monitor_protected_class();
244+
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncsendermonitor
245+
web::json::value make_nc_sender_monitor_class();
241246

242-
// control classes proprties/methods/events
247+
// control classes properties/methods/events
243248
// See https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Framework.html#ncobject
244249
web::json::value make_nc_object_properties();
245250
web::json::value make_nc_object_methods();
@@ -264,16 +269,19 @@ namespace nmos
264269
web::json::value make_nc_class_manager_properties();
265270
web::json::value make_nc_class_manager_methods();
266271
web::json::value make_nc_class_manager_events();
272+
// Monitoring feature set control classes
273+
// https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncstatusmonitor
274+
web::json::value make_nc_status_monitor_properties();
275+
web::json::value make_nc_status_monitor_methods();
276+
web::json::value make_nc_status_monitor_events();
267277
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncreceivermonitor
268278
web::json::value make_nc_receiver_monitor_properties();
269279
web::json::value make_nc_receiver_monitor_methods();
270280
web::json::value make_nc_receiver_monitor_events();
271-
272-
// Monitoring feature set control classes
273-
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncreceivermonitorprotected
274-
web::json::value make_nc_receiver_monitor_protected_properties();
275-
web::json::value make_nc_receiver_monitor_protected_methods();
276-
web::json::value make_nc_receiver_monitor_protected_events();
281+
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncsendermonitor
282+
web::json::value make_nc_sender_monitor_properties();
283+
web::json::value make_nc_sender_monitor_methods();
284+
web::json::value make_nc_sender_monitor_events();
277285

278286
// Identification feature set control classes
279287
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/identification/#ncidentbeacon
@@ -426,8 +434,22 @@ namespace nmos
426434
//
427435
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncconnectionstatus
428436
web::json::value make_nc_connection_status_datatype();
429-
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncpayloadstatus
430-
web::json::value make_nc_payload_status_datatype();
437+
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncessencestatus
438+
web::json::value make_nc_essence_status_datatype();
439+
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncoverallstatus
440+
web::json::value make_nc_overall_status_datatype();
441+
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#nclinkstatus
442+
web::json::value make_nc_link_status_datatype();
443+
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncsynchronizationstatus
444+
web::json::value make_nc_synchronization_status_datatype();
445+
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncstreamstatus
446+
web::json::value make_nc_stream_status_datatype();
447+
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#nccounter
448+
web::json::value make_nc_counter_datatype();
449+
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#nctransmissionstatus
450+
web::json::value make_nc_transmission_status_datatype();
451+
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncmethodresultcounters
452+
web::json::value make_nc_method_result_counters_datatype();
431453
}
432454

433455
#endif

Development/nmos/control_protocol_resources.cpp

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -67,22 +67,20 @@ namespace nmos
6767
//
6868
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncreceivermonitor
6969
control_protocol_resource make_receiver_monitor(nc_oid oid, bool constant_oid, nc_oid owner, const utility::string_t& role, const utility::string_t& user_label, const utility::string_t& description, const web::json::value& touchpoints, const web::json::value& runtime_property_constraints, bool enabled,
70-
nc_connection_status::status connection_status, const utility::string_t& connection_status_message, nc_payload_status::status payload_status, const utility::string_t& payload_status_message)
70+
nc_overall_status::status overall_status, const utility::string_t& overall_status_message, nc_link_status::status link_status, const utility::string_t& link_status_message, nc_connection_status::status connection_status, const utility::string_t& connection_status_message, nc_synchronization_status::status synchronization_status, const utility::string_t& synchronization_status_message, const web::json::value& synchronization_source_id, nc_stream_status::status stream_status, const utility::string_t& stream_status_message, uint32_t status_reporting_delay, bool auto_reset_monitor)
7171
{
72-
auto data = details::make_receiver_monitor(nc_receiver_monitor_class_id, oid, constant_oid, owner, role, user_label, description, touchpoints, runtime_property_constraints, enabled, connection_status, connection_status_message, payload_status, payload_status_message);
72+
auto data = details::make_receiver_monitor(nc_receiver_monitor_class_id, oid, constant_oid, owner, role, user_label, description, touchpoints, runtime_property_constraints, enabled, overall_status, overall_status_message, link_status, link_status_message, connection_status, connection_status_message, synchronization_status, synchronization_status_message, synchronization_source_id, stream_status, stream_status_message, status_reporting_delay, auto_reset_monitor);
7373

74-
return{ is12_versions::v1_0, types::nc_receiver_monitor, std::move(data), true };
74+
return{ is12_versions::v1_0, types::nc_status_monitor, std::move(data), true };
7575
}
76-
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncreceivermonitorprotected
77-
control_protocol_resource make_receiver_monitor_protected(nc_oid oid, bool constant_oid, nc_oid owner, const utility::string_t& role, const utility::string_t& user_label, const utility::string_t& description, const web::json::value& touchpoints, const web::json::value& runtime_property_constraints, bool enabled,
78-
nc_connection_status::status connection_status, const utility::string_t& connection_status_message, nc_payload_status::status payload_status, const utility::string_t& payload_status_message, bool signal_protection_status)
79-
{
80-
using web::json::value;
8176

82-
auto data = details::make_receiver_monitor(nc_receiver_monitor_protected_class_id, oid, constant_oid, owner, role, user_label, description, touchpoints, runtime_property_constraints, enabled, connection_status, connection_status_message, payload_status, payload_status_message);
83-
data[nmos::fields::nc::signal_protection_status] = value::boolean(signal_protection_status);
77+
// See https://specs.amwa.tv/nmos-control-feature-sets/branches/main/monitoring/#ncsendermonitor
78+
control_protocol_resource make_sender_monitor(nc_oid oid, bool constant_oid, nc_oid owner, const utility::string_t& role, const utility::string_t& user_label, const utility::string_t& description, const web::json::value& touchpoints, const web::json::value& runtime_property_constraints, bool enabled,
79+
nc_overall_status::status overall_status, const utility::string_t& overall_status_message, nc_link_status::status link_status, const utility::string_t& link_status_message, nc_transmission_status::status transmission_status, const utility::string_t& transmission_status_message, nc_synchronization_status::status synchronization_status, const utility::string_t& synchronization_status_message, const web::json::value& synchronization_source_id, nc_essence_status::status essence_status, const utility::string_t& essence_status_message, uint32_t status_reporting_delay, bool auto_reset_counters)
80+
{
81+
auto data = details::make_sender_monitor(nc_sender_monitor_class_id, oid, constant_oid, owner, role, user_label, description, touchpoints, runtime_property_constraints, enabled, overall_status, overall_status_message, link_status, link_status_message, transmission_status, transmission_status_message, synchronization_status, synchronization_status_message, synchronization_source_id, essence_status, essence_status_message, status_reporting_delay, auto_reset_counters);
8482

85-
return{ is12_versions::v1_0, types::nc_receiver_monitor_protected, std::move(data), true };
83+
return{ is12_versions::v1_0, types::nc_status_monitor, std::move(data), true };
8684
}
8785

8886
// Identification feature set control classes

0 commit comments

Comments
 (0)