From 1e75fbf1a327f619e982fc58fd384c8b78f12b8a Mon Sep 17 00:00:00 2001 From: Ulf Bjorkengren Date: Wed, 3 Jul 2024 11:56:54 +0200 Subject: [PATCH 1/2] Property node use for allowed definition added. Signed-off-by: Ulf Bjorkengren --- .../type_definition_rule_set/basics.md | 10 ++++--- .../type_definition_rule_set/property.md | 27 ++++++++++++++++--- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/docs-gen/content/type_definition_rule_set/basics.md b/docs-gen/content/type_definition_rule_set/basics.md index 501b40f..0d64d7e 100644 --- a/docs-gen/content/type_definition_rule_set/basics.md +++ b/docs-gen/content/type_definition_rule_set/basics.md @@ -3,12 +3,14 @@ title: "Type Definition Model" weight: 1 --- -A `type_definition` tree contains data type definitions that are not part of the -[primitive datatypes](/hierarchical_information_model/common_rule_set/data_entry/datatypes#primitive-datatypes) defined by HIM. - -The currently supported node types are suited for definition of [structs](https://en.wikipedia.org/wiki/Composite_data_type). +A `type_definition` tree contains data type definitions. +These can either be complex datatypes that are not part of the +[primitive datatypes](/hierarchical_information_model/common_rule_set/data_entry/datatypes#primitive-datatypes) defined by HIM, +or it can be common allowed definitions. ## Node Types +The currently supported node types can be used for either the definition of [structs](https://en.wikipedia.org/wiki/Composite_data_type), +or for the definition of [allowed](/hierarchical_information_model/common_rule_set/data_entry/value_restrictions/#allowed) value restrictions. The node types for representing type definitions are: - Branch diff --git a/docs-gen/content/type_definition_rule_set/property.md b/docs-gen/content/type_definition_rule_set/property.md index 145acf7..02f6c03 100644 --- a/docs-gen/content/type_definition_rule_set/property.md +++ b/docs-gen/content/type_definition_rule_set/property.md @@ -4,8 +4,7 @@ date: 2019-08-04T12:37:03+02:00 weight: 30 --- -Data represented by the node type `property` have a relationship to any other data having the same `struct` parent in that they are all sampled in an "atomic" operation, -i.e. the set of data points have the same timestamp representing the sample time. +The node type `property` can either be used to represent members of a struct, or common allowed definitions. Nodes of the type `property` must have the following mandatory metadata: - Name @@ -22,11 +21,17 @@ Besides the mandatory metadata mentioned above, the following optional metadata - Allowed - Comment +When used for allowed definition, the metadata types Unit, Min, Max must not be used. + For more information, please see the [Common Rule Set: Optional Metadata](/hierarchical_information_model/common_rule_set/basics#optional-metadata). -This node type must have a node of type `struct` as parent, and must not have any children. +## Property node used to define struct members +Data represented by the node type `property` have a relationship to any other data having the same `struct` parent in that they are all sampled in an "atomic" operation, +i.e. the set of data points have the same timestamp representing the sample time. + +In this usage the node type must have a node of type `struct` as parent, and must not have any children. -An example of the specification of a `property` node is given below. +An example of the specification of a `property` node for a struct member is given below. ```YAML Type.OpenHours.Open: @@ -35,3 +40,17 @@ Type.OpenHours.Open: max: 24 description: Time the address opens ``` + +## Propety node used for allowed definition +In this usage the node type must have a node of type `branch` as parent, and must not have any children. + +An example of the specification of a `property` node for an allowed definition is given below. + +```YAML +Type.Cabin.DriverPositionValues: + type: property + datatype: string + allowed: ['LEFT', 'MIDDLE', 'RIGHT'] + description: DriverPosition allowed values. +``` + From eba46ba89b6067b5f277b7ac227c4ffea13fae77 Mon Sep 17 00:00:00 2001 From: Ulf Bjorkengren Date: Wed, 3 Jul 2024 12:00:57 +0200 Subject: [PATCH 2/2] End of file fix. Signed-off-by: Ulf Bjorkengren --- docs-gen/content/type_definition_rule_set/property.md | 1 - 1 file changed, 1 deletion(-) diff --git a/docs-gen/content/type_definition_rule_set/property.md b/docs-gen/content/type_definition_rule_set/property.md index 02f6c03..b70ff49 100644 --- a/docs-gen/content/type_definition_rule_set/property.md +++ b/docs-gen/content/type_definition_rule_set/property.md @@ -53,4 +53,3 @@ Type.Cabin.DriverPositionValues: allowed: ['LEFT', 'MIDDLE', 'RIGHT'] description: DriverPosition allowed values. ``` -