Titan



component


The keyword is used to define a test component type.

Related keywords:


type component component_identifier { [ port_instance; ]  [ const_def; ]  [ var_instance; ]  [ timer_instance; ] };

Every element within the curly brackets may be repeated.


Example 1:

type component MyComponentType_CT {
   port MyMessagePortType_PT P1_PCO,P2_PCO;
   const bitstring c_MyConst := ’1001’B; 
   var integer v_MyVar; 
   timer T_MyTimer := 1.0; 
}

The component called MyComponentType_CT is declared. 
It contains two ports (P1_PCO,P2_PCO) of type MyMessagePortType_PT, 
a constant called c_MyConst which equals 1001, 
a variable called v_MyVar 
and a timer called T_MyTimer with a default value of 1 second.



BNF definition of component