@@ -941,7 +941,7 @@ void node_implementation_init(nmos::node_model& model, nmos::experimental::contr
941
941
control_protocol_state.insert (gain_control_class_descriptor);
942
942
}
943
943
// 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)
945
945
{
946
946
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 );
947
947
data[gain_value] = value::number (gain);
@@ -1111,23 +1111,23 @@ void node_implementation_init(nmos::node_model& model, nmos::experimental::contr
1111
1111
});
1112
1112
};
1113
1113
// 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
1116
1116
// 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_)
1131
1131
{
1132
1132
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 );
1133
1133
data[enum_property] = value::number (enum_property_);
@@ -1186,7 +1186,7 @@ void node_implementation_init(nmos::node_model& model, nmos::experimental::contr
1186
1186
control_protocol_state.insert (temperature_sensor_control_class_descriptor);
1187
1187
}
1188
1188
// 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_)
1190
1190
{
1191
1191
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 );
1192
1192
data[temperature] = value::number (temperature_);
@@ -1214,14 +1214,14 @@ void node_implementation_init(nmos::node_model& model, nmos::experimental::contr
1214
1214
const auto channel_gain_oid = ++oid;
1215
1215
auto channel_gain = nmos::make_block (channel_gain_oid, stereo_gain_oid, U (" channel-gain" ), U (" Channel gain" ), U (" Channel gain block" ));
1216
1216
// 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 );
1219
1219
// add left-gain and right-gain to channel gain
1220
1220
nmos::push_back (channel_gain, left_gain);
1221
1221
nmos::push_back (channel_gain, right_gain);
1222
1222
1223
1223
// 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 );
1225
1225
// add channel-gain and master-gain to stereo-gain
1226
1226
nmos::push_back (stereo_gain, channel_gain);
1227
1227
nmos::push_back (stereo_gain, master_gain);
@@ -1272,7 +1272,7 @@ void node_implementation_init(nmos::node_model& model, nmos::experimental::contr
1272
1272
}
1273
1273
1274
1274
// 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 " ) );
1276
1276
1277
1277
// add temperature-sensor to root-block
1278
1278
nmos::push_back (root_block, temperature_sensor);
0 commit comments