Titan



create


The operation is used to create a parallel test component at any point in a behavior description by any other (running) component. 

The optional alive keyword can be used to establish an "alive" parallel test component.

Optionally, a name can be associated with the newly created component instance. Associated component names can be free-format character strings, which are not required to be unique.

The main difference between normal and alive parallel test components is that alive parallel test components can be started many times while normal parallel test components can only be started once. See also the start keyword!

Related keywords:


[ module_identifier.] component_identifier.create [ ( component_name ) ] [ alive ];


Example 1:

var CompType_CT vc_CompRef;
vc_CompRef := CompType_CT.create;

The first line declares a variable having the same type (CompType_CT) as the component to be created. The second line creates the component and stores its reference in the variable vc_CompRef.


Example 2:

var CompType_CT vc_AliveCompRef;
vc_AliveCompRef := CompType_CT.create alive;

The declared component reference (vc_AliveCompRef) will be used to store the reference of the newly created alive parallel test component.


Example 3:

var CompType_CT vc_AliveCompRef;
vc_AliveCompRef := CompType_CT.create("mycomp") alive;

The component instance will have the name "mycomp".


BNF definition of create