The GreenBus system model is built around two core types of I/O objects:
The set of Points and Commands represent the flow of data and control from device communications or some other data source. Additional structure is built on top of these basic elements, divided into the communications model and the equipment model.
`The communications model, made up of Endpoint objects, organizes Points and Commands according to their data sources. Endpoints represent a coordination point for the external processes (or "front ends") that provide data access, defining the type of process (or protocol), providing storage for any configuration necessary to establish communications, and allowing operators to disable the data source.
The equipment model, made up of model Entity objects, organizes Points and Commands into a logical hierarchy of groupings which provide structure and context for consumers of the data. Entities are primarily defined by their position in this tree structure, but may also contain metadata and configuration for applications and displays.
Model objects (Points, Commands, Entities, and Endpoints) are all identified by two fields:
Names are intended to provide human readable identifiers, while the immutability of UUIDs enables applications to reference objects correctly regardless of changes to their names.
Associations between objects are defined by directed relationships between parents and children.
System modeling only manipulates direct relationships, but GreenBus enables querying derived relationships created when a parent object's children have their own children. Derived relationships must not lead back to a parent (a "cycle"), and there must be only one path between any two objects.
Examples of relationship types used in the core system model:
owns
- defines the structure of the equipment model.source
- defines associations in the communications model between Endpoints and Points and Commands.feedback
- defines associations between Points and Commands that logically act on the values it represents.Note that while the naming convention for objects in equipment models may reflect the tree structure, there is no direct link between relationships and object names.
Model objects each contain a set of types. Types are queryable metadata that enable marking objects as belonging to a logical or semantic group. Types may be any string, and an object can have as many types as needed.
Model objects may also contain key values, which provide a means of storing and providing programmatic access to additional system configuration and/or metadata. Objects may have an arbitrary number of key values, and every combination of UUID and key is unique.
The data stored in key values may include boolean and numeric values, strings, and arbitrary arrays of bytes.