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

Property node use for allowed definition added. #21

Merged
merged 4 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 6 additions & 4 deletions docs-gen/content/type_definition_rule_set/basics.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 22 additions & 4 deletions docs-gen/content/type_definition_rule_set/property.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -35,3 +40,16 @@ 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.
```
Loading