Skip to content

Commit

Permalink
Convert github.com/AMWA-TV links into specs.amwa.tv links
Browse files Browse the repository at this point in the history
Fix some remaining, now broken, '.x' links and bump IS-07 and IS-08 links from v1.0.0 to v1.0.1
  • Loading branch information
garethsb committed Dec 10, 2021
1 parent ea7cc6e commit 2f379d7
Show file tree
Hide file tree
Showing 79 changed files with 373 additions and 380 deletions.
6 changes: 3 additions & 3 deletions Development/nmos-cpp-node/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

// registration_heartbeat_interval [registry, node]:
// "Nodes are expected to peform a heartbeat every 5 seconds by default."
// See https://github.com/AMWA-TV/nmos-discovery-registration/blob/v1.2.0/docs/4.1.%20Behaviour%20-%20Registration.md#heartbeating
// See https://specs.amwa.tv/is-04/releases/v1.2.0/docs/4.1._Behaviour_-_Registration.html#heartbeating
//"registration_heartbeat_interval": 5,

// registration_request_max [node]: timeout for interactions with the Registration API /resource endpoint
Expand All @@ -136,13 +136,13 @@

// events_heartbeat_interval [node, client]:
// "Upon connection, the client is required to report its health every 5 seconds in order to maintain its session and subscription."
// See https://github.com/AMWA-TV/nmos-event-tally/blob/v1.0.0/docs/5.2.%20Transport%20-%20Websocket.md#41-heartbeats
// See https://specs.amwa.tv/is-07/releases/v1.0.1/docs/5.2._Transport_-_Websocket.html#41-heartbeats
//"events_heartbeat_interval": 5,

// events_expiry_interval [node]:
// "The server is expected to check health commands and after a 12 seconds timeout (2 consecutive missed health commands plus 2 seconds to allow for latencies)
// it should clear the subscriptions for that particular client and close the websocket connection."
// See https://github.com/AMWA-TV/nmos-event-tally/blob/v1.0.0/docs/5.2.%20Transport%20-%20Websocket.md#41-heartbeats
// See https://specs.amwa.tv/is-07/releases/v1.0.1/docs/5.2._Transport_-_Websocket.html#41-heartbeats
//"events_expiry_interval": 12,

// system_address [node]: IP address or host name used to construct request URLs for the System API (if not discovered via DNS-SD)
Expand Down
14 changes: 7 additions & 7 deletions Development/nmos-cpp-node/node_implementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -510,25 +510,25 @@ void node_implementation_init(nmos::node_model& model, slog::base_gate& gate)
{
event_type = impl::temperature_Celsius;

// see https://github.com/AMWA-TV/nmos-event-tally/blob/v1.0.1/docs/3.0.%20Event%20types.md#231-measurements
// and https://github.com/AMWA-TV/nmos-event-tally/blob/v1.0.1/examples/eventsapi-type-number-measurement-get-200.json
// and https://github.com/AMWA-TV/nmos-event-tally/blob/v1.0.1/examples/eventsapi-state-number-measurement-get-200.json
// see https://specs.amwa.tv/is-07/releases/v1.0.1/docs/3.0._Event_types.html#231-measurements
// and https://specs.amwa.tv/is-07/releases/v1.0.1/examples/eventsapi-type-number-measurement-get-200.html
// and https://specs.amwa.tv/is-07/releases/v1.0.1/examples/eventsapi-state-number-measurement-get-200.html
events_type = nmos::make_events_number_type({ -200, 10 }, { 1000, 10 }, { 1, 10 }, U("C"));
events_state = nmos::make_events_number_state({ source_id, flow_id }, { 201, 10 }, event_type);
}
else if (impl::ports::burn == port)
{
event_type = nmos::event_types::boolean;

// see https://github.com/AMWA-TV/nmos-event-tally/blob/v1.0.1/docs/3.0.%20Event%20types.md#21-boolean
// see https://specs.amwa.tv/is-07/releases/v1.0.1/docs/3.0._Event_types.html#21-boolean
events_type = nmos::make_events_boolean_type();
events_state = nmos::make_events_boolean_state({ source_id, flow_id }, false);
}
else if (impl::ports::nonsense == port)
{
event_type = nmos::event_types::string;

// see https://github.com/AMWA-TV/nmos-event-tally/blob/v1.0.1/docs/3.0.%20Event%20types.md#22-string
// see https://specs.amwa.tv/is-07/releases/v1.0.1/docs/3.0._Event_types.html#22-string
// and of course, https://en.wikipedia.org/wiki/Metasyntactic_variable
events_type = nmos::make_events_string_type(0, 0, U("^foo|bar|baz|qu+x$"));
events_state = nmos::make_events_string_state({ source_id, flow_id }, U("foo"));
Expand All @@ -537,7 +537,7 @@ void node_implementation_init(nmos::node_model& model, slog::base_gate& gate)
{
event_type = impl::catcall;

// see https://github.com/AMWA-TV/nmos-event-tally/blob/v1.0.1/docs/3.0.%20Event%20types.md#3-enum
// see https://specs.amwa.tv/is-07/releases/v1.0.1/docs/3.0._Event_types.html#3-enum
events_type = nmos::make_events_number_enum_type({
{ 1, { U("meow"), U("chatty") } },
{ 2, { U("purr"), U("happy") } },
Expand Down Expand Up @@ -938,7 +938,7 @@ nmos::connection_resource_auto_resolver make_node_implementation_auto_resolver(c
const auto& constraints = nmos::fields::endpoint_constraints(connection_resource.data);

// "In some cases the behaviour is more complex, and may be determined by the vendor."
// See https://github.com/AMWA-TV/nmos-device-connection-management/blob/v1.0.0/docs/2.2.%20APIs%20-%20Server%20Side%20Implementation.md#use-of-auto
// See https://specs.amwa.tv/is-05/releases/v1.0.0/docs/2.2._APIs_-_Server_Side_Implementation.html#use-of-auto
if (rtp_sender_ids.end() != boost::range::find(rtp_sender_ids, id_type.first))
{
const bool smpte2022_7 = 1 < transport_params.size();
Expand Down
10 changes: 5 additions & 5 deletions Development/nmos-cpp-registry/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@
// [registry]: used in System API resource is04 object's heartbeat_interval field
// "Constants related to the AMWA IS-04 Discovery and Registration Specification are contained in the is04 object.
// heartbeat_interval defines how often Nodes should perform a heartbeat to maintain their resources in the Registration API."
// See https://github.com/AMWA-TV/nmos-system/blob/v1.0.0/docs/4.2.%20Behaviour%20-%20Global%20Configuration%20Parameters.md#amwa-is-04-nmos-discovery-and-registration-parameters
// See https://specs.amwa.tv/is-09/releases/v1.0.0/docs/4.2._Behaviour_-_Global_Configuration_Parameters.html#amwa-is-04-nmos-discovery-and-registration-parameters
//"registration_heartbeat_interval": 5,

// registration_expiry_interval [registry]:
// "Registration APIs should use a garbage collection interval of 12 seconds by default (triggered just after two failed heartbeats at the default 5 second interval)."
// See https://github.com/AMWA-TV/nmos-discovery-registration/blob/v1.2.0/docs/4.1.%20Behaviour%20-%20Registration.md#heartbeating
// See https://specs.amwa.tv/is-04/releases/v1.2.0/docs/4.1._Behaviour_-_Registration.html#heartbeating
//"registration_expiry_interval": 12,

// query_paging_default/query_paging_limit [registry]: default/maximum number of results per "page" when using the Query API (a client may request a lower limit)
Expand Down Expand Up @@ -183,11 +183,11 @@
// "tag_1": [ "tag_1_value_1", "tag_1_value_2" ],
// "tag_2": [ "tag_2_value_1" ]
// }
// See https://github.com/AMWA-TV/nmos-system/blob/v1.0.0/docs/2.1.%20APIs%20-%20Common%20Keys.md#tags
// See https://specs.amwa.tv/is-09/releases/v1.0.0/docs/2.1._APIs_-_Common_Keys.html#tags
//"system_tags": {},

// "syslog contains hostname and port for the system's syslog "version 1" server using the UDP transport (IETF RFC 5246)"
// See https://github.com/AMWA-TV/nmos-system/blob/v1.0.0/docs/4.2.%20Behaviour%20-%20Global%20Configuration%20Parameters.md#syslog-parameters
// See https://specs.amwa.tv/is-09/releases/v1.0.0/docs/4.2._Behaviour_-_Global_Configuration_Parameters.html#syslog-parameters

// system_syslog_hostname [registry]: the fully-qualified host name or the IP address of the system's syslog "version 1" server
//"system_syslog_hostname": "",
Expand All @@ -196,7 +196,7 @@
//"system_syslog_port": 514,

// "syslogv2 contains hostname and port for the system's syslog "version 2" server using the TLS transport (IETF RFC 5245)"
// See https://github.com/AMWA-TV/nmos-system/blob/v1.0.0/docs/4.2.%20Behaviour%20-%20Global%20Configuration%20Parameters.md#syslog-parameters
// See https://specs.amwa.tv/is-09/releases/v1.0.0/docs/4.2._Behaviour_-_Global_Configuration_Parameters.html#syslog-parameters

// system_syslogv2_hostname [registry]: the fully-qualified host name or the IP address of the system's syslog "version 2" server
//"system_syslogv2_hostname": "",
Expand Down
2 changes: 1 addition & 1 deletion Development/nmos/activation_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
namespace nmos
{
// Connection API activation mode
// See https://github.com/AMWA-TV/nmos-device-connection-management/blob/v1.0.0/APIs/schemas/v1.0-activation-schema.json
// See https://specs.amwa.tv/is-05/releases/v1.0.0/APIs/schemas/with-refs/v1.0-activation-schema.html
DEFINE_STRING_ENUM(activation_mode)
namespace activation_modes
{
Expand Down
10 changes: 5 additions & 5 deletions Development/nmos/activation_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ namespace nmos
activation[nmos::fields::requested_time] = value::null();

// "If no activation was requested in the PATCH `activation_time` will be set `null`."
// See https://github.com/AMWA-TV/nmos-device-connection-management/blob/v1.0.0/APIs/ConnectionAPI.raml
// See https://specs.amwa.tv/is-05/releases/v1.0.0/APIs/ConnectionAPI.html
activation[nmos::fields::activation_time] = value::null();

break;
Expand All @@ -93,8 +93,8 @@ namespace nmos
activation[nmos::fields::mode] = value::null();

// Each of these fields "returns to null [...] when the resource is unlocked by setting the activation mode to null."
// See https://github.com/AMWA-TV/nmos-device-connection-management/blob/v1.0.0/APIs/schemas/v1.0-activation-response-schema.json
// and https://github.com/AMWA-TV/nmos-device-connection-management/blob/v1.1.0/APIs/schemas/activation-response-schema.json
// See https://specs.amwa.tv/is-05/releases/v1.0.0/APIs/schemas/with-refs/v1.0-activation-response-schema.html
// and https://specs.amwa.tv/is-05/releases/v1.1.0/APIs/schemas/with-refs/activation-response-schema.html
activation[nmos::fields::requested_time] = value::null();
activation[nmos::fields::activation_time] = value::null();

Expand All @@ -104,7 +104,7 @@ namespace nmos

// "For immediate activations, in the response to the PATCH request this field
// will be set to 'activate_immediate'"
// See https://github.com/AMWA-TV/nmos-device-connection-management/blob/v1.0.0/APIs/schemas/v1.0-activation-response-schema.json
// See https://specs.amwa.tv/is-05/releases/v1.0.0/APIs/schemas/with-refs/v1.0-activation-response-schema.html
activation[nmos::fields::mode] = value::string(nmos::activation_modes::activate_immediate.name);

// "For an immediate activation this field will always be null on the staged endpoint,
Expand All @@ -125,7 +125,7 @@ namespace nmos
activation[nmos::fields::requested_time] = request_activation.at(nmos::fields::requested_time);

// "For scheduled activations `activation_time` should be the absolute TAI time the parameters will actually transition."
// See https://github.com/AMWA-TV/nmos-device-connection-management/blob/v1.0.0/APIs/ConnectionAPI.raml
// See https://specs.amwa.tv/is-05/releases/v1.0.0/APIs/ConnectionAPI.html
auto absolute_requested_time = get_absolute_requested_time(activation, request_time);
activation[nmos::fields::activation_time] = value::string(nmos::make_version(absolute_requested_time));

Expand Down
2 changes: 1 addition & 1 deletion Development/nmos/api_downgrade.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace nmos
{
// See https://github.com/AMWA-TV/nmos-discovery-registration/blob/v1.2.0/docs/2.5.%20APIs%20-%20Query%20Parameters.md#downgrade-queries
// See https://specs.amwa.tv/is-04/releases/v1.2.0/docs/2.5._APIs_-_Query_Parameters.html#downgrade-queries

bool is_permitted_downgrade(const nmos::resource& resource, const nmos::api_version& version)
{
Expand Down
2 changes: 1 addition & 1 deletion Development/nmos/api_downgrade.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// "Downgrade queries permit old-versioned responses to be provided to clients which are confident
// that they can handle any missing attributes between the specified API versions."
// See https://github.com/AMWA-TV/nmos-discovery-registration/blob/v1.2.0/docs/2.5.%20APIs%20-%20Query%20Parameters.md#downgrade-queries
// See https://specs.amwa.tv/is-04/releases/v1.2.0/docs/2.5._APIs_-_Query_Parameters.html#downgrade-queries
namespace nmos
{
struct api_version;
Expand Down
2 changes: 1 addition & 1 deletion Development/nmos/api_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ namespace nmos

// construct a standard NMOS "child resources" response, from the specified sub-routes
// merging with ones from an existing response
// see https://github.com/AMWA-TV/nmos-discovery-registration/blob/v1.2.0/docs/2.0.%20APIs.md#api-paths
// see https://specs.amwa.tv/is-04/releases/v1.2.0/docs/2.0._APIs.html#api-paths
web::json::value make_sub_routes_body(std::set<utility::string_t> sub_routes, const web::http::http_request& req, web::http::http_response res)
{
using namespace web::http::experimental::listener::api_router_using_declarations;
Expand Down
2 changes: 1 addition & 1 deletion Development/nmos/api_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ namespace nmos

// construct a standard NMOS "child resources" response, from the specified sub-routes
// merging with ones from an existing response
// see https://github.com/AMWA-TV/nmos-discovery-registration/blob/v1.2.0/docs/2.0.%20APIs.md#api-paths
// see https://specs.amwa.tv/is-04/releases/v1.2.0/docs/2.0._APIs.html#api-paths
web::json::value make_sub_routes_body(std::set<utility::string_t> sub_routes, const web::http::http_request& req, web::http::http_response res);

// construct sub-routes for the specified API versions
Expand Down
14 changes: 7 additions & 7 deletions Development/nmos/capabilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
namespace nmos
{
// BCP-004-01 Receiver Capabilities
// See https://github.com/AMWA-TV/nmos-receiver-capabilities/blob/v1.0.0/docs/1.0.%20Receiver%20Capabilities.md
// See https://specs.amwa.tv/bcp-004-01/releases/v1.0.0/docs/1.0._Receiver_Capabilities.html
namespace fields
{
const web::json::field_as_value_or constraint_sets{ U("constraint_sets"), {} };
Expand All @@ -19,19 +19,19 @@ namespace nmos
template <> nmos::rational inline no_minimum() { return (std::numeric_limits<int64_t>::max)(); }
template <> nmos::rational inline no_maximum() { return 0; }

// See https://github.com/AMWA-TV/nmos-receiver-capabilities/blob/v1.0.0/docs/1.0.%20Receiver%20Capabilities.md#string-constraint-keywords
// See https://specs.amwa.tv/bcp-004-01/releases/v1.0.0/docs/1.0._Receiver_Capabilities.html#string-constraint-keywords
web::json::value make_caps_string_constraint(const std::vector<utility::string_t>& enum_values = {});

// See https://github.com/AMWA-TV/nmos-receiver-capabilities/blob/v1.0.0/docs/1.0.%20Receiver%20Capabilities.md#integer-and-number-constraint-keywords
// See https://specs.amwa.tv/bcp-004-01/releases/v1.0.0/docs/1.0._Receiver_Capabilities.html#integer-and-number-constraint-keywords
web::json::value make_caps_integer_constraint(const std::vector<int64_t>& enum_values = {}, int64_t minimum = no_minimum<int64_t>(), int64_t maximum = no_maximum<int64_t>());

// See https://github.com/AMWA-TV/nmos-receiver-capabilities/blob/v1.0.0/docs/1.0.%20Receiver%20Capabilities.md#integer-and-number-constraint-keywords
// See https://specs.amwa.tv/bcp-004-01/releases/v1.0.0/docs/1.0._Receiver_Capabilities.html#integer-and-number-constraint-keywords
web::json::value make_caps_number_constraint(const std::vector<double>& enum_values = {}, double minimum = no_minimum<double>(), double maximum = no_maximum<double>());

// See https://github.com/AMWA-TV/nmos-receiver-capabilities/blob/v1.0.0/docs/1.0.%20Receiver%20Capabilities.md#boolean-constraint-keywords
// See https://specs.amwa.tv/bcp-004-01/releases/v1.0.0/docs/1.0._Receiver_Capabilities.html#boolean-constraint-keywords
web::json::value make_caps_boolean_constraint(const std::vector<bool>& enum_values = {});

// See https://github.com/AMWA-TV/nmos-receiver-capabilities/blob/v1.0.0/docs/1.0.%20Receiver%20Capabilities.md#rational-constraint-keywords
// See https://specs.amwa.tv/bcp-004-01/releases/v1.0.0/docs/1.0._Receiver_Capabilities.html#rational-constraint-keywords
web::json::value make_caps_rational_constraint(const std::vector<nmos::rational>& enum_values = {}, const nmos::rational& minimum = no_minimum<nmos::rational>(), const nmos::rational& maximum = no_maximum<nmos::rational>());

bool match_string_constraint(const utility::string_t& value, const web::json::value& constraint);
Expand All @@ -41,7 +41,7 @@ namespace nmos
bool match_rational_constraint(const nmos::rational& value, const web::json::value& constraint);

// NMOS Parameter Registers - Capabilities register
// See https://github.com/AMWA-TV/nmos-parameter-registers/blob/main/capabilities/README.md
// See https://specs.amwa.tv/nmos-parameter-registers/branches/main/capabilities/
namespace caps
{
namespace meta
Expand Down
2 changes: 1 addition & 1 deletion Development/nmos/channelmapping_activation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ namespace nmos
// At the moment, it doesn't seem necessary to enable support multiple API instances via the API selector mechanism
// so therefore just a single Channel Mapping API instance is mounted directly at /x-nmos/channelmapping/{version}/
// If it becomes necessary, each device could associated with a specific API selector
// See https://github.com/AMWA-TV/nmos-audio-channel-mapping/blob/v1.0.1/docs/2.0.%20APIs.md#api-paths
// See https://specs.amwa.tv/is-08/releases/v1.0.1/docs/2.0._APIs.html#api-paths

// hmm, should all devices get the same activation time or not?
const auto activation_time = nmos::tai_now();
Expand Down
Loading

0 comments on commit 2f379d7

Please sign in to comment.