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.
The figure below shows the structure of the important components, you need to use jBEAM.
Here you will find, for what each of these components is responsible:
Component | Function |
---|---|
jBEAM | Controller |
ScriptService | service for the execution of Scripts |
ComponentManager | creation of Components (Importer, Exporter and Calculations etc.) |
DataItemManager | management of Result Items (Values, Channels and Matrices) |
DesktopManager | management (creation, deletion, modification) of all graphics (Line Charts, Text, other) |
ScriptingComponent | the script component itself (with result items) |
The complete jBEAM context is accessible by means of the following predefined variables.
Name | Class | Description |
---|---|---|
jB | com.AMS.jBEAM.jBEAM | jBEAM Instance |
jS | com.AMS.jBEAM.ScriptService | jB.getScriptService(); |
jC | com.AMS.jBEAM.ComponentManager | jB.getComponentManager(); |
jG | com.AMS.jBEAM.DesktopManager | jB.getDesktopManager(); |
jD | com.AMS.jBEAM.DataItemManager | jB.getDataItemManager(); |
jP | com.AMS.jBEAM.ScriptingComponent | |
cea2Bus | org.asam.cea.Cea2Bus.Cea2BusIF | jB.getDataItemManager(); |
So if you use this predefined variables, you have direct access to all available sub components.
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.
DeleteAllObjects() is a method within jBEAM to delete all existing objects in jBEAM. If the method is performed all jBEAM objects are completely deleted.
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.
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
For scripts it is highly recommended to use the NOT_THREADED mode.
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.