@@ -941,7 +941,7 @@ void node_implementation_init(nmos::node_model& model, nmos::experimental::contr
941941 control_protocol_state.insert (gain_control_class_descriptor);
942942 }
943943 // helper function to create Gain control instance
944- auto make_gain_control = [&gain_value, &gain_control_class_id](nmos::nc_oid oid, nmos::nc_oid owner, const utility::string_t & role, const utility::string_t & user_label, const utility::string_t & description, const web::json::value& touchpoints = web::json::value::null () , const web::json::value& runtime_property_constraints = web::json::value::null () , float gain = 0.0 )
944+ auto make_gain_control = [&gain_value, &gain_control_class_id](nmos::nc_oid oid, nmos::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, float gain)
945945 {
946946 auto data = nmos::details::make_nc_worker (gain_control_class_id, oid, true , owner, role, value::string (user_label), description, touchpoints, runtime_property_constraints, true );
947947 data[gain_value] = value::number (gain);
@@ -1111,23 +1111,23 @@ void node_implementation_init(nmos::node_model& model, nmos::experimental::contr
11111111 });
11121112 };
11131113 // helper function to create Example control instance
1114- auto make_example_control = [&](nmos::nc_oid oid, nmos::nc_oid owner, const utility::string_t & role, const utility::string_t & user_label, const utility::string_t & description, const value& touchpoints = value::null () ,
1115- const value& runtime_property_constraints = value::null () , // level 2: runtime constraints. See https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Constraints.html
1114+ auto make_example_control = [&](nmos::nc_oid oid, nmos::nc_oid owner, const utility::string_t & role, const utility::string_t & user_label, const utility::string_t & description, const value& touchpoints,
1115+ const value& runtime_property_constraints, // level 2: runtime constraints. See https://specs.amwa.tv/ms-05-02/branches/v1.0.x/docs/Constraints.html
11161116 // use of make_nc_property_constraints_string and make_nc_property_constraints_number to create runtime constraints
1117- example_enum enum_property_ = example_enum::Undefined ,
1118- const utility::string_t & string_property_ = U ( " " ) ,
1119- uint64_t number_property_ = 0 ,
1120- uint64_t deprecated_number_property_ = 0 ,
1121- bool boolean_property_ = true ,
1122- const value& object_property_ = value::null () ,
1123- uint64_t method_no_args_count_ = 0 ,
1124- uint64_t method_simple_args_count_ = 0 ,
1125- uint64_t method_object_arg_count_ = 0 ,
1126- std::vector<utility::string_t > string_sequence_ = {} ,
1127- std::vector<bool > boolean_sequence_ = {} ,
1128- std::vector<example_enum> enum_sequence_ = {} ,
1129- std::vector<uint64_t > number_sequence_ = {} ,
1130- std::vector<value> object_sequence_ = {} )
1117+ example_enum enum_property_,
1118+ const utility::string_t & string_property_,
1119+ uint64_t number_property_,
1120+ uint64_t deprecated_number_property_,
1121+ bool boolean_property_,
1122+ const value& object_property_,
1123+ uint64_t method_no_args_count_,
1124+ uint64_t method_simple_args_count_,
1125+ uint64_t method_object_arg_count_,
1126+ std::vector<utility::string_t > string_sequence_,
1127+ std::vector<bool > boolean_sequence_,
1128+ std::vector<example_enum> enum_sequence_,
1129+ std::vector<uint64_t > number_sequence_,
1130+ std::vector<value> object_sequence_)
11311131 {
11321132 auto data = nmos::details::make_nc_worker (example_control_class_id, oid, true , owner, role, value::string (user_label), description, touchpoints, runtime_property_constraints, true );
11331133 data[enum_property] = value::number (enum_property_);
@@ -1186,7 +1186,7 @@ void node_implementation_init(nmos::node_model& model, nmos::experimental::contr
11861186 control_protocol_state.insert (temperature_sensor_control_class_descriptor);
11871187 }
11881188 // helper function to create Temperature Sensor control instance
1189- auto make_temperature_sensor = [&temperature, &unit, temperature_sensor_control_class_id](nmos::nc_oid oid, nmos::nc_oid owner, const utility::string_t & role, const utility::string_t & user_label, const utility::string_t & description, const web::json::value& touchpoints = web::json::value::null () , const web::json::value& runtime_property_constraints = web::json::value::null () , float temperature_ = 0.0 , const utility::string_t & unit_ = U ( " Celsius " ) )
1189+ auto make_temperature_sensor = [&temperature, &unit, temperature_sensor_control_class_id](nmos::nc_oid oid, nmos::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, float temperature_, const utility::string_t & unit_)
11901190 {
11911191 auto data = nmos::details::make_nc_worker (temperature_sensor_control_class_id, oid, true , owner, role, value::string (user_label), description, touchpoints, runtime_property_constraints, true );
11921192 data[temperature] = value::number (temperature_);
@@ -1214,14 +1214,14 @@ void node_implementation_init(nmos::node_model& model, nmos::experimental::contr
12141214 const auto channel_gain_oid = ++oid;
12151215 auto channel_gain = nmos::make_block (channel_gain_oid, stereo_gain_oid, U (" channel-gain" ), U (" Channel gain" ), U (" Channel gain block" ));
12161216 // example left/right gains
1217- auto left_gain = make_gain_control (++oid, channel_gain_oid, U (" left-gain" ), U (" Left gain" ), U (" Left channel gain" ));
1218- auto right_gain = make_gain_control (++oid, channel_gain_oid, U (" right-gain" ), U (" Right gain" ), U (" Right channel gain" ));
1217+ auto left_gain = make_gain_control (++oid, channel_gain_oid, U (" left-gain" ), U (" Left gain" ), U (" Left channel gain" ), value::null (), value::null (), 0.0 );
1218+ auto right_gain = make_gain_control (++oid, channel_gain_oid, U (" right-gain" ), U (" Right gain" ), U (" Right channel gain" ), value::null (), value::null (), 0.0 );
12191219 // add left-gain and right-gain to channel gain
12201220 nmos::push_back (channel_gain, left_gain);
12211221 nmos::push_back (channel_gain, right_gain);
12221222
12231223 // example master-gain
1224- auto master_gain = make_gain_control (++oid, channel_gain_oid, U (" master-gain" ), U (" Master gain" ), U (" Master gain block" ));
1224+ auto master_gain = make_gain_control (++oid, channel_gain_oid, U (" master-gain" ), U (" Master gain" ), U (" Master gain block" ), value::null (), value::null (), 0.0 );
12251225 // add channel-gain and master-gain to stereo-gain
12261226 nmos::push_back (stereo_gain, channel_gain);
12271227 nmos::push_back (stereo_gain, master_gain);
@@ -1272,7 +1272,7 @@ void node_implementation_init(nmos::node_model& model, nmos::experimental::contr
12721272 }
12731273
12741274 // example temperature-sensor
1275- const auto temperature_sensor = make_temperature_sensor (++oid, nmos::root_block_oid, U (" temperature-sensor" ), U (" Temperature Sensor" ), U (" Temperature Sensor block" ));
1275+ const auto temperature_sensor = make_temperature_sensor (++oid, nmos::root_block_oid, U (" temperature-sensor" ), U (" Temperature Sensor" ), U (" Temperature Sensor block" ), value::null (), value::null (), 0.0 , U ( " Celsius " ) );
12761276
12771277 // add temperature-sensor to root-block
12781278 nmos::push_back (root_block, temperature_sensor);
0 commit comments