Type definitions for the MBT Applib
The MBT applib provides a simple FSM that can catch the reported events from the applibs and can execute all desired test steps registered by the applibs. The behavior of the FSM can be controlled via functions in the “User mapping” code, or via MBT Applib PDUs on the MBT Applib Interface: the EPTF_MBT_Tester_CT component has a EPTF_MBT_PortType to control and observe the behavior of the EPTF_MBT_LGen_CT component running the FSM f_EPTF_MBT_initLGenFsm and the applibs. The MBT applib can be used to test other applibs from their FSM API point of view, or use applibs as test harnesses.
| EPTF_MBT_LGen_Definitions | Type definitions for the MBT Applib |
| c_EPTF_MBT_myBName | constant for the behavior name |
| c_EPTF_MBT_inputIdx_incomingUserRequest | constant for the input index of incomming user request |
| c_EPTF_MBT_inputIdx_incomingUserRequest | constant for the input name of incomming request |
| c_EPTF_MBT_inputIdx_incomingTestStepRequest | constant for the input index of incomming TesStep request |
| c_EPTF_MBT_inputName_incomingTestStepRequest | constant for the input name of TEstStep Request |
| c_EPTF_MBT_stepIdx_invokeTestStep | constant for the step index of invoke TestStep |
| c_EPTF_MBT_stepIdx_invokeTestStep | constant for the step name of invoke TestStep |
| c_EPTF_MBT_stepIdx_sendUserResponse | constant for the step index of send user response |
| c_EPTF_MBT_stepName_sendUserResponse | constant for the step name of send user response |
| c_EPTF_MBT_stepIdx_invokeUserFunction | constant for the step index of invoke user function |
| c_EPTF_MBT_stepName_invokeUserFunction | constant for the step name of invoke user function |
| EPTF_MBT_LGen_CT | MBT application library component type |
| EPTF_MBT_Tester_CT | MBT tester component type |
| EPTF_MBT_PortType | Messages based port to connect the Tester comopnent to the loadGen component. |
| EPTF_MBT_TestStepRequest | Describes the TestStep request |
| EPTF_MBT_UserRequest | Describes the User Request request |
| EPTF_MBT_UserResponse | Describes the UserResponse |
| EPTF_MBT_CreateFSMRequest | Describes the Create FSM request |
| EPTF_MBT_CreateFSMResponse | Describes the Create FSM response |
| EPTF_MBT_RemoveFSMRequest | Describes the Remove FSM request |
| EPTF_MBT_CreateFSMResponse | Describes the Remove FSM response |
| FsmAddr | Describes the FSM address |
| EPTF_MBT_TestStepResponse | Describes the TestStep Response] |
| EPTF_MBT_EventDispatchRequest | Describes the Event Dispatch Request |
| EPTF_MBT_ConfigRequest | Describes the ConfigRequest |
| EPTF_MBT_ConfigResponse | Describes the ConfigResponse |
| EPTF_MBT_CommandRequest | Describes the Command Request |
| EPTF_MBT_CommandResponse | Describes the Command Response |
| QuitCommand | Describes the Command Response |
| ReadyResponse | Describes the Ready Response |
| QuitAckResponse | Describes the Ready Response |
| fcb_EPTF_MBT_entityGroupCreated | Describes the function signature for entity Group created callback function |
| fcb_EPTF_MBT_customUserFunction | Describes the function signature for custom user function |
type component EPTF_MBT_LGen_CT extends EPTF_LGenBase_CT, EPTF_Scheduler_CT, EPTF_Logging_CT, EPTF_Semaphore_CT
MBT application library component type
EPTF_LGenBase_CT
EPTF_Scheduler_CT
EPTF_Logging_CT
| v_EPTF_MBT_initialized | boolean - component initialization state |
| v_EPTF_MBT_myName | charstring - component’s self name |
| vf_EPTF_MBT_entityGroupCreated | fcb_EPTF_MBT_entityGroupCreated - Entity Group created callback function |
| vf_EPTF_MBT_createUserResponse | fcb_EPTF_MBT_customUserFunction - Custom User function |
| v_EPTF_MBT_myBIdx | integer - self behavior index |
| v_EPTF_MBT_LoggingMaskId | integer - logging mask id |
-
EPTF_MBT_PCO EPTF_MBT_PortType
-
type component EPTF_MBT_Tester_CT extends EPTF_Base_CT, EPTF_Semaphore_CT
MBT tester component type
EPTF_LGenBase_CT
EPTF_Scheduler_CT
EPTF_Logging_CT
-
-
EPTF_MBT_PCO EPTF_MBT_PortType
-
type port EPTF_MBT_PortType message
Messages based port to connect the Tester comopnent to the loadGen component.
inout EPTF_MBT_TestStepRequest, EPTF_MBT_TestStepResponse; inout EPTF_MBT_ConfigRequest, EPTF_MBT_ConfigResponse; inout EPTF_MBT_CommandRequest, EPTF_MBT_CommandResponse; inout EPTF_MBT_UserRequest, EPTF_MBT_UserResponse; inout EPTF_MBT_CreateFSMRequest, EPTF_MBT_CreateFSMResponse; inout EPTF_MBT_RemoveFSMRequest, EPTF_MBT_RemoveFSMResponse;
-
type record EPTF_MBT_TestStepRequest
Describes the TestStep request
| stepname | charstring - Name of the requested TestStep |
| stepArgs | <EPTF_IntegerList> - Container for the TestStep arguments |
| addr | FsmAddr - Address of the FSM |
| lock | integer - After the test step was executed the semaphor with this id will be unlocked by the applib. |
-
type record EPTF_MBT_UserRequest
Describes the User Request request
| functionName | charstring - Name of the requested function |
| functionArgs | <EPTF_IntegerList> - Container for the function arguments |
| addr | FsmAddr - Address of the FSM |
-
type record EPTF_MBT_CreateFSMResponse
Describes the Create FSM response
| result | integer - The result (-1 in case of error) |
| addr | FsmAddr - The address of the activated FSM |
type record EPTF_MBT_RemoveFSMRequest
Describes the Remove FSM request
| addr | FsmAddr - The address of the FSM to be removed |
type record EPTF_MBT_TestStepResponse
Describes the TestStep Response]
| bName | charstring - Name of the behavior |
| iName | charstring - Name of the Event |
| addr | FsmAddr - Address of the FSM, where the event was reported. |
-
type record EPTF_MBT_EventDispatchRequest
Describes the Event Dispatch Request
| bName | charstring - Name of the behavior |
| iName | integer - Index of the Event |
| addr | FsmAddr - Address of the FSM, where the event was reported. |
-
type record EPTF_MBT_ConfigRequest
Describes the ConfigRequest
| entityGroupName | charstring - Name of the behavior |
| noEntities | integer - Number of entities within the group |
| behaviors | <EPTF_CharstringList> - List of behavior that should be allocate to the group |
| fsmName | charstring - Name of the FSM to be assignedto teh entity group |
-
type union EPTF_MBT_CommandResponse
Describes the Command Response
-
type function fcb_EPTF_MBT_entityGroupCreated( in EPTF_MBT_ConfigRequest p_req ) runs on self
Describes the function signature for entity Group created callback function
| p_req | EPTF_MBT_ConfigRequest - describes the requetsed configuration |
-
type function fcb_EPTF_MBT_customUserFunction ( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on self return boolean
Describes the function signature for custom user function
| pl_ptr | <EPTF_LGenBase_TestStepArgs> - describes the requetsed configuration |
-
constant for the behavior name
const charstring c_EPTF_MBT_myBName:="MBT_behavior"
constant for the input index of incomming user request
const integer c_EPTF_MBT_inputIdx_incomingUserRequest := 0
constant for the input index of incomming TesStep request
const integer c_EPTF_MBT_inputIdx_incomingTestStepRequest := 1
constant for the input name of TEstStep Request
const charstring c_EPTF_MBT_inputName_incomingTestStepRequest := "EPTF_MBT_inputName_incomingTestStepRequest"
constant for the step index of invoke TestStep
const integer c_EPTF_MBT_stepIdx_invokeTestStep:=0
constant for the step index of send user response
const integer c_EPTF_MBT_stepIdx_sendUserResponse:=2
constant for the step name of send user response
const charstring c_EPTF_MBT_stepName_sendUserResponse :="EPTF_MBT_stepName_sendUserResponse"
constant for the step index of invoke user function
const integer c_EPTF_MBT_stepIdx_invokeUserFunction:=1
constant for the step name of invoke user function
const charstring c_EPTF_MBT_stepName_invokeUserFunction :="EPTF_MBT_stepName_invokeUserFunction"
MBT application library component type
type component EPTF_MBT_LGen_CT extends EPTF_LGenBase_CT, EPTF_Scheduler_CT, EPTF_Logging_CT, EPTF_Semaphore_CT
MBT tester component type
type component EPTF_MBT_Tester_CT extends EPTF_Base_CT, EPTF_Semaphore_CT
Messages based port to connect the Tester comopnent to the loadGen component.
type port EPTF_MBT_PortType message
Describes the TestStep request
type record EPTF_MBT_TestStepRequest
Describes the User Request request
type record EPTF_MBT_UserRequest
Describes the UserResponse
type record EPTF_MBT_UserResponse {}
Describes the Create FSM request
type record EPTF_MBT_CreateFSMRequest
Describes the Create FSM response
type record EPTF_MBT_CreateFSMResponse
Describes the Remove FSM request
type record EPTF_MBT_RemoveFSMRequest
Describes the FSM address
type record FsmAddr
Describes the TestStep Response]
type record EPTF_MBT_TestStepResponse
Describes the Event Dispatch Request
type record EPTF_MBT_EventDispatchRequest
Describes the ConfigRequest
type record EPTF_MBT_ConfigRequest
Describes the ConfigResponse
type record EPTF_MBT_ConfigResponse {}
Describes the Command Request
type union EPTF_MBT_CommandRequest
Describes the Command Response
type union EPTF_MBT_CommandResponse
Describes the Command Response
type record QuitCommand {}
Describes the Ready Response
type record ReadyResponse {}
Describes the Ready Response
type record QuitAckResponse {}
Describes the function signature for entity Group created callback function
type function fcb_EPTF_MBT_entityGroupCreated( in EPTF_MBT_ConfigRequest p_req ) runs on self
Describes the function signature for custom user function
type function fcb_EPTF_MBT_customUserFunction ( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on self return boolean
This function inits the MBT FSM
function f_EPTF_MBT_initLGenFsm ( in fcb_EPTF_MBT_customUserFunction p_userFunc, in fcb_EPTF_MBT_entityGroupCreated p_entityGroupCreateFunc ) runs on EPTF_MBT_LGen_CT