Database structure

Object

In the chapter Database structure there is a description of how objects are constructed. Now there is
reason to go a little further in the subject.

An object consists of an object head and an object body. The object head contains information
about the object name, class and relation to other objects. The object body contains the data
of the object.

Object header

An object has a name with a maximum size of 31 characters that is stored in the object header.

In the object header there is also a link to the class description of the object. The class
description contains information of how to interpret the data of the object, how it is divided
into different attributes, and the type of the attributes. You also find the methods that work
on the object.

An object is placed in a tree structure and the object head contains pointer to the closest
relatives: father, backward sibling, forward sibling and first child.

The structure of an object head are common for all types of objects.

Object body

An object can have two bodies, one body that contains the data that is needed in runtime.
It can also contain one additional body with data that only exist in the development
environment.

A body is divided into attributes that contain data of a specific type, e.g a Boolean, a
Float32 or an Int32. But an attribute can also have a more complex datatype, as an array or
a class.

RtBody
RtBody is the body that exists in the runtime database. The body is also present in the
development environment, to make it possible to set values to different attributes in the
body.

DevBody
Some objects also have a DevBody, a body that exists only in the development database, and that
is not loaded into the runtime database. This body is mainly used by plc objects, where
devbody for example contains graphical data for the plc editor.