API-icon.png

Unknown macro: floating-toc

Structure of jBEAM

On this page you find information about the structure of jBEAM, which are important to know, if you want to use the jBEAM for scripting.

jBEAM Structure

The figure below shows the structure of the important components, you need to use jBEAM.

structure_jB.png

Here you will find, for what each of these components is responsible:

ComponentFunction
jBEAMController
ScriptServiceservice for the execution of Scripts
ComponentManagercreation of Components (Importer, Exporter and Calculations etc.)
DataItemManagermanagement of Result Items (Values, Channels and Matrices)
DesktopManagermanagement (creation, deletion, modification) of all graphics
(Line Charts, Text, other)
ScriptingComponentthe script component itself (with result items)

Predefined Variables

The complete jBEAM context is accessible by means of the following predefined variables.

NameClassDescription
jBcom.AMS.jBEAM.jBEAMjBEAM Instance
jScom.AMS.jBEAM.ScriptServicejB.getScriptService();
jCcom.AMS.jBEAM.ComponentManagerjB.getComponentManager();
jGcom.AMS.jBEAM.DesktopManagerjB.getDesktopManager();
jDcom.AMS.jBEAM.DataItemManagerjB.getDataItemManager();
jPcom.AMS.jBEAM.ScriptingComponent
cea2Busorg.asam.cea.Cea2Bus.Cea2BusIFjB.getDataItemManager();

So if you use this predefined variables, you have direct access to all available sub components.

Basic function

In this section you will find some information about basic functions, which are important to use in jBEAM.

Attention please: No Generics are supported (Vector<String> sVector = new Vector<String>()) if you use scripts.

Clear jBEAM

DeleteAllObjects() is a method within jBEAM to delete all existing objects in jBEAM. If the method is performed all jBEAM objects are completely deleted.

jB.deleteAllObjects();

If this command is activated by the script component, the command will delete itself. The Scripting component is the only component which is not deleted.

Class[] excludedClasses = new Class[] {BeanShellScripting.class};
boolean exclude = true;
jC.deleteComponents(exclude, excludedClasses);

Operation Mode

The Operation Modes are defined in the Component Manager (com.AMS.jBEAM.ComponentManager.) class. NOT_THREADED sequential validation; means that validation is completed when validateFramework() returns. THREADED parallel validation

jC.setOperationMode(ComponentManager.NOT_THREADED);

For scripts it is highly recommended to use the NOT_THREADED mode.

Validation in jBEAM

The components status has to be valid. After a component is modified, this component has to execute validateContent() to resume a valid status. To validate the complete method validateFramework()the Component Manager has to be activated. ValidateFramework() calls validateContent() for all invalid components. To reflect the dependencies of the components the operation mode must be set to NOT_THREADED to achieve step by step validation. Both methods validate connections of components ensuring validity.

.setPropertyA(Value);
.setPropertyB(Value);
jC.validateFramework();

See also


Copyright by Kistler Chemnitz GmbH 2021
XWiki Enterprise 4.4 - Documentation