Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IS-12 support #330

Merged
merged 117 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
117 commits
Select commit Hold shift + click to select a range
71f13f0
Create IS-12 websocket server
lo-simon May 9, 2023
c3d3637
Remove incorrect comment
lo-simon May 10, 2023
4728d7c
Add `control_protocol_ws_port` to node example config
lo-simon May 10, 2023
7de45f3
Merge branch 'sony:is-12' into is-12
lo-simon May 15, 2023
549dd0e
Use lock to protect websockets
lo-simon May 15, 2023
599a5f5
Fix to obtain the event_ws position from the ws_handlers
lo-simon May 15, 2023
fae85fb
Create Root block, Device manager and Class manager nmos resources
lo-simon Aug 3, 2023
f42bb05
Merge remote-tracking branch 'origin/master' into is-12
lo-simon Aug 3, 2023
bb6db52
Add readonly on Get propertry support.
lo-simon Aug 8, 2023
eb71ebd
Fix declaration of nmos::experimental::control_classes for Linux
lo-simon Aug 8, 2023
212bdf4
Move functions around
lo-simon Aug 8, 2023
bb87347
Update IS-12 schemas
lo-simon Aug 8, 2023
2aba14a
Tidy up make_nc_class_manager
lo-simon Aug 8, 2023
71f97b5
Add NcObject's GetSequenceItem
lo-simon Aug 8, 2023
6e1640f
Fix GetSequenceItem and add GetSequenceLength
lo-simon Aug 8, 2023
a4455bc
Code tidy up
lo-simon Aug 9, 2023
bbf2604
Add SetSequenceItem, AddSequenceItem, RemoveSequenceItem, FindMembers…
lo-simon Aug 9, 2023
b5cbfc7
Fix AddSequenceItem
lo-simon Aug 9, 2023
4eab0e0
Fix FindMembersByPath
lo-simon Aug 10, 2023
5eeaa3b
Add FindMembersByRole and FindMembersByClassId
lo-simon Aug 11, 2023
5d5e2b8
Add GetControlClass, and GetDataType
lo-simon Aug 15, 2023
6eddf4e
Bump up ubuntu 14.04 to use python 3.7 to overcome
lo-simon Aug 16, 2023
fa17cd1
Fix ModuleNotFoundError: No module named '_ctypes'
lo-simon Aug 16, 2023
a356f3e
Fixing python3.7 install
lo-simon Aug 16, 2023
15a4e19
Bump up to python3.8
lo-simon Aug 16, 2023
70155a4
Add NcIdentBeacon, NcReceiverMonitor and NcReceiverMonitorProtected
lo-simon Aug 18, 2023
f7dacb2
Use control_protocol_ws_port to construct request URLs for the Contro…
lo-simon Aug 18, 2023
52dc55a
Remove unused code
lo-simon Aug 19, 2023
3924c6b
Fix find_members_by_path and write log on method
lo-simon Aug 22, 2023
9145752
Remove un-used code
lo-simon Aug 22, 2023
0ef34d0
Add Log gate to method
lo-simon Aug 22, 2023
dba1042
Move nc_class_id definition from control_protocol_resource to control…
lo-simon Aug 22, 2023
38077d2
Add nested block examples
lo-simon Aug 22, 2023
90a768b
Extract IS-12 version from the rx ws path
lo-simon Aug 23, 2023
d47b47a
Add helper functions to create non-standard control class, and genera…
lo-simon Aug 24, 2023
901780a
Use of nc_class_id struct and method_id struct for map key
lo-simon Aug 29, 2023
40c3dc1
Remove un-used code
lo-simon Aug 30, 2023
e4e54d6
Add support for allowing user to insert non-standard control class me…
lo-simon Aug 31, 2023
c581781
Fix 'nmos::experimental::control_class' constructor initialization
lo-simon Aug 31, 2023
3b58506
Fix indentation
lo-simon Sep 7, 2023
279358c
Use better error instead of `out of bounds`
lo-simon Sep 7, 2023
431b4a8
Add non-standard Example class based on nmos-device-control-mock
lo-simon Sep 12, 2023
0b87a78
Update log messages
lo-simon Sep 12, 2023
d8a803f
Fix is_nc_block()
lo-simon Sep 12, 2023
9e1fdc8
Tidy-up function signatures
lo-simon Sep 12, 2023
8b4d0d1
Add subscription support
lo-simon Sep 15, 2023
b7a24e5
Update outdated IS-12 links
lo-simon Sep 15, 2023
ec51638
Tidy up, less casting
lo-simon Sep 18, 2023
de5beed
Add description to nc_object to simplify create nc_xxx class
lo-simon Sep 19, 2023
fa2a4ba
Move nc helper functions to nc utils
lo-simon Sep 19, 2023
ac8f21b
look before accessing control_protocol_state
lo-simon Sep 19, 2023
a805d8a
pusback allows on NcBlock only
lo-simon Sep 19, 2023
4873c40
Add control protocol unit tests
lo-simon Sep 19, 2023
68defeb
Add more unit tests
lo-simon Sep 20, 2023
f773372
Add NcPropertyConstraintsNumber, NcPropertyConstraintsString, NcParam…
lo-simon Sep 21, 2023
1bd7283
Tidy up make_nc_class_descriptor
lo-simon Sep 21, 2023
c1a9aca
Merge remote-tracking branch 'origin/master' into is-12
lo-simon Sep 25, 2023
84f13d4
Fix to handle empty NCP URL path
lo-simon Oct 6, 2023
645ff22
Code fix to construct nc_property_changed_event_data, thanks for @maw…
lo-simon Oct 6, 2023
472883e
Insert root block resource to the model will also inserting all its n…
lo-simon Oct 13, 2023
094f568
Add IS-12 to Readme
lo-simon Oct 13, 2023
3ff45a4
Add tounchpoint support and link Receiver-Monitor with IS-04/IS-05 Re…
lo-simon Oct 18, 2023
f8f5270
Add new headers to makefile
lo-simon Oct 18, 2023
264cfba
Set IS-12 nmos resource with relevant nmos::type
lo-simon Oct 19, 2023
ce62865
Clean up on how to construct propertry changed event
lo-simon Oct 19, 2023
f483ffd
Merge remote-tracking branch 'origin/master' into is-12
lo-simon Oct 23, 2023
28187d8
Add constraints support, see https://specs.amwa.tv/ms-05-02/branches/…
lo-simon Oct 26, 2023
677f66e
Update comments
lo-simon Oct 30, 2023
ad85dd0
typo
lo-simon Oct 30, 2023
613beaf
Add primitive types
lo-simon Oct 31, 2023
35de2d0
Merge remote-tracking branch 'origin/master' into is-12
lo-simon Nov 3, 2023
cbedf53
Add a simple temperature sensor example, which pumps out new temperat…
lo-simon Nov 3, 2023
d21ca75
Fix non-standard class's method handing
lo-simon Nov 7, 2023
f039f8f
Remove un-used code and fix typo
lo-simon Nov 8, 2023
98b4b56
Test readonly on set_sequence_item and add_sequence_item
lo-simon Nov 8, 2023
b14afef
Enhance level 0 datatype constraints validation
lo-simon Nov 14, 2023
0049eaa
Return property_deprecated(298) if property is marked as deprecated
lo-simon Nov 14, 2023
cf492a4
Code tidy-up
lo-simon Nov 14, 2023
93f69c2
Enhance non-standard example control method handlers, add level 2 and…
lo-simon Nov 14, 2023
d26bc32
Prevent comparsion warning
lo-simon Nov 14, 2023
2471b01
Reject Set on non-sequence value to sequence property
lo-simon Nov 15, 2023
4420e1e
Fix runtime and property sequence constraints validation
lo-simon Nov 15, 2023
bc5e0f5
Add method parameters constriants validation, and check method deprec…
lo-simon Nov 18, 2023
65e8ebb
Add comments
lo-simon Nov 20, 2023
092519e
No arguments object to those methods which do not require any arguments
lo-simon Nov 20, 2023
14aa16f
Add deprecated property and deprecated method to Example Control Class
lo-simon Nov 20, 2023
0bed427
Add logging for contraints validation
lo-simon Nov 21, 2023
64111a4
Merge branch 'master' into is-12
lo-simon Dec 22, 2023
4f83f38
Add property changed callback to perform application-specific operati…
lo-simon Jan 4, 2024
ea732da
Add authorization support to IS-12
lo-simon Jan 4, 2024
17bfd21
Merge remote-tracking branch 'origin/master' into is-12
lo-simon Jan 8, 2024
6fd4e78
Prevent warning C26800
lo-simon Jan 8, 2024
31321f7
Add ncp authorization field to IS-04 controls array of an NMOS Device
lo-simon Jan 10, 2024
2fd6bdd
Update comments
lo-simon Jan 12, 2024
3911889
Return parameter_error (417) instead of bad_oid (404) in event of bad…
lo-simon Jan 12, 2024
2fbd8e1
Add non-standard class method with the necessary parameters
lo-simon Jan 15, 2024
cb6aec7
Merge branch 'master' into is-12
lo-simon Feb 9, 2024
0b1191d
Merge branch 'master' into is-12
lo-simon Feb 15, 2024
6f025a8
Update node config JSON to include is12_versions
lo-simon Feb 15, 2024
89ee998
Apply suggestions from code review
lo-simon Feb 23, 2024
82b91ed
Merge branch 'master' into is-12
lo-simon Feb 23, 2024
c0244ad
Update Development/nmos-cpp-node/node_implementation.cpp
lo-simon Feb 26, 2024
1c5fe14
Remove commented out code
lo-simon Feb 26, 2024
9c27c40
Update comments
lo-simon Feb 26, 2024
9406d81
Added Receiver Monitor Protected and Ident Beacon workers to control_…
jonathan-r-thorpe Feb 26, 2024
8794dd4
Apply suggestions from code review
lo-simon Feb 27, 2024
60f6204
Typo
lo-simon Feb 27, 2024
af5dce0
Fix example_control to use the number within the level 2 runtime cons…
lo-simon Feb 27, 2024
201374d
Add nc_ident_beacon resource type
lo-simon Feb 27, 2024
64e2187
Tidy up receiver_monitor, receiver_monitor_protected and ident_beacon…
lo-simon Feb 27, 2024
2484b29
Update Development/nmos/control_protocol_ws_api.cpp
lo-simon Feb 28, 2024
2bdb171
Update Development/nmos/json_fields.h
lo-simon Feb 28, 2024
bb4480a
Change varaible names and function names for better description
lo-simon Feb 29, 2024
c17ade3
Update IS-12 Readme
lo-simon Feb 29, 2024
ce176cd
Merge remote-tracking branch 'origin/master' into is-12
lo-simon Mar 1, 2024
f80caad
Update IS-12 Readme
lo-simon Mar 1, 2024
f41032a
Update Development/nmos/control_protocol_handlers.h
lo-simon Mar 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Development/cmake/NmosCppLibraries.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -757,6 +757,7 @@ set(NMOS_CPP_NMOS_SOURCES
nmos/connection_api.cpp
nmos/connection_events_activation.cpp
nmos/connection_resources.cpp
nmos/control_protocol_ws_api.cpp
nmos/did_sdid.cpp
nmos/events_api.cpp
nmos/events_resources.cpp
Expand Down Expand Up @@ -828,6 +829,7 @@ set(NMOS_CPP_NMOS_HEADERS
nmos/connection_api.h
nmos/connection_events_activation.h
nmos/connection_resources.h
nmos/control_protocol_ws_api.h
nmos/device_type.h
nmos/did_sdid.h
nmos/event_type.h
Expand All @@ -846,6 +848,7 @@ set(NMOS_CPP_NMOS_HEADERS
nmos/is07_versions.h
nmos/is08_versions.h
nmos/is09_versions.h
nmos/is12_versions.h
nmos/json_fields.h
nmos/json_schema.h
nmos/lldp_handler.h
Expand Down
84 changes: 84 additions & 0 deletions Development/nmos/control_protocol_ws_api.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
#include "nmos/control_protocol_ws_api.h"

#include "nmos/slog.h"

namespace nmos
{
// IS-12 Control Protocol WebSocket API

web::websockets::experimental::listener::validate_handler make_control_protocol_ws_validate_handler(nmos::node_model& model, slog::base_gate& gate_)
{
return [&model, &gate_](web::http::http_request req)
{
nmos::ws_api_gate gate(gate_, req.request_uri());

// RFC 6750 defines two methods of sending bearer access tokens which are applicable to WebSocket
// Clients SHOULD use the "Authorization Request Header Field" method.
// Clients MAY use a "URI Query Parameter".
// See https://tools.ietf.org/html/rfc6750#section-2

// For now just return true
const auto& ws_ncp_path = req.request_uri().path();
slog::log<slog::severities::more_info>(gate, SLOG_FLF) << "Validating websocket connection to: " << ws_ncp_path;

return true;
};
}

web::websockets::experimental::listener::open_handler make_control_protocol_ws_open_handler(nmos::node_model& model, nmos::websockets& websockets, slog::base_gate& gate_)
{
return [&model, &websockets, &gate_](const web::uri& connection_uri, const web::websockets::experimental::listener::connection_id& connection_id)
{
nmos::ws_api_gate gate(gate_, connection_uri);

const auto& ws_ncp_path = connection_uri.path();
slog::log<slog::severities::info>(gate, SLOG_FLF) << "Opening websocket connection to: " << ws_ncp_path;
{
// create a websocket connection resource

nmos::id id = nmos::make_id();
websockets.insert({ id, connection_id });

lo-simon marked this conversation as resolved.
Show resolved Hide resolved
slog::log<slog::severities::info>(gate, SLOG_FLF) << "Creating websocket connection: " << id;
}
};
}

web::websockets::experimental::listener::close_handler make_control_protocol_ws_close_handler(nmos::node_model& model, nmos::websockets& websockets, slog::base_gate& gate_)
{
return [&model, &websockets, &gate_](const web::uri& connection_uri, const web::websockets::experimental::listener::connection_id& connection_id, web::websockets::websocket_close_status close_status, const utility::string_t& close_reason)
{
nmos::ws_api_gate gate(gate_, connection_uri);

const auto& ws_ncp_path = connection_uri.path();
slog::log<slog::severities::info>(gate, SLOG_FLF) << "Closing websocket connection to: " << ws_ncp_path << " [" << (int)close_status << ": " << close_reason << "]";

auto websocket = websockets.right.find(connection_id);
if (websockets.right.end() != websocket)
{
slog::log<slog::severities::info>(gate, SLOG_FLF) << "Deleting websocket connection";

websockets.right.erase(websocket);
lo-simon marked this conversation as resolved.
Show resolved Hide resolved
}
};
}

web::websockets::experimental::listener::message_handler make_control_protocol_ws_message_handler(nmos::node_model& model, nmos::websockets& websockets, slog::base_gate& gate_)
{
return [&model, &websockets, &gate_](const web::uri& connection_uri, const web::websockets::experimental::listener::connection_id& connection_id, const web::websockets::websocket_incoming_message& msg_)
{
nmos::ws_api_gate gate(gate_, connection_uri);
// theoretically blocking, but in fact not
auto msg = msg_.extract_string().get();

const auto& ws_ncp_path = connection_uri.path();
slog::log<slog::severities::too_much_info>(gate, SLOG_FLF) << "Received websocket message: " << msg << " on connection to: " << ws_ncp_path;

auto websocket = websockets.right.find(connection_id);
lo-simon marked this conversation as resolved.
Show resolved Hide resolved
if (websockets.right.end() != websocket)
{
// hmm, todo message handling....
}
};
}
}
33 changes: 33 additions & 0 deletions Development/nmos/control_protocol_ws_api.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#ifndef NMOS_CONTROL_PROTOCOL_WS_API_H
#define NMOS_CONTROL_PROTOCOL_WS_API_H

#include "nmos/websockets.h"

namespace slog
{
class base_gate;
}

// Events API websocket implementation
lo-simon marked this conversation as resolved.
Show resolved Hide resolved
// See https://specs.amwa.tv/is-07/releases/v1.0.1/docs/5.2._Transport_-_Websocket.html
namespace nmos
{
struct node_model;

web::websockets::experimental::listener::validate_handler make_control_protocol_ws_validate_handler(nmos::node_model& model, slog::base_gate& gate);
web::websockets::experimental::listener::open_handler make_control_protocol_ws_open_handler(nmos::node_model& model, nmos::websockets& websockets, slog::base_gate& gate);
web::websockets::experimental::listener::close_handler make_control_protocol_ws_close_handler(nmos::node_model& model, nmos::websockets& websockets, slog::base_gate& gate);
web::websockets::experimental::listener::message_handler make_control_protocol_ws_message_handler(nmos::node_model& model, nmos::websockets& websockets, slog::base_gate& gate);

inline web::websockets::experimental::listener::websocket_listener_handlers make_control_protocol_ws_api(nmos::node_model& model, nmos::websockets& websockets, slog::base_gate& gate)
{
return{
nmos::make_control_protocol_ws_validate_handler(model, gate),
nmos::make_control_protocol_ws_open_handler(model, websockets, gate),
nmos::make_control_protocol_ws_close_handler(model, websockets, gate),
nmos::make_control_protocol_ws_message_handler(model, websockets, gate)
};
}
}

#endif
26 changes: 26 additions & 0 deletions Development/nmos/is12_versions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#ifndef NMOS_IS12_VERSIONS_H
#define NMOS_IS12_VERSIONS_H

#include <set>
#include <boost/range/adaptor/transformed.hpp>
#include "nmos/api_version.h"
#include "nmos/settings.h"

namespace nmos
{
namespace is12_versions
{
const api_version v1_0{ 1, 0 };

const std::set<api_version> all{ nmos::is12_versions::v1_0 };

inline std::set<api_version> from_settings(const nmos::settings& settings)
{
return settings.has_field(nmos::fields::is12_versions)
? boost::copy_range<std::set<api_version>>(nmos::fields::is12_versions(settings) | boost::adaptors::transformed([](const web::json::value& v) { return nmos::parse_api_version(v.as_string()); }))
: nmos::is12_versions::all;
}
}
}

#endif
21 changes: 21 additions & 0 deletions Development/nmos/node_resources.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "nmos/is05_versions.h"
#include "nmos/is07_versions.h"
#include "nmos/is08_versions.h"
#include "nmos/is12_versions.h"
#include "nmos/media_type.h"
#include "nmos/resource.h"
#include "nmos/sdp_utils.h" // for nmos::make_components
Expand Down Expand Up @@ -125,6 +126,26 @@ namespace nmos
}
}

if (0 <= nmos::fields::control_protocol_ws_port(settings))
lo-simon marked this conversation as resolved.
Show resolved Hide resolved
{
for (const auto& version : nmos::is12_versions::from_settings(settings))
{
auto ncp_uri = web::uri_builder()
.set_scheme(nmos::ws_scheme(settings))
.set_port(nmos::fields::control_protocol_ws_port(settings))
.set_path(U("/x-nmos/ncp/") + make_api_version(version));
auto type = U("urn:x-nmos:control:ncp/") + make_api_version(version);
lo-simon marked this conversation as resolved.
Show resolved Hide resolved

for (const auto& host : hosts)
{
web::json::push_back(data[U("controls")], value_of({
{ U("href"), ncp_uri.set_host(host).to_uri().to_string() },
{ U("type"), type }
}));
}
}
}

return{ is04_versions::v1_3, types::device, std::move(data), false };
}

Expand Down
15 changes: 13 additions & 2 deletions Development/nmos/node_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "cpprest/ws_utils.h"
#include "nmos/api_utils.h"
#include "nmos/channelmapping_activation.h"
#include "nmos/control_protocol_ws_api.h"
#include "nmos/events_api.h"
#include "nmos/events_ws_api.h"
#include "nmos/logging_api.h"
Expand Down Expand Up @@ -63,9 +64,16 @@ namespace nmos
// Configure the Channel Mapping API
node_server.api_routers[{ {}, nmos::fields::channelmapping_port(node_model.settings) }].mount({}, nmos::make_channelmapping_api(node_model, node_implementation.validate_map, gate));

auto& events_ws_api = node_server.ws_handlers[{ {}, nmos::fields::events_ws_port(node_model.settings) }];
const auto& events_ws_port = nmos::fields::events_ws_port(node_model.settings);
auto& events_ws_api = node_server.ws_handlers[{ {}, events_ws_port }];
events_ws_api.first = nmos::make_events_ws_api(node_model, events_ws_api.second, gate);

// can't share a port between the events ws and the control protocol ws
jonathan-r-thorpe marked this conversation as resolved.
Show resolved Hide resolved
const auto& control_protocol_ws_port = nmos::fields::control_protocol_ws_port(node_model.settings);
if (control_protocol_ws_port == events_ws_port) throw std::runtime_error("Same port used for events and control protocol websockets are not supported");
auto& control_protocol_ws_api = node_server.ws_handlers[{ {}, control_protocol_ws_port }];
control_protocol_ws_api.first = nmos::make_control_protocol_ws_api(node_model, control_protocol_ws_api.second, gate);

// Set up the listeners for each HTTP API port

auto http_config = nmos::make_http_listener_config(node_model.settings, node_implementation.load_server_certificates, node_implementation.load_dh_param, node_implementation.get_ocsp_response, gate);
Expand All @@ -84,16 +92,19 @@ namespace nmos
auto websocket_config = nmos::make_websocket_listener_config(node_model.settings, node_implementation.load_server_certificates, node_implementation.load_dh_param, node_implementation.get_ocsp_response, gate);
websocket_config.set_log_callback(nmos::make_slog_logging_callback(gate));

size_t event_ws_pos{ 0 };
for (auto& ws_handler : node_server.ws_handlers)
{
// if IP address isn't specified for this router, use default server address or wildcard address
const auto& host = !ws_handler.first.first.empty() ? ws_handler.first.first : !server_address.empty() ? server_address : web::websockets::experimental::listener::host_wildcard;
// map the configured client port to the server port on which to listen
// hmm, this should probably also take account of the address
node_server.ws_listeners.push_back(nmos::make_ws_api_listener(server_secure, host, nmos::experimental::server_port(ws_handler.first.second, node_model.settings), ws_handler.second.first, websocket_config, gate));

event_ws_pos = (ws_handler.first.second == events_ws_port) ? event_ws_pos : ++event_ws_pos;
lo-simon marked this conversation as resolved.
Show resolved Hide resolved
}

auto& events_ws_listener = node_server.ws_listeners.back();
auto& events_ws_listener = node_server.ws_listeners.at(event_ws_pos);

// Set up node operation (including the DNS-SD advertisements)

Expand Down
3 changes: 3 additions & 0 deletions Development/nmos/settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ namespace nmos
const auto http_port = nmos::fields::http_port(settings);
// can't share a port between an http_listener and a websocket_listener, so use next higher port
const auto ws_port = http_port + 1;
// can't share a port between the events ws and the control protocol ws
const auto ncp_ws_port = ws_port + 1;
if (registry) web::json::insert(settings, std::make_pair(nmos::fields::query_port, http_port));
if (registry) web::json::insert(settings, std::make_pair(nmos::fields::query_ws_port, ws_port));
if (registry) web::json::insert(settings, std::make_pair(nmos::fields::registration_port, http_port));
Expand All @@ -81,6 +83,7 @@ namespace nmos
if (registry) web::json::insert(settings, std::make_pair(nmos::experimental::fields::admin_port, http_port));
if (registry) web::json::insert(settings, std::make_pair(nmos::experimental::fields::mdns_port, http_port));
if (registry) web::json::insert(settings, std::make_pair(nmos::experimental::fields::schemas_port, http_port));
if (!registry) web::json::insert(settings, std::make_pair(nmos::fields::control_protocol_ws_port, ncp_ws_port));
}
}
}
Expand Down
4 changes: 4 additions & 0 deletions Development/nmos/settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@ namespace nmos
// is09_versions [registry, node]: used to specify the enabled API versions for a version-locked configuration
const web::json::field_as_array is09_versions{ U("is09_versions") }; // when omitted, nmos::is09_versions::all is used

// is12_versions [node]: used to specify the enabled API versions for a version-locked configuration
const web::json::field_as_array is12_versions{ U("is12_versions") }; // when omitted, nmos::is12_versions::all is used

// pri [registry, node]: used for the 'pri' TXT record; specifying nmos::service_priorities::no_priority (maximum value) disables advertisement completely
const web::json::field_as_integer_or pri{ U("pri"), 100 }; // default to highest_development_priority

Expand Down Expand Up @@ -136,6 +139,7 @@ namespace nmos
const web::json::field_as_integer_or channelmapping_port{ U("channelmapping_port"), 3215 };
// system_port [node]: used to construct request URLs for the System API (if not discovered via DNS-SD)
const web::json::field_as_integer_or system_port{ U("system_port"), 10641 };
const web::json::field_as_integer_or control_protocol_ws_port{ U("control_protocol_ws_port"), 3218 };

// listen_backlog [registry, node]: the maximum length of the queue of pending connections, or zero for the implementation default (the implementation may not honour this value)
const web::json::field_as_integer_or listen_backlog{ U("listen_backlog"), 0 };
Expand Down