From 22cb52aac6e687f324b1abcd23ba400398f746ef Mon Sep 17 00:00:00 2001 From: "Jonathan Thorpe (Sony)" Date: Thu, 28 Nov 2024 13:46:42 +0000 Subject: [PATCH 1/3] Updated IS-14 datatypes, class and schemas --- .../nmos-cpp-node/node_implementation.cpp | 4 +- Development/nmos/control_protocol_handlers.h | 4 +- .../nmos/control_protocol_resource.cpp | 48 ++++++++++++++----- Development/nmos/control_protocol_resource.h | 6 ++- Development/nmos/control_protocol_state.cpp | 12 +++-- Development/nmos/json_fields.h | 7 ++- .../schemas/bulkProperties-set-request.json | 17 +++++-- .../bulkProperties-validate-request.json | 15 ++++-- .../v1.0.x/APIs/schemas/methods-base.json | 3 +- .../v1.0.x/APIs/schemas/properties-base.json | 3 +- .../is-14/v1.0.x/APIs/schemas/rolePath.json | 4 +- 11 files changed, 87 insertions(+), 36 deletions(-) diff --git a/Development/nmos-cpp-node/node_implementation.cpp b/Development/nmos-cpp-node/node_implementation.cpp index c7810402..0b20086c 100644 --- a/Development/nmos-cpp-node/node_implementation.cpp +++ b/Development/nmos-cpp-node/node_implementation.cpp @@ -1734,7 +1734,7 @@ nmos::get_properties_by_path_handler make_node_implementation_get_properties_by_ // Example Device Configuration callback for validating a back-up dataset nmos::validate_set_properties_by_path_handler make_node_implementation_validate_set_properties_by_path_handler(const nmos::resources& resources, slog::base_gate& gate) { - return [&resources, &gate](nmos::get_control_protocol_class_descriptor_handler get_control_protocol_class_descriptor, nmos::get_control_protocol_datatype_descriptor_handler get_control_protocol_datatype_descriptor, const nmos::resource& resource, const web::json::value& backup_data_set, bool recurse, const web::json::array& included_property_traits) + return [&resources, &gate](nmos::get_control_protocol_class_descriptor_handler get_control_protocol_class_descriptor, nmos::get_control_protocol_datatype_descriptor_handler get_control_protocol_datatype_descriptor, const nmos::resource& resource, const web::json::value& backup_data_set, bool recurse, const web::json::value& restore_mode) { slog::log(gate, SLOG_FLF) << nmos::stash_category(impl::categories::node_implementation) << "Do validate_set_properties_by_path"; @@ -1746,7 +1746,7 @@ nmos::validate_set_properties_by_path_handler make_node_implementation_validate_ // Example Device Configuration callback for restoring a back-up dataset nmos::set_properties_by_path_handler make_node_implementation_set_properties_by_path_handler(nmos::resources& resources, slog::base_gate& gate) { - return [&resources, &gate](nmos::get_control_protocol_class_descriptor_handler get_control_protocol_class_descriptor, nmos::get_control_protocol_datatype_descriptor_handler get_control_protocol_datatype_descriptor, const nmos::resource& resource, const web::json::value& data_set, bool recurse, const web::json::array& included_property_traits) + return [&resources, &gate](nmos::get_control_protocol_class_descriptor_handler get_control_protocol_class_descriptor, nmos::get_control_protocol_datatype_descriptor_handler get_control_protocol_datatype_descriptor, const nmos::resource& resource, const web::json::value& data_set, bool recurse, const web::json::value& restore_mode) { slog::log(gate, SLOG_FLF) << nmos::stash_category(impl::categories::node_implementation) << "Do set_properties_by_path"; diff --git a/Development/nmos/control_protocol_handlers.h b/Development/nmos/control_protocol_handlers.h index d57972b2..94c2c2b3 100644 --- a/Development/nmos/control_protocol_handlers.h +++ b/Development/nmos/control_protocol_handlers.h @@ -39,8 +39,8 @@ namespace nmos // Device Configuration handlers // these callbacks should not throw exceptions typedef std::function get_properties_by_path_handler; - typedef std::function validate_set_properties_by_path_handler; - typedef std::function set_properties_by_path_handler; + typedef std::function validate_set_properties_by_path_handler; + typedef std::function set_properties_by_path_handler; namespace experimental { diff --git a/Development/nmos/control_protocol_resource.cpp b/Development/nmos/control_protocol_resource.cpp index ccbecdb7..b7992157 100644 --- a/Development/nmos/control_protocol_resource.cpp +++ b/Development/nmos/control_protocol_resource.cpp @@ -1262,7 +1262,7 @@ namespace nmos web::json::push_back(parameters, details::make_nc_parameter_descriptor(U("The values offered (this may include read-only values and also paths which are not the target role path)"), nmos::fields::nc::data_set, U("NcBulkValuesHolder"), false, false, value::null())); web::json::push_back(parameters, details::make_nc_parameter_descriptor(U("If set the descriptor would contain all inherited elements"), nmos::fields::nc::path, U("NcRolePath"), false, false, value::null())); web::json::push_back(parameters, details::make_nc_parameter_descriptor(U("If true will validate properties on target path and all the nested paths"), nmos::fields::nc::recurse, U("NcBoolean"), false, false, value::null())); - web::json::push_back(parameters, details::make_nc_parameter_descriptor(U("If populated (not an empty collection) will include the properties matching any of the specified traits in the restore validation. When not populated only properties without traits are validated for restore"), nmos::fields::nc::included_property_traits, U("NcPropertyTrait"), false, true, value::null())); + web::json::push_back(parameters, details::make_nc_parameter_descriptor(U("Defines the restore mode to be applied"), nmos::fields::nc::restore_mode, U("NcRestoreMode"), false, false, value::null())); web::json::push_back(methods, details::make_nc_method_descriptor(U("Validate bulk properties for setting by given paths"), nc_bulk_properties_manager_validate_set_properties_by_path_method_id, U("ValidateSetPropertiesByPath"), U("NcMethodResultObjectPropertiesSetValidation"), parameters, false)); } { @@ -1270,7 +1270,7 @@ namespace nmos web::json::push_back(parameters, details::make_nc_parameter_descriptor(U("The values offered (this may include read-only values and also paths which are not the target role path)"), nmos::fields::nc::data_set, U("NcBulkValuesHolder"), false, false, value::null())); web::json::push_back(parameters, details::make_nc_parameter_descriptor(U("If set the descriptor would contain all inherited elements"), nmos::fields::nc::path, U("NcRolePath"), false, false, value::null())); web::json::push_back(parameters, details::make_nc_parameter_descriptor(U("If true will validate properties on target path and all the nested paths"), nmos::fields::nc::recurse, U("NcBoolean"), false, false, value::null())); - web::json::push_back(parameters, details::make_nc_parameter_descriptor(U("If populated (not an empty collection) will include the properties matching any of the specified traits in the restore validation. When not populated only properties without traits are validated for restore"), nmos::fields::nc::included_property_traits, U("NcPropertyTrait"), false, true, value::null())); + web::json::push_back(parameters, details::make_nc_parameter_descriptor(U("Defines the restore mode to be applied"), nmos::fields::nc::restore_mode, U("NcRestoreMode"), false, false, value::null())); web::json::push_back(methods, details::make_nc_method_descriptor(U("Set bulk properties for setting by given paths"), nc_bulk_properties_manager_set_properties_by_path_method_id, U("SetPropertiesByPath"), U("NcMethodResultObjectPropertiesSetValidation"), parameters, false)); } @@ -2117,16 +2117,15 @@ namespace nmos // Device Configuration datatypes // TODO: add link - web::json::value make_nc_property_trait_datatype() + web::json::value make_nc_restore_mode_datatype() { using web::json::value; auto items = value::array(); - web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Property is instance specific"), U("InstanceSpecific"), 1)); - web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Property is ephemeral"), U("Ephemeral"), 2)); - web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Property is immutable"), U("Immutable"), 3)); - web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Property value is generated by the device"), U("DeviceGenerated"), 4)); - return details::make_nc_datatype_descriptor_enum(U("Property trait enumeration"), U("NcPropertyTrait"), items, value::null()); + web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Restore mode is Modify"), U("Modify"), 0)); + web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Restore mode is Rebuild"), U("Rebuild"), 1)); + + return details::make_nc_datatype_descriptor_enum(U("Restore mode enumeration"), U("NcRestoreMode"), items, value::null()); } // TODO: add link web::json::value make_nc_property_value_holder_datatype() @@ -2137,8 +2136,7 @@ namespace nmos web::json::push_back(fields, details::make_nc_field_descriptor(U("Property id"), nmos::fields::nc::id, U("NcPropertyId"), false, false, value::null())); web::json::push_back(fields, details::make_nc_field_descriptor(U("Property name"), nmos::fields::nc::name, U("NcString"), false, false, value::null())); web::json::push_back(fields, details::make_nc_field_descriptor(U("Property type name. If null it means the type is any"), nmos::fields::nc::type_name, U("NcName"), true, false, value::null())); - web::json::push_back(fields, details::make_nc_field_descriptor(U("Is the property ReadOnly?"), nmos::fields::nc::is_read_only, U("NcBoolean"), true, false, value::null())); - web::json::push_back(fields, details::make_nc_field_descriptor(U("Describes the property traits as a collection of unique items"), nmos::fields::nc::traits, U("NcPropertyTrait"), false, true, value::null())); + web::json::push_back(fields, details::make_nc_field_descriptor(U("Is the property ReadOnly?"), nmos::fields::nc::is_read_only, U("NcBoolean"), false, false, value::null())); web::json::push_back(fields, details::make_nc_field_descriptor(U("Property value"), nmos::fields::nc::value, true, false, value::null())); return details::make_nc_datatype_descriptor_struct(U("Property value holder descriptor"), U("NcPropertyValueHolder"), fields, value::null()); @@ -2151,6 +2149,7 @@ namespace nmos auto fields = value::array(); web::json::push_back(fields, details::make_nc_field_descriptor(U("Object role path"), nmos::fields::nc::path, U("NcRolePath"), false, false, value::null())); web::json::push_back(fields, details::make_nc_field_descriptor(U("Object properties values"), nmos::fields::nc::values, U("NcPropertyValueHolder"), false, true, value::null())); + web::json::push_back(fields, details::make_nc_field_descriptor(U("Describes if the object is rebuildable"), nmos::fields::nc::is_rebuildable, U("NcBoolean"), false, false, value::null())); return details::make_nc_datatype_descriptor_struct(U("Object properties holder descriptor"), U("NcObjectPropertiesHolder"), fields, value::null()); } @@ -2172,14 +2171,36 @@ namespace nmos auto items = value::array(); web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Restore was successful"), U("Ok"), 200)); - web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Excluded from restore due to data provided in the request"), U("Excluded"), 204)); - web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Restore failed because relevant backup data set provided is invalid"), U("InvalidData"), 400)); + web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Restore failed"), U("Failed"), 400)); web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Restore failed because the role path is not found in the device model or the device cannot create the role path from the data set"), U("NotFound"), 404)); - web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Restore failed because of missing dependency information in the relevant backup data set"), U("MissingDependency"), 424)); web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Restore failed due to an internal device error preventing the restore from happening"), U("DeviceError"), 500)); return details::make_nc_datatype_descriptor_enum(U("Restore validation status enumeration"), U("NcRestoreValidationStatus"), items, value::null()); } // TODO: add link + web::json::value make_nc_property_restore_notice_type() + { + using web::json::value; + + auto items = value::array(); + web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Warning property restore notice"), U("Warning"), 300)); + web::json::push_back(items, details::make_nc_enum_item_descriptor(U("Error property restore notice"), U("Error"), 400)); + + return details::make_nc_datatype_descriptor_enum(U("Property restore notice type enumeration"), U("NcPropertyRestoreNoticeType"), items, value::null()); + } + // TODO: add link + web::json::value make_nc_property_restore_notice() + { + using web::json::value; + + auto fields = value::array(); + web::json::push_back(fields, details::make_nc_field_descriptor(U("Property id"), nmos::fields::nc::id, U("NcPropertyId"), false, false, value::null())); + web::json::push_back(fields, details::make_nc_field_descriptor(U("Property name"), nmos::fields::nc::name, U("NcName"), false, false, value::null())); + web::json::push_back(fields, details::make_nc_field_descriptor(U("Property restore notice type"), nmos::fields::nc::notice_type, U("NcPropertyRestoreNoticeType"), false, false, value::null())); + web::json::push_back(fields, details::make_nc_field_descriptor(U("Property restore notice message"), nmos::fields::nc::notice_message, U("NcString"), false, false, value::null())); + + return details::make_nc_datatype_descriptor_struct(U("Bulk values holder descriptor"), U("NcPropertyRestoreNotice"), fields, value::null()); + } + // TODO: add link web::json::value make_nc_object_properties_set_validation_datatype() { using web::json::value; @@ -2187,6 +2208,7 @@ namespace nmos auto fields = value::array(); web::json::push_back(fields, details::make_nc_field_descriptor(U("Object role path"), nmos::fields::nc::path, U("NcRolePath"), false, false, value::null())); web::json::push_back(fields, details::make_nc_field_descriptor(U("Validation status"), nmos::fields::nc::status, U("NcRestoreValidationStatus"), false, false, value::null())); + web::json::push_back(fields, details::make_nc_field_descriptor(U("Validation property notices"), nmos::fields::nc::notices, U("NcPropertyRestoreNotice"), false, true, value::null())); web::json::push_back(fields, details::make_nc_field_descriptor(U("Validation status message"), nmos::fields::nc::status_message, U("NcString"), true, false, value::null())); return details::make_nc_datatype_descriptor_struct(U("Object properties set validation descriptor"), U("NcObjectPropertiesSetValidation"), fields, value::null()); diff --git a/Development/nmos/control_protocol_resource.h b/Development/nmos/control_protocol_resource.h index 8336b62f..b50bd403 100644 --- a/Development/nmos/control_protocol_resource.h +++ b/Development/nmos/control_protocol_resource.h @@ -441,7 +441,7 @@ namespace nmos // Device configuration feature set datatypes // TODO: add link // - web::json::value make_nc_property_trait_datatype(); + web::json::value make_nc_restore_mode_datatype(); // web::json::value make_nc_property_value_holder_datatype(); // @@ -451,6 +451,10 @@ namespace nmos // web::json::value make_nc_restore_validation_status_datatype(); // + web::json::value make_nc_property_restore_notice_type(); + // + web::json::value make_nc_property_restore_notice(); + // web::json::value make_nc_object_properties_set_validation_datatype(); // web::json::value make_nc_method_result_bulk_values_holder_datatype(); diff --git a/Development/nmos/control_protocol_state.cpp b/Development/nmos/control_protocol_state.cpp index 22887e34..56542dd8 100644 --- a/Development/nmos/control_protocol_state.cpp +++ b/Development/nmos/control_protocol_state.cpp @@ -206,7 +206,7 @@ namespace nmos return [get_control_protocol_class_descriptor, get_control_protocol_datatype_descriptor, validate_set_properties_by_path](nmos::resources& resources, const nmos::resource& resource, const web::json::value& arguments, bool is_deprecated, slog::base_gate& gate) { bool recurse = nmos::fields::nc::recurse(arguments); - const auto& included_property_traits = nmos::fields::nc::included_property_traits(arguments); + const auto& restore_mode = nmos::fields::nc::restore_mode(arguments); const auto& data_set = nmos::fields::nc::data_set(arguments); if (data_set.is_null()) @@ -217,7 +217,7 @@ namespace nmos auto result = nmos::details::make_nc_method_result_error({ nmos::nc_method_status::method_not_implemented }, U("not implemented")); if (validate_set_properties_by_path) { - result = validate_set_properties_by_path(get_control_protocol_class_descriptor, get_control_protocol_datatype_descriptor, resource, data_set, recurse, included_property_traits); + result = validate_set_properties_by_path(get_control_protocol_class_descriptor, get_control_protocol_datatype_descriptor, resource, data_set, recurse, restore_mode); const auto& status = nmos::fields::nc::status(result); if (!web::http::is_error_status_code((web::http::status_code)status) && is_deprecated) @@ -233,7 +233,7 @@ namespace nmos return [get_control_protocol_class_descriptor, get_control_protocol_datatype_descriptor, set_properties_by_path](nmos::resources& resources, const nmos::resource& resource, const web::json::value& arguments, bool is_deprecated, slog::base_gate& gate) { bool recurse = nmos::fields::nc::recurse(arguments); - const auto& included_property_traits = nmos::fields::nc::included_property_traits(arguments); + const auto& restore_mode = nmos::fields::nc::restore_mode(arguments); const auto& data_set = nmos::fields::nc::data_set(arguments); if (data_set.is_null()) @@ -244,7 +244,7 @@ namespace nmos auto result = nmos::details::make_nc_method_result_error({ nmos::nc_method_status::method_not_implemented }, U("not implemented")); if (set_properties_by_path) { - result = set_properties_by_path(get_control_protocol_class_descriptor, get_control_protocol_datatype_descriptor, resource, data_set, recurse, included_property_traits); + result = set_properties_by_path(get_control_protocol_class_descriptor, get_control_protocol_datatype_descriptor, resource, data_set, recurse, restore_mode); const auto& status = nmos::fields::nc::status(result); if (!web::http::is_error_status_code((web::http::status_code)status) && is_deprecated) @@ -481,11 +481,13 @@ namespace nmos { U("NcPayloadStatus"), {make_nc_payload_status_datatype()} }, // Device configuration feature set // TODO: add link - { U("NcPropertyTrait"), {make_nc_property_trait_datatype()} }, + { U("NcRestoreMode"), {make_nc_restore_mode_datatype()} }, { U("NcPropertyValueHolder"), {make_nc_property_value_holder_datatype()}}, { U("NcObjectPropertiesHolder"), {make_nc_object_properties_holder_datatype()}}, { U("NcBulkValuesHolder"), {make_nc_bulk_values_holder_datatype()}}, { U("NcRestoreValidationStatus"), {make_nc_restore_validation_status_datatype()}}, + { U("NcPropertyRestoreNoticeType"), {make_nc_property_restore_notice_type()}}, + { U("NcPropertyRestoreNotice"), {make_nc_property_restore_notice()}}, { U("NcObjectPropertiesSetValidation"), {make_nc_object_properties_set_validation_datatype()}}, { U("NcMethodResultBulkValuesHolder"), {make_nc_method_result_bulk_values_holder_datatype()}}, { U("NcMethodResultObjectPropertiesSetValidation"), {make_nc_method_result_object_properties_set_validation_datatype()}} diff --git a/Development/nmos/json_fields.h b/Development/nmos/json_fields.h index 13d45afa..47caed18 100644 --- a/Development/nmos/json_fields.h +++ b/Development/nmos/json_fields.h @@ -340,8 +340,11 @@ namespace nmos const web::json::field_as_string validation_fingerprint{ U("validationFingerprint") }; const web::json::field_as_string status_message{ U("statusMessage") }; const web::json::field_as_value data_set{ U("dataSet") }; // NcBulkValuesHolder - const web::json::field_as_value traits{ U("traits") }; - const web::json::field_as_array included_property_traits{ U("includedPropertyTraits") }; + const web::json::field_as_bool is_rebuildable{ U("isRebuildable") }; + const web::json::field_as_integer notice_type{ U("noticeType") }; + const web::json::field_as_string notice_message{ U("noticeMessage") }; + const web::json::field_as_array notices{ U("notices") }; + const web::json::field_as_integer restore_mode{ U("restoreMode") }; } // NMOS Parameter Registers diff --git a/Development/third_party/is-14/v1.0.x/APIs/schemas/bulkProperties-set-request.json b/Development/third_party/is-14/v1.0.x/APIs/schemas/bulkProperties-set-request.json index 04c69a0e..4603b227 100644 --- a/Development/third_party/is-14/v1.0.x/APIs/schemas/bulkProperties-set-request.json +++ b/Development/third_party/is-14/v1.0.x/APIs/schemas/bulkProperties-set-request.json @@ -1,15 +1,24 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", - "description": "PUT request body for invoking SetPropertiesByPaths method on NcBulkPropertiesManager", - "title": "SetPropertiesByPaths", + "description": "PUT request body for invoking SetPropertiesByPath method on NcBulkPropertiesManager", + "title": "Bulk properties Set request", "required": [ "arguments" ], "properties": { "arguments": { "type": "object", - "description": "Method arguments. Arguments are specified as nested properties inside this object and their types are dictated by the specific MS-05-02 model for the method targeted. Arguments only need to be included for methods which have arguments and MUST be omitted if the method does not require any arguments." + "description": "Method arguments. The rolePath is offered in the URL and is not part of these arguments", + "properties": { + "dataSet": { + "type": "object", + "description": "NcBulkValuesHolder datatype" + }, + "recurse": { + "type": "boolean" + } + } } } -} +} \ No newline at end of file diff --git a/Development/third_party/is-14/v1.0.x/APIs/schemas/bulkProperties-validate-request.json b/Development/third_party/is-14/v1.0.x/APIs/schemas/bulkProperties-validate-request.json index a645997f..7796c1ce 100644 --- a/Development/third_party/is-14/v1.0.x/APIs/schemas/bulkProperties-validate-request.json +++ b/Development/third_party/is-14/v1.0.x/APIs/schemas/bulkProperties-validate-request.json @@ -1,15 +1,24 @@ { "$schema": "http://json-schema.org/draft-04/schema#", "type": "object", - "description": "PATCH request body for validating NcBulkValuesHolder object.", - "title": "ValidateSetPropertiesByPaths", + "description": "OPTIONS request body for invoking ValidateSetPropertiesByPath method on NcBulkPropertiesManager", + "title": "Bulk properties Validate request", "required": [ "arguments" ], "properties": { "arguments": { "type": "object", - "description": "Method arguments. Arguments are specified as nested properties inside this object and their types are dictated by the specific MS-05-02 model for the method targeted. Arguments only need to be included for methods which have arguments and MUST be omitted if the method does not require any arguments." + "description": "Method arguments. The rolePath is offered in the URL and is not part of these arguments", + "properties": { + "dataSet": { + "type": "object", + "description": "NcBulkValuesHolder datatype" + }, + "recurse": { + "type": "boolean" + } + } } } } diff --git a/Development/third_party/is-14/v1.0.x/APIs/schemas/methods-base.json b/Development/third_party/is-14/v1.0.x/APIs/schemas/methods-base.json index dd30ab1c..6b9222b5 100644 --- a/Development/third_party/is-14/v1.0.x/APIs/schemas/methods-base.json +++ b/Development/third_party/is-14/v1.0.x/APIs/schemas/methods-base.json @@ -4,7 +4,8 @@ "description": "Describes the Configuration API /rolePaths/{rolePath}/methods base", "title": "Configuration API /rolePaths/{rolePath}/methods base", "items": { - "type": "string" + "type": "string", + "pattern": "^[0-9]+m[0-9]+" }, "uniqueItems": true } diff --git a/Development/third_party/is-14/v1.0.x/APIs/schemas/properties-base.json b/Development/third_party/is-14/v1.0.x/APIs/schemas/properties-base.json index ae1a9312..72c3f548 100644 --- a/Development/third_party/is-14/v1.0.x/APIs/schemas/properties-base.json +++ b/Development/third_party/is-14/v1.0.x/APIs/schemas/properties-base.json @@ -4,7 +4,8 @@ "description": "Describes the Configuration API /rolePaths/{rolePath}/properties base", "title": "Configuration API /rolePaths/{rolePath}/properties base", "items": { - "type": "string" + "type": "string", + "pattern": "^[0-9]+p[0-9]+" }, "uniqueItems": true } diff --git a/Development/third_party/is-14/v1.0.x/APIs/schemas/rolePath.json b/Development/third_party/is-14/v1.0.x/APIs/schemas/rolePath.json index 0cafe9c2..03cf62b4 100644 --- a/Development/third_party/is-14/v1.0.x/APIs/schemas/rolePath.json +++ b/Development/third_party/is-14/v1.0.x/APIs/schemas/rolePath.json @@ -6,8 +6,8 @@ "items": { "type": "string", "enum": [ - "bulkProperties", - "descriptors/", + "bulkProperties/", + "descriptor/", "methods/", "properties/" ] From 131ddc93087dcf73208d7081911894b3b9551bdc Mon Sep 17 00:00:00 2001 From: jonathan-r-thorpe <64410119+jonathan-r-thorpe@users.noreply.github.com> Date: Fri, 6 Dec 2024 10:41:08 +0000 Subject: [PATCH 2/3] Apply suggestions from code review Co-authored-by: Simon Lo --- Development/nmos/control_protocol_resource.cpp | 6 +++--- Development/nmos/control_protocol_resource.h | 4 ++-- Development/nmos/control_protocol_state.cpp | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Development/nmos/control_protocol_resource.cpp b/Development/nmos/control_protocol_resource.cpp index b7992157..9d866ea1 100644 --- a/Development/nmos/control_protocol_resource.cpp +++ b/Development/nmos/control_protocol_resource.cpp @@ -2177,7 +2177,7 @@ namespace nmos return details::make_nc_datatype_descriptor_enum(U("Restore validation status enumeration"), U("NcRestoreValidationStatus"), items, value::null()); } // TODO: add link - web::json::value make_nc_property_restore_notice_type() + web::json::value make_nc_property_restore_notice_type_datatype() { using web::json::value; @@ -2188,7 +2188,7 @@ namespace nmos return details::make_nc_datatype_descriptor_enum(U("Property restore notice type enumeration"), U("NcPropertyRestoreNoticeType"), items, value::null()); } // TODO: add link - web::json::value make_nc_property_restore_notice() + web::json::value make_nc_property_restore_notice_datatype() { using web::json::value; @@ -2198,7 +2198,7 @@ namespace nmos web::json::push_back(fields, details::make_nc_field_descriptor(U("Property restore notice type"), nmos::fields::nc::notice_type, U("NcPropertyRestoreNoticeType"), false, false, value::null())); web::json::push_back(fields, details::make_nc_field_descriptor(U("Property restore notice message"), nmos::fields::nc::notice_message, U("NcString"), false, false, value::null())); - return details::make_nc_datatype_descriptor_struct(U("Bulk values holder descriptor"), U("NcPropertyRestoreNotice"), fields, value::null()); + return details::make_nc_datatype_descriptor_struct(U("Property restore notice descriptor"), U("NcPropertyRestoreNotice"), fields, value::null()); } // TODO: add link web::json::value make_nc_object_properties_set_validation_datatype() diff --git a/Development/nmos/control_protocol_resource.h b/Development/nmos/control_protocol_resource.h index b50bd403..270dcc51 100644 --- a/Development/nmos/control_protocol_resource.h +++ b/Development/nmos/control_protocol_resource.h @@ -451,9 +451,9 @@ namespace nmos // web::json::value make_nc_restore_validation_status_datatype(); // - web::json::value make_nc_property_restore_notice_type(); + web::json::value make_nc_property_restore_notice_type_datatype(); // - web::json::value make_nc_property_restore_notice(); + web::json::value make_nc_property_restore_notice_datatype(); // web::json::value make_nc_object_properties_set_validation_datatype(); // diff --git a/Development/nmos/control_protocol_state.cpp b/Development/nmos/control_protocol_state.cpp index 56542dd8..09ee8f6c 100644 --- a/Development/nmos/control_protocol_state.cpp +++ b/Development/nmos/control_protocol_state.cpp @@ -486,8 +486,8 @@ namespace nmos { U("NcObjectPropertiesHolder"), {make_nc_object_properties_holder_datatype()}}, { U("NcBulkValuesHolder"), {make_nc_bulk_values_holder_datatype()}}, { U("NcRestoreValidationStatus"), {make_nc_restore_validation_status_datatype()}}, - { U("NcPropertyRestoreNoticeType"), {make_nc_property_restore_notice_type()}}, - { U("NcPropertyRestoreNotice"), {make_nc_property_restore_notice()}}, + { U("NcPropertyRestoreNoticeType"), {make_nc_property_restore_notice_type_datatype()}}, + { U("NcPropertyRestoreNotice"), {make_nc_property_restore_notice_datatype()}}, { U("NcObjectPropertiesSetValidation"), {make_nc_object_properties_set_validation_datatype()}}, { U("NcMethodResultBulkValuesHolder"), {make_nc_method_result_bulk_values_holder_datatype()}}, { U("NcMethodResultObjectPropertiesSetValidation"), {make_nc_method_result_object_properties_set_validation_datatype()}} From 6ad0c6752613059da3595c9ffd65d83b4b8be66a Mon Sep 17 00:00:00 2001 From: "Jonathan Thorpe (Sony)" Date: Fri, 29 Nov 2024 11:50:21 +0000 Subject: [PATCH 3/3] Remove property_trait enum --- Development/nmos/control_protocol_typedefs.h | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/Development/nmos/control_protocol_typedefs.h b/Development/nmos/control_protocol_typedefs.h index 42803663..40301f0d 100644 --- a/Development/nmos/control_protocol_typedefs.h +++ b/Development/nmos/control_protocol_typedefs.h @@ -124,19 +124,6 @@ namespace nmos }; } - // Device Configuration - // NcPropertyTrait - namespace nc_property_trait - { - enum trait - { - instance_specific = 1, // Property is instance specific - ephemeral = 2, // Property is ephemeral - immutable = 3, // Property is immutable - device_generated = 4 // Property value is generated by the device - }; - } - // NcRestoreValidationStatus namespace nc_restore_validation_status {