Scheme Editor/en: Unterschied zwischen den Versionen

Aus expecco Wiki (Version 2.x)
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „thumb|300px|Schema Editor The schema editor is used to define the interface of a block. It can be found on the "Schema" tab after se…“)
 
Zeile 1: Zeile 1:
[[Bild:Schema Editor.png|thumb|300px|Schema Editor]]
[[Bild:Schema Editor.png|thumb|300px|Schema Editor]]
The schema editor is used to define the interface of a block. It can be found on the "Schema" tab after selecting either an elementary or a compound block in the navigation tree.
The schema editor is used to define the interface of a action. It can be found on the "Schema" tab after selecting either an elementary or a compound action in the navigation tree.


To the right, you see an example for the interface of a block with an [[Input Pin|input]] (in) and [[Output Pin|output pin]] (out).
To the right, you see an example for the interface of a action with an [[Input Pin|input]] (in) and [[Output Pin|output pin]] (out).


The interface consists of two sides, the input side and the output side. The editor shows a box representation of the block, where inputs are located on the left, outputs on the right side of the representing box.
The interface consists of two sides, the input side and the output side. The editor shows a box representation of the action, where inputs are located on the left, outputs on the right side of the representing box.


Schema editors can also be invoked on blocks that are write protected, e.g. blocks from libraries like the standard library. Such components cannot be modified, but they can however be displayed by the editors.
Schema editors can also be invoked on actions that are write protected, e.g. actions from libraries like the standard library. Such components cannot be modified, but they can however be displayed by the editors.




== Adding & Removing Pins ==
== Adding & Removing Pins ==
New input and output pins can be added using the icon buttons in the top corners of each side of the block's representation box ([[Bild:Icon Add Inputpin.png]] / [[Bild:Icon Add Outputpin.png]]). Existing inputs and outputs can be removed using the icon buttons directly beside the buttons for adding ([[Bild:Icon Remove Pin.png]]), but a pin has to be selected for this operation first. Please note that some blocks, like shell command blocks, need a minimum set of pins which can not be removed.
New input and output pins can be added using the icon buttons in the top corners of each side of the action's representation box ([[Bild:Icon Add Inputpin.png]] / [[Bild:Icon Add Outputpin.png]]). Existing inputs and outputs can be removed using the icon buttons directly beside the buttons for adding ([[Bild:Icon Remove Pin.png]]), but a pin has to be selected for this operation first. Please note that some blocks, like shell command blocks, need a minimum set of pins which can not be removed.


When new pins are added, they get default names attached with a sequential number, like ''in1'', ''in2'', ''out1'', ''out2'', etc. The name of a pin can be changed by clicking on the name field, which then turns into an input text field, allowing to type in a new name for the pin. These names are not only for description purpose but also to access the pin's value in an elementary block's source code (i.e. for blocks written in a textual programming language).
When new pins are added, they get default names attached with a sequential number, like ''in1'', ''in2'', ''out1'', ''out2'', etc. The name of a pin can be changed by clicking on the name field, which then turns into an input text field, allowing to type in a new name for the pin. These names are not only for description purpose but also to access the pin's value in an elementary block's source code (i.e. for blocks written in a textual programming language).

Version vom 1. April 2014, 12:51 Uhr

Schema Editor

The schema editor is used to define the interface of a action. It can be found on the "Schema" tab after selecting either an elementary or a compound action in the navigation tree.

To the right, you see an example for the interface of a action with an input (in) and output pin (out).

The interface consists of two sides, the input side and the output side. The editor shows a box representation of the action, where inputs are located on the left, outputs on the right side of the representing box.

Schema editors can also be invoked on actions that are write protected, e.g. actions from libraries like the standard library. Such components cannot be modified, but they can however be displayed by the editors.


Adding & Removing Pins[Bearbeiten]

New input and output pins can be added using the icon buttons in the top corners of each side of the action's representation box (Icon Add Inputpin.png / Icon Add Outputpin.png). Existing inputs and outputs can be removed using the icon buttons directly beside the buttons for adding (Icon Remove Pin.png), but a pin has to be selected for this operation first. Please note that some blocks, like shell command blocks, need a minimum set of pins which can not be removed.

When new pins are added, they get default names attached with a sequential number, like in1, in2, out1, out2, etc. The name of a pin can be changed by clicking on the name field, which then turns into an input text field, allowing to type in a new name for the pin. These names are not only for description purpose but also to access the pin's value in an elementary block's source code (i.e. for blocks written in a textual programming language).

For all other operations concerning the pins, the pin to be modified has to be selected first. To select a pin, click on it with the left mouse button. Using the CTRL-key while clicking toggles the pin into or out of the selection. Pressing the Shift-key while clicking, selects all pins in between the previously selected pin and the clicked-on pin. The selected pin(s) will appear highlighted in a red color.

Each pin has a datatype attribute that determines which kind of data is expected or generated by the pin. Every new pin initially gets the data type that was last used; initially the data type "Any" is assigned by default. This type is also used as default, whenever no other reasonable data type can be predicted. The pin's data type is displayed beside the pin, outside of the representation box. The data type for a pin can be changed in the context menu, through its "datatype" submenu, which brings up a list of available types. Note that when you have already placed step instances of the modified block in any activity diagram, a change in the data type of a pin may affect existing connections in which the pin is involved. If the new type is incompatible with the connection, they are drawn as dotted line in the diagram, or when a preset value becomes incompatible, the value is displayed in a red color.

To open the context menu for a pin, select the pin, then press the right mouse button. The context menu, besides assigning the data type, provides additional functions. Since input and output pins have slightly different properties, their context menus are different and described below.

Changing Triggering Conditions[Bearbeiten]

The triggering condition of a block defines which input pins must have received data on order for a new activity to be triggered and started. These triggering conditions can be:

  • AndConnected (Default)
    All connected input pins must have received data.
  • And
    All input pins must have received data.
  • Or
    At least one input pin must have received data.

The most common trigger condition is AndConnected. The Or condition allows for a step to be activated whenever any input arrives on any of its pins. It is especially useful to handle events or input data coming from different sources.

To change the triggering conditions either left click on the trigger-condition field (located at the top left of the block) and select one of the conditions. The Trigger Condition menu is also found as a submenu of the right-click menu in the schema-tab.

Role in Load and Performance Tests[Bearbeiten]

These settings are also not yet used. They are only effective for load and performance tests, which are not yet officially released in pre 2.0 versions.

Declaring Semantic Attributes[Bearbeiten]

The step's popup menu also allows for a number of semantic attributes to be defined for the action. These are only relevant for the code generator, which is not yet officially released in pre 2.0 versions. When set, these flags allow for the code generator to optimize the execution speed for the action. Unless elementary code is generated for a compound action which uses that action, these settings have no effect whatsoever (i.e. do not care for them). Currently, semantic attributes are:

  • Functional
    Hint for the code generator, and the execution engine, that the action's code is purely functional. This means, that the output value(s) only depend(s) on the input value(s), and that neither the input values themself nor any other global data is modified by any side effect. Purely functional blocks can be executed in parallel without a need for synchronization.
  • HasSideEffectOnInputValue
    Hint for the code generator and executor, that the action's code is modifying any of its input values. This means basically, that propably no other step which possibly uses this value should execute concurrently.
  • HasSideEffectOnAnyValue
    Hint for the code generator and executor, that the action's code is modifying any object. This means basically, that propably no other step should execute concurrently.
  • Writes all Output(s) exactly once
    Hint for the code generator, that the elementary code writes all of the output pins, but only once. This allows for the code generator to eliminate any data queues along the output connections, and pass these values to followup action code as a function call.
  • Writes any Output exactly once
    Hint for the code generator, that the elementary code writes any of the output pins, but only once. This also allows for the code generator to generate shorter, more efficient code.

Notice: these flags may only be set if you are absolutely sure about what you do and how the elementary code behaves. In a future version, a more advanced code analysis might be added, which may make these flag settings obsolete. If in doubt, leave these flags unchanged (the worst thing that happens in this case, is that any generated elementary code executes slightly slower).

Adding Pre- and Post Actions[Bearbeiten]

Compound blocks can have pre- and post-actions. The pre-action block will be executed each time the owning block is triggered; the post execution block is executed after the owning block is finished. This can be useful e.g. to allocate and/or release resources. To add a pre- or post-action, drag and drop any action from the navigation tree into the corresponding field at the bottom. Please note that these blocks cannot not have input pins.

Pin Default Values[Bearbeiten]

Default values for unconnected step-pins can be defined here, by "freezing" a pin in this schema editor. Both constant-value and environment-freeze values are possible.

Pin Specific Options (Context Menu)[Bearbeiten]

  • Show Datatype
    This option opens a view which shows the pins data type. Note that you can not change the datatype in this view.
  • Remove Pin
    This option simply removes the selected pin.
  • Commment...
    This option causes a text editor to open. It allows you entering a comment that will be displayed as a tooltip of the selected pin.
  • Move Up/Down
    With those options you can change the sequence of the pins.

When an input pin is selected in the editor:

Input Pin Options
  • Freeze (as)
    This option allows, for most standard data types, presetting the input value according to the data type, by typing a valid value into a text input field. The identifier of the data type in the menu entry differs depending on the data type of the pin. A freeze value defined in this schema defines the input value of unconnected step-pins. It will only be in effect, if the action is placed as a step and the corresponding step-pin is not connected or frozen.
  • Read from Environment Variable
    This option causes a dialog to open up, allowing specifying the environment variable's name in a text input field. For more information see: Environment Freeze Value. This freeze value is only effective for unconnected step pins (read description above).
  • Unfreeze
    This option is only available if the selected pin is frozen to a value or to an environment variable. No matter if the pin was preset with a direct value or with an environment variable, the preset information will be lost.
  • DataType
    This option is used to specify the data type of the selected pin. This brings up a list of the available data types.
  • Freeze Value Editor
    This option allows you to specify the editor type for the freeze value, e.g. strings can be entered single line, multiline or as a password string.
  • Parameter
    This option determines whether the select pin is a parameter pin. For more information see: Input Pin.
  • Telegram
    This option determines whether the selected pin is a telegram pin. For more Information see: Telegram Pin.

When an output pin is selected in the editor:

Output Pin Options
  • Buffered
    This check box serves to switch the buffering mode of the pin on or off. For more information see: Output Pin
  • Datatype
    This option is used to specify the data type of the selected pin. This brings up a list of the available data types.



For other editors see: Editors

The full online documentation can be found under: Online Documentation



Copyright © 2014-2024 eXept Software AG