This source code represents the Basyx middleware state that was used to implement the BaSys 4.0 demonstration at the Hannover Fair 2018 (HMI2018). In the meanwhile, this version has been declared as outdated and the most recent version can be found at https://www.basys40.de/.
Nonetheless, this source code can be still of use as it shows the basic steps on how the HMI2018 demo was built on top of the Eclipse oM2M middleware technology.
In this demo, three software components must be set up.
In addition, there is a .NET client (including a full oneM2M client) for communicating with the middleware. The .NET client has not been used in the HMI2018 demo.
Moreover, the definition of the BPMN extensions are added to this source code. BPMN was used as exchange format for workflows. Workflows are descriptions of a productions process and were executed during the HMI2018 demo by BPMN Process Engine to control I4.0 components. The file "misc/bpmnFormatMetadata.xsd" contains the definitions. Each workflow has a id, label and descrption. Then, roles are defined. A role is reference to an I4.0 component type and is later assigned to an I4.0 component instance by the Process Engine (or by user input). In the XSD, the roles are on submodel level (both levels, AAS or submodel, can be referenced. The name is an arbitrary role name and the type is the type identifier (e.g. Vorto repository URL). Next, conditions are defined. The conditions are described in JavaScript and are interpreted by the Process Engine when assigning I4.0 component instances to roles. Optimally, all conditions are fulfilled when an assignment has been made. Inputs and Outputs describe what is going into a single workflow and what comes out. On the one hand, this could be data or a (physical) thing, such as a product. Data is described by a name, data type and a JavaScript expression, that binds e.g. a submodel's property to the data input/output. Things have names and also an expression. The expression is typically used to describe the location of a thing.
In workflows, ScriptTask (language = JavaScript) are used to control the I4.0 components. Standard JavaScript was enriched by a single built-in class, that allows to communicate with the basyx middleware. The class/object was also available for the conditions and expression attributes.
class AASManager { getProperty(String aas, String sub, String property) : any; setProperty(String aas, String sub, String property, any value); callOperation(String aas, String sub, String operation, any... parameters) : any; getCollection(String aas, String sub, String property, String key) : any; setCollection(String aas, String sub, String property, String key, any value); }