EPTF_MBT_LGen_Definitions

Purpose

Type definitions for the MBT Applib

Detailed comments

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.

Module paramters

  • tsp_EPTF_MBT_LGen_debug - boolean - Enable/disable verbose debugging
  • tsp_EPTG_MBT_execute_lockTimeout - float - Maximum waiting time for the f_EPTF_MBT_execute function when locking is used.

Module depends on

  • <EPTF_CLL_Base_Definitions>
  • <EPTF_CLL_Common_Definitions>
  • <EPTF_CLL_Scheduler_Definitions>
  • <EPTF_CLL_RBTScheduler_Definitions>
  • <EPTF_CLL_LGenBase_Definitions>
  • <EPTF_CLL_FBQ_Definitions>
  • <EPTF_CLL_Logging_Definitions>
Summary
EPTF_MBT_LGen_DefinitionsType definitions for the MBT Applib
c_EPTF_MBT_myBNameconstant for the behavior name
c_EPTF_MBT_inputIdx_incomingUserRequestconstant for the input index of incomming user request
c_EPTF_MBT_inputIdx_incomingUserRequestconstant for the input name of incomming request
c_EPTF_MBT_inputIdx_incomingTestStepRequestconstant for the input index of incomming TesStep request
c_EPTF_MBT_inputName_incomingTestStepRequestconstant for the input name of TEstStep Request
c_EPTF_MBT_stepIdx_invokeTestStepconstant for the step index of invoke TestStep
c_EPTF_MBT_stepIdx_invokeTestStepconstant for the step name of invoke TestStep
c_EPTF_MBT_stepIdx_sendUserResponseconstant for the step index of send user response
c_EPTF_MBT_stepName_sendUserResponseconstant for the step name of send user response
c_EPTF_MBT_stepIdx_invokeUserFunctionconstant for the step index of invoke user function
c_EPTF_MBT_stepName_invokeUserFunctionconstant for the step name of invoke user function
EPTF_MBT_LGen_CTMBT application library component type
EPTF_MBT_Tester_CTMBT tester component type
EPTF_MBT_PortTypeMessages based port to connect the Tester comopnent to the loadGen component.
EPTF_MBT_TestStepRequestDescribes the TestStep request
EPTF_MBT_UserRequestDescribes the User Request request
EPTF_MBT_UserResponseDescribes the UserResponse
EPTF_MBT_CreateFSMRequestDescribes the Create FSM request
EPTF_MBT_CreateFSMResponseDescribes the Create FSM response
EPTF_MBT_RemoveFSMRequestDescribes the Remove FSM request
EPTF_MBT_CreateFSMResponseDescribes the Remove FSM response
FsmAddrDescribes the FSM address
EPTF_MBT_TestStepResponseDescribes the TestStep Response]
EPTF_MBT_EventDispatchRequestDescribes the Event Dispatch Request
EPTF_MBT_ConfigRequestDescribes the ConfigRequest
EPTF_MBT_ConfigResponseDescribes the ConfigResponse
EPTF_MBT_CommandRequestDescribes the Command Request
EPTF_MBT_CommandResponseDescribes the Command Response
QuitCommandDescribes the Command Response
ReadyResponseDescribes the Ready Response
QuitAckResponseDescribes the Ready Response
fcb_EPTF_MBT_entityGroupCreatedDescribes the function signature for entity Group created callback function
fcb_EPTF_MBT_customUserFunctionDescribes the function signature for custom user function

c_EPTF_MBT_myBName

const charstring c_EPTF_MBT_myBName:="MBT_behavior"

Purpose

constant for the behavior name

c_EPTF_MBT_inputIdx_incomingUserRequest

const integer c_EPTF_MBT_inputIdx_incomingUserRequest := 0

Purpose

constant for the input index of incomming user request

c_EPTF_MBT_inputIdx_incomingUserRequest

Purpose

constant for the input name of incomming request

c_EPTF_MBT_inputIdx_incomingTestStepRequest

const integer c_EPTF_MBT_inputIdx_incomingTestStepRequest := 1

Purpose

constant for the input index of incomming TesStep request

c_EPTF_MBT_inputName_incomingTestStepRequest

const charstring c_EPTF_MBT_inputName_incomingTestStepRequest := "EPTF_MBT_inputName_incomingTestStepRequest"

Purpose

constant for the input name of TEstStep Request

c_EPTF_MBT_stepIdx_invokeTestStep

const integer c_EPTF_MBT_stepIdx_invokeTestStep:=0

Purpose

constant for the step index of invoke TestStep

c_EPTF_MBT_stepIdx_invokeTestStep

Purpose

constant for the step name of invoke TestStep

c_EPTF_MBT_stepIdx_sendUserResponse

const integer c_EPTF_MBT_stepIdx_sendUserResponse:=2

Purpose

constant for the step index of send user response

c_EPTF_MBT_stepName_sendUserResponse

const charstring c_EPTF_MBT_stepName_sendUserResponse :="EPTF_MBT_stepName_sendUserResponse"

Purpose

constant for the step name of send user response

c_EPTF_MBT_stepIdx_invokeUserFunction

const integer c_EPTF_MBT_stepIdx_invokeUserFunction:=1

Purpose

constant for the step index of invoke user function

c_EPTF_MBT_stepName_invokeUserFunction

const charstring c_EPTF_MBT_stepName_invokeUserFunction :="EPTF_MBT_stepName_invokeUserFunction"

Purpose

constant for the step name of invoke user function

EPTF_MBT_LGen_CT

type component EPTF_MBT_LGen_CT extends EPTF_LGenBase_CT, EPTF_Scheduler_CT, EPTF_Logging_CT, EPTF_Semaphore_CT

Purpose

MBT application library component type

Extensions

EPTF_LGenBase_CT

EPTF_Scheduler_CT

EPTF_Logging_CT

Variables

v_EPTF_MBT_initializedboolean - component initialization state
v_EPTF_MBT_myNamecharstring - component’s self name
vf_EPTF_MBT_entityGroupCreatedfcb_EPTF_MBT_entityGroupCreated - Entity Group created callback function
vf_EPTF_MBT_createUserResponsefcb_EPTF_MBT_customUserFunction - Custom User function
v_EPTF_MBT_myBIdxinteger - self behavior index
v_EPTF_MBT_LoggingMaskIdinteger - logging mask id

Timers

-

Ports

EPTF_MBT_PCO EPTF_MBT_PortType

Detailed Comments

-

EPTF_MBT_Tester_CT

type component EPTF_MBT_Tester_CT extends EPTF_Base_CT, EPTF_Semaphore_CT

Purpose

MBT tester component type

Extensions

EPTF_LGenBase_CT

EPTF_Scheduler_CT

EPTF_Logging_CT

Variables

-

Timers

-

Ports

EPTF_MBT_PCO EPTF_MBT_PortType

Detailed Comments

-

EPTF_MBT_PortType

type port EPTF_MBT_PortType message

Purpose

Messages based port to connect the Tester comopnent to the loadGen component.

Handled messages

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;

Detailed Comments

-

EPTF_MBT_TestStepRequest

type record EPTF_MBT_TestStepRequest

Purpose

Describes the TestStep request

Elements

stepnamecharstring - Name of the requested TestStep
stepArgs<EPTF_IntegerList> - Container for the TestStep arguments
addrFsmAddr - Address of the FSM
lockinteger - After the test step was executed the semaphor with this id will be unlocked by the applib.

Detailed Comments

-

EPTF_MBT_UserRequest

type record EPTF_MBT_UserRequest

Purpose

Describes the User Request request

Elements

functionNamecharstring - Name of the requested function
functionArgs<EPTF_IntegerList> - Container for the function arguments
addrFsmAddr - Address of the FSM

Detailed Comments

-

EPTF_MBT_UserResponse

type record EPTF_MBT_UserResponse {}

Purpose

Describes the UserResponse

Elements

-

Detailed Comments

-

EPTF_MBT_CreateFSMRequest

type record EPTF_MBT_CreateFSMRequest

Purpose

Describes the Create FSM request

Elements

entityGroupNamecharstring - Name of the target entity group
eIdxinteger - Index of the target entity
fsmNamecharstring - Name of the FSM to be activated

EPTF_MBT_CreateFSMResponse

type record EPTF_MBT_CreateFSMResponse

Purpose

Describes the Create FSM response

Elements

resultinteger - The result (-1 in case of error)
addrFsmAddr - The address of the activated FSM

EPTF_MBT_RemoveFSMRequest

type record EPTF_MBT_RemoveFSMRequest

Purpose

Describes the Remove FSM request

Elements

addrFsmAddr - The address of the FSM to be removed

EPTF_MBT_CreateFSMResponse

Purpose

Describes the Remove FSM response

Elements

resultinteger - The result (-1 in case of error)

FsmAddr

type record FsmAddr

Purpose

Describes the FSM address

Elements

entityGroupNamecharstring - Name of the entity group
eIdxinteger - entity index
fIdxinteger - fsm index

Detailed Comments

-

EPTF_MBT_TestStepResponse

type record EPTF_MBT_TestStepResponse

Purpose

Describes the TestStep Response]

Elements

bNamecharstring - Name of the behavior
iNamecharstring - Name of the Event
addrFsmAddr - Address of the FSM, where the event was reported.

Detailed Comments

-

EPTF_MBT_EventDispatchRequest

type record EPTF_MBT_EventDispatchRequest

Purpose

Describes the Event Dispatch Request

Elements

bNamecharstring - Name of the behavior
iNameinteger - Index of the Event
addrFsmAddr - Address of the FSM, where the event was reported.

Detailed Comments

-

EPTF_MBT_ConfigRequest

type record EPTF_MBT_ConfigRequest

Purpose

Describes the ConfigRequest

Elements

entityGroupNamecharstring - Name of the behavior
noEntitiesinteger - Number of entities within the group
behaviors<EPTF_CharstringList> - List of behavior that should be allocate to the group
fsmNamecharstring - Name of the FSM to be assignedto teh entity group

Detailed Comments

-

EPTF_MBT_ConfigResponse

type record EPTF_MBT_ConfigResponse {}

Purpose

Describes the ConfigResponse

Elements

-

Detailed Comments

-

EPTF_MBT_CommandRequest

type union EPTF_MBT_CommandRequest

Purpose

Describes the Command Request

Elements

quit comamnd that terminates the execution

Detailed Comments

-

EPTF_MBT_CommandResponse

type union EPTF_MBT_CommandResponse

Purpose

Describes the Command Response

Elements

Detailed Comments

-

QuitCommand

type record QuitCommand {}

Purpose

Describes the Command Response

Elements

-

Detailed Comments

-

ReadyResponse

type record ReadyResponse {}

Purpose

Describes the Ready Response

Elements

-

Detailed Comments

-

QuitAckResponse

type record QuitAckResponse {}

Purpose

Describes the Ready Response

Elements

-

Detailed Comments

-

fcb_EPTF_MBT_entityGroupCreated

type function fcb_EPTF_MBT_entityGroupCreated(
   in EPTF_MBT_ConfigRequest p_req
) runs on self

Purpose

Describes the function signature for entity Group created callback function

Elements

p_reqEPTF_MBT_ConfigRequest - describes the requetsed configuration

Detailed Comments

-

fcb_EPTF_MBT_customUserFunction

type function fcb_EPTF_MBT_customUserFunction (
   in EPTF_LGenBase_TestStepArgs pl_ptr
) runs on self return boolean

Purpose

Describes the function signature for custom user function

Elements

pl_ptr<EPTF_LGenBase_TestStepArgs> - describes the requetsed configuration

Detailed Comments

-

const charstring c_EPTF_MBT_myBName:="MBT_behavior"
constant for the behavior name
const integer c_EPTF_MBT_inputIdx_incomingUserRequest := 0
constant for the input index of incomming user request
const integer c_EPTF_MBT_inputIdx_incomingTestStepRequest := 1
constant for the input index of incomming TesStep request
const charstring c_EPTF_MBT_inputName_incomingTestStepRequest := "EPTF_MBT_inputName_incomingTestStepRequest"
constant for the input name of TEstStep Request
const integer c_EPTF_MBT_stepIdx_invokeTestStep:=0
constant for the step index of invoke TestStep
const integer c_EPTF_MBT_stepIdx_sendUserResponse:=2
constant for the step index of send user response
const charstring c_EPTF_MBT_stepName_sendUserResponse :="EPTF_MBT_stepName_sendUserResponse"
constant for the step name of send user response
const integer c_EPTF_MBT_stepIdx_invokeUserFunction:=1
constant for the step index of invoke user function
const charstring c_EPTF_MBT_stepName_invokeUserFunction :="EPTF_MBT_stepName_invokeUserFunction"
constant for the step name of invoke 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
type component EPTF_MBT_Tester_CT extends EPTF_Base_CT, EPTF_Semaphore_CT
MBT tester component type
type port EPTF_MBT_PortType message
Messages based port to connect the Tester comopnent to the loadGen component.
type record EPTF_MBT_TestStepRequest
Describes the TestStep request
type record EPTF_MBT_UserRequest
Describes the User Request request
type record EPTF_MBT_UserResponse {}
Describes the UserResponse
type record EPTF_MBT_CreateFSMRequest
Describes the Create FSM request
type record EPTF_MBT_CreateFSMResponse
Describes the Create FSM response
type record EPTF_MBT_RemoveFSMRequest
Describes the Remove FSM request
type record FsmAddr
Describes the FSM address
type record EPTF_MBT_TestStepResponse
Describes the TestStep Response]
type record EPTF_MBT_EventDispatchRequest
Describes the Event Dispatch Request
type record EPTF_MBT_ConfigRequest
Describes the ConfigRequest
type record EPTF_MBT_ConfigResponse {}
Describes the ConfigResponse
type union EPTF_MBT_CommandRequest
Describes the Command Request
type union EPTF_MBT_CommandResponse
Describes the Command Response
type record QuitCommand {}
Describes the Command Response
type record ReadyResponse {}
Describes the Ready Response
type record QuitAckResponse {}
Describes the Ready 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
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
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
This function inits the MBT FSM