@@ -77,21 +77,24 @@ namespace nmos
77
77
auto found = find_control_protocol_resource (resources, nmos::types::nc_receiver_monitor, connection_resource.id );
78
78
if (resources.end () != found && nc_receiver_monitor_class_id == details::parse_nc_class_id (nmos::fields::nc::class_id (found->data )))
79
79
{
80
- // update receiver-monitor's connectionStatus propertry
80
+ // update receiver-monitor's connectionStatus and payloadStatus properties
81
81
82
82
const auto active = nmos::fields::master_enable (nmos::fields::endpoint_active (connection_resource.data ));
83
- const web::json::value value = active ? nc_connection_status::connected : nc_connection_status::disconnected;
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;
84
85
85
- // hmm, maybe updating connectionStatusMessage, payloadStatus, and payloadStatusMessage too
86
+ // hmm, maybe updating connectionStatusMessage and payloadStatusMessage too
86
87
87
88
const auto property_changed_event = make_property_changed_event (nmos::fields::nc::oid (found->data ),
88
89
{
89
- { nc_receiver_monitor_connection_status_property_id, nc_property_change_type::type::value_changed, value }
90
+ { 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 }
90
92
});
91
93
92
94
modify_control_protocol_resource (resources, found->id , [&](nmos::resource& resource)
93
95
{
94
- resource.data [nmos::fields::nc::connection_status] = value;
96
+ resource.data [nmos::fields::nc::connection_status] = connection_status;
97
+ resource.data [nmos::fields::nc::payload_status] = payload_status;
95
98
96
99
}, property_changed_event);
97
100
}
0 commit comments