Information Models

What are Information Models

Within the SMARTUNIFIER an Information Model describes the communication related data that is available for a device or IT system. One device or one IT system therefore is represented by one Information Model. An Information Model consists of so-called Node Types. Information Models are build up in a hierarchical tree structure, i.e., elements within the Information Model can contain further elements. This is required to model the data structure of devices as naturally as possible.

The kind of Node Types to be used depends on the protocol of the device or IT system. Before creating the Information Model take a look in the chapter Communication Channels to see which Node Types the Channel you want to use is supporting.

How to create a new Information Model

Follow the steps described below to create an Information Model:

  • Select the SMARTUNIFIER Information Model Perspective (1).

SideMenuInfoModel
  • You are presented with the following screen containing a list view of existing Information Models.

  • In order to add a new Information Model, select the “Add Model“ button at the top right corner (2).

InfoModelListView
  • On the following screen provide the following mandatory information: Group and Name (3).

  • The “Apply” button at the top right corner is enabled after all mandatory fields are filled in. Click the button to generate a new Information Model (4).

  • The newly created Information Model is now visible as a node on the left side of the screen.

InfoModelEditor
  • After the root model node is created, a new Information Model can be built up using definition types.

  • Perform a right click on the root model node and select “Add Node” (5). Select a Definition Type from the dialog (6).

AddNewInfoModelEditor

Node Types

Model node types are elements within an Information Model. Model node types are variables, properties, events, commands and also collections such as arrays and lists. Each model node type has a Data Type that defines whether the model node type is a predefined data type or a custom data type.

Data Types

There are two kinds of Data Types:

  • Predefined Types e.g., String, Integer, Boolean and more. (Note: Only available for the definition types - Variables, Properties, Arrays, Lists)

  • Custom Types

How to create a Variable as a Simple Type

  • Add a new Variable, enter an ID and select a primary data type for the Data Type e.g., “String” (1)

AddNewInfoModelEditor
Predefined Data Types

Type

Definition

Boolean

true or false

Byte

8 bit signed value (-27 to 27-1)

Int

32 bit signed value (-231 to 231-1)

String

Sequence of characters

Char

16 bit unsigned Unicode character (0 to 216-1)

Double

64 bit IEEE 754 double-precision float

Float

32 bit IEEE 754 single-precision float

Long

64 bit signed value (-263 to 263-1)

Short

16-bit signed integer

Array

Mutable, indexed collections of values.

List

Class for immutable linked lists representing ordered collections of elements.

LocalDate

Immutable date-time object that represents a date, often viewed as year-month-day.

LocalDateTime

Immutable date-time object that represents a date-time, often viewed as year-month-day-hour-minute-second.

LocalTime

Immutable date-time object that represents a time, often viewed as hour-minute-second.

OffsetDateTime

Immutable representation of a date-time with an offset.

How to create a Variable as a Custom Type

  • Add a new Variable, enter an ID and enter a custom name for the Data Type e.g., “MyFirstComplexVariableType” (1)

  • Select the Custom Variable - “MyFirstComplexVariableType” - and add a new Variable underneath it (2)

Note

Model Node Types with custom data types can be easily duplicated throughout the Information Model by selecting the same custom data type for a new model node type.

AddNewInfoModelEditor

Data Types for Properties, Arrays and Lists can be defined as shown above for Variables.