This module contains the functions of the MQTT load generator component
| EPTF_MQTT_LGen_Functions | This module contains the functions of the MQTT load generator component |
| f_EPTF_MQTT_LGen_init | The main initialization function for the EPTF_MQTT_LGen_CT component type |
| f_EPTF_MQTT_LGen_initLogging | Initializing CLL’s logging feature on the EPTF_MQTT_LGen_CT component type |
| f_MQTT_cleanUp | The main clean up function for the EPTF_MQTT_LGen_CT component type |
| f_MQTT_eCtxBind | This function is called by the CLL for each entity instance created on a particular instace of EPTF_MQTT_LGen_CT |
| f_MQTT_eCtxUnbind | The reverse operation of f_MQTT_eCtxBind. |
| f_MQTT_eCtxReset | The resources reserved during f_MQTT_eCtxBind are reinitalized (reset). |
| f_EPTF_MQTT_declareEvents | Declares the FSM events to the CLL framework implemented by EPTF_MQTT_LGen_CT |
| f_EPTF_MQTT_declareSteps | Declares the FSM steps to the CLL framework implemented by EPTF_MQTT_LGen_CT |
| f_EPTF_MQTT_LGen_receiveMessage | The transport layer implementation EPTF_MQTT_Transport_Provider_CT can report received EPTF_MQTT_PDU message to the load generator layer EPTF_MQTT_Transport_User_CT extended by EPTF_MQTT_LGen_CT using this function. |
| f_EPTF_MQTT_LGen_receiveEvent | The transport layer implementation EPTF_MQTT_Transport_Provider_CT can report received <ASP_Event> events to the load generator layer EPTF_MQTT_Transport_User_CT extended by EPTF_MQTT_LGen_CT using this function. |
| f_EPTF_MQTT_LGen_transportApiResponse | The transport layer implementation EPTF_MQTT_Transport_Provider_CT can report received EPTF_MQTT_Transport_Response responses to the load generator layer EPTF_MQTT_Transport_User_CT extended by EPTF_MQTT_LGen_CT using this function. |
| f_EPTF_MQTT_LGen_send | This function is used to send out a message of a EPTF_MQTT_PDU using the registered function fcb_EPTF_MQTT_Transport_sendMessage of the underlying transport layer instance. |
| f_MQTT_step_init | Test Step to dynamically allocate and initialize the MQTT FSM context for the caller FSM. |
| f_MQTT_step_cleanUp | Test Step to free up the MQTT FSM context for the caller FSM. |
| f_MQTT_step_setLocalAddress | Test step to set the local address in the entity context. |
| f_MQTT_step_setLocalAddress_byVars | Test step to set the local address in the entity context. |
| f_MQTT_step_setRemoteAddress | Test step to set the remote address in the FSM context. |
| f_MQTT_step_setRemoteAddress_byVars | Test step to set the remote address in the FSM context. |
| f_MQTT_step_startListening | The test step expects that a transport endpoint is set in the addressDB as a local address. |
| f_MQTT_step_transportConnect | The test step expects that local and remote socket adresses are set in the addressDB. |
| f_MQTT_step_transportClose | The test step expects that a transport endpoint is set in the addressDB as a local address. |
| f_MQTT_step_loadTemplate_byIntIdx | Test step to load a MQTT_Template from tsp_EPTF_MQTT_LGen_templates into v_MQTT_msgToSend (which can be sent using the send test step) by its integer index in test step args. |
| f_MQTT_step_loadTemplate_byStringId | Test step to load a MQTT_Template from tsp_EPTF_MQTT_LGen_templates into v_MQTT_msgToSend (which can be sent using the send test step) by its string Id. |
| f_MQTT_step_setTopic_stringParam | Test step to set the string value referred by the test step argument as the topic of the first subscription entry in SUBSCRIBE and PUBLISH messages. |
| f_MQTT_step_setTopic_add_stringParam | Test step to add the string value referred by the test step argument to the topic of the first subscription entry in SUBSCRIBE and PUBLISH messages. |
| f_MQTT_step_setTopic_add_varParams | Test step to add the string value of variables referred by the test step argument to the topic of the first subscription entry in SUBSCRIBE and PUBLISH messages. |
| f_MQTT_step_setTopic_add_clientId | Test step to add client ID in the current session to the topic in the first subscription in SUBSCRIBE and to PUBLISH message. |
| f_MQTT_step_setQos_intParam | Test step to set the QoS level in SUBSCRIBE and PUBLISH messages using test step arguments |
| f_MQTT_step_setPublishMessage_stringParam | Test step to set the content of the payload in PUBLISH message. |
| f_MQTT_step_setPublishMessage_add_stringParam | Test step to concatenate a string to the content of the PUBLISH message |
| f_MQTT_step_setPublishMessage_add_varParams | Test step to add the content of a set of variables to the payload of a PUBLISH message. |
| f_MQTT_step_setPublishMessage_add_clientId | Test step to add client ID of the current session to the payload of a PUBLISH message. |
| f_MQTT_step_reportPingResponse | Test step to set the report ping response to enable/disable using using step arguments. |
| f_MQTT_step_reportPublishResponse | Test step to set the report publish response to enable/disable using step arguments |
| f_MQTT_step_send | Test step to send out an MQTT message from v_MQTT_msgToSend. |
| f_EPTF_MQTT_addressDB_init | Function to initialize the addressDB |
| f_EPTF_MQTT_addressDB_cleanUp | Function to clean up the address database and release its resources |
| f_EPTF_MQTT_addressDB_add | Add a socket address to the addressDB and return its index if no such entry yet, or return its index if already exists |
| f_EPTF_MQTT_addressDB_get | Get a socket address from the addressDB by its index |
| f_EPTF_MQTT_addressDB_lookUp | Get the index of a socket entry in addressDB |
| f_EPTF_MQTT_addressDB_Socket2String | Converts a socket address in <Socket> type format to the string format “<IP address>:<port number>” to be used as hash key |
| f_EPTF_MQTT_templateDB_init | Initializes the v_MQTT_templateDB MQTT_Template_DB database by adding the templates given in tsp_EPTF_MQTT_LGen_templates |
| f_EPTF_MQTT_templateDB_add | Adds a new element to the v_MQTT_templateDB MQTT_Template_DB database |
| f_EPTF_MQTT_templateDB_lookUp | Gets the index of an MQTT_Template element in v_MQTT_templateDB MQTT_Template_DB database |
| f_EPTF_MQTT_templateDB_get | Retrieves an element from the v_MQTT_templateDB MQTT_Template_DB database |
| f_EPTF_MQTT_templateDB_cleanUp | Cleans up the reserved resources of the v_MQTT_templateDB MQTT_Template_DB database |
| f_EPTF_MQTT_sessionDB_init | Initializes the v_MQTT_sessionDB MQTT_Session_DB database and adds its hash to v_MQTT_sessionDB.hashRef |
| f_EPTF_MQTT_sessionDB_cleanUp | Cleans up the reserved resources of the v_MQTT_sessionDB MQTT_Session_DB database |
| f_EPTF_MQTT_sessionDB_add | Adds a new element to the v_MQTT_sessionDB MQTT_Session_DB database |
| f_EPTF_MQTT_sessionDB_setKey | Sets the hash of the local socket address of a session by the session index |
| f_EPTF_MQTT_sessionDB_lookUp | Gets the index of a session in v_MQTT_sessionDB MQTT_Session_DB database by its socket address |
| f_EPTF_MQTT_sessionDB_get | Retrieves a session’s data from the v_MQTT_sessionDB MQTT_Session_DB database |
| f_EPTF_MQTT_sessionDB_check | Checks if a session element exists in the v_MQTT_sessionDB MQTT_Session_DB database |
| f_EPTF_MQTT_sessionDB_remove | Removes an element from the v_MQTT_sessionDB MQTT_Session_DB database and releases its resources |
| f_EPTF_MQTT_sessionDB_addrHash | Converts a socket address in <Socket> type format to the string format “<IP address>:<port number>” to be used as a hash key |
| f_EPTF_MQTT_publishDB_init | Initializes the v_MQTT_publishDB MQTT_Publish_DB database and creates its hashmap |
| f_EPTF_MQTT_publishDB_cleanUp | Cleans up the reserved resources of the v_MQTT_publishDB MQTT_Publish_DB database |
| f_EPTF_MQTT_publishDB_add | Adds a new element to the v_MQTT_publishDB MQTT_Publish_DB database |
| f_EPTF_MQTT_publishDB_lookUp | Gets the index of an MQTT_Publish element in v_MQTT_publishDB MQTT_Publish_DB database by its session and packet id-s |
| f_EPTF_MQTT_publishDB_get | Retrieves an element from the v_MQTT_publishDB MQTT_Publish_DB database |
| f_EPTF_MQTT_publishDB_check | Checks if an element exists in the v_MQTT_publishDB MQTT_Publish_DB database |
| f_EPTF_MQTT_publishDB_remove | Removes an element from the v_MQTT_publishDB MQTT_Publish_DB database |
| f_EPTF_MQTT_publishDB_packetIdHash | Converts a pair of session ID & packet ID to the string format “session_<sessionId>:id_<packetId>” to be used as a hash key |
| f_EPTF_MQTT_subscriptionDB_init | Initializes the v_MQTT_subscriptionDB MQTT_Subscription_DB database |
| f_EPTF_MQTT_subscriptionDB_cleanUp | Cleans up the reserved resources of the v_MQTT_subscriptionDB MQTT_Subscription_DB database |
| f_EPTF_MQTT_subscriptionDB_add | Adds a new element to the v_MQTT_subscriptionDB MQTT_Subscription_DB database |
| f_EPTF_MQTT_subscriptionDB_setKey_packetId | Insert an integer element to the subscription hashmap, key is composed from session ID and packet ID |
| f_EPTF_MQTT_subscriptionDB_removeKey_packetId | Removes the element from the subscription hashmap identified by its session ID and packet ID |
| f_EPTF_MQTT_subscriptionDB_lookUp_packetId | Gets the index of an MQTT_Subscription element in v_MQTT_subscriptionDB MQTT_Subscription_DB database by a session ID and packet ID |
| f_EPTF_MQTT_subscriptionDB_lookUp_topicName | Gets the index of an MQTT_Subscription element in v_MQTT_subscriptionDB MQTT_Subscription_DB database by a session ID and packet ID |
| f_EPTF_MQTT_subscriptionDB_get | Retrieves an element from the v_MQTT_subscriptionDB MQTT_Subscription_DB database |
| f_EPTF_MQTT_subscriptionDB_check | Checks if an element at an index exists the v_MQTT_subscriptionDB MQTT_Subscription_DB database |
| f_EPTF_MQTT_subscriptionDB_remove | Removes an element from the v_MQTT_subscriptionDB MQTT_Subscription_DB database |
| f_EPTF_MQTT_subscriptionDB_packetIdHash | Converts a pair of session ID & packet ID to the string format “session_<sessionId>:id_<packetId>” to be used as hash key |
| f_EPTF_MQTT_subscriptionDB_topicHash | Converts a pair of session ID & topic to the string format “session_<sessionId>:topic_<topic>” to be used as hash key |
| f_EPTF_MQTT_stack_fromApp | This is the main entry point for the MQTT stack realization of the EPTF_MQTT_LGen_CT component that handles messages received from the application layer (e.g. |
| f_EPTF_MQTT_stack_fromEnv | This is the main entry point for the MQTT stack realization of the EPTF_MQTT_LGen_CT component that handles messages received from the environment layer (e.g. |
| f_EPTF_MQTT_session_fromApp | This is the entry point for an MQTT session fsm handling events coming from the application layer (e.g. |
| f_EPTF_MQTT_session_fromEnv | This is the entry point for an MQTT session fsm from the environment layer (e.g. |
| f_EPTF_MQTT_session_keepalive | Handles the T_keepalive timer event in the MQTT_Session FSM |
| f_EPTF_MQTT_session_startT_keepalive | Starts the T_keepalive timer for an MQTT_Session FSM |
| f_EPTF_MQTT_session_cancelT_keepalive | Cancels the T_keepalive timer of an MQTT_Session FSM |
| f_EPTF_MQTT_session_getNextPacketId | Sets the value of the packet id field in the next message to be sent in a session |
| f_EPTF_MQTT_session_setState | Sets a new state for an MQTT_Session FSM |
| f_EPTF_MQTT_session_send | Sends a message to the transort layer with type EPTF_MQTT_PDU and the provided session index |
| f_EPTF_MQTT_session_registerSubscription | Adds a subscription index to an MQTT_Session |
| f_EPTF_MQTT_session_deregisterSubscription | Removes a subscription index from MQTT_Session |
| f_EPTF_MQTT_session_registerPublish | Adds a publish index to an MQTT_Session |
| f_EPTF_MQTT_session_deregisterPublish | Removes a publish index from an MQTT_Session |
| f_EPTF_MQTT_session_remove | Releases all resources related to an MQTT_Session and removes it from the MQTT_Session_DB |
| f_EPTF_MQTT_subscription_fromSession | Implements part of the MQTT_Subscription FSM that handles the events coming from the MQTT_Session |
| f_EPTF_MQTT_subscription_fromEnv | Implements part of the MQTT_Subscription FSM that handles the events coming from the environment |
| f_EPTF_MQTT_subscription_watchdog | Handles the T_watchdog event in the <MQTT_Subscribe> FSM |
| f_EPTF_MQTT_subscription_startT_watchdog | Start a T_watchdog timer in the MQTT_Subscription FSM |
| f_EPTF_MQTT_subscription_cancelT_watchdog | Cancels the T_watchdog timer of an MQTT_Subscription FSM |
| f_EPTF_MQTT_subscription_setState | Sets a new state of a MQTT_Subscription FSM |
| f_EPTF_MQTT_subscription_remove | Removing resources related to MQTT_Subscription FSM |
| f_EPTF_MQTT_publish_fromSession | Handles a publish transaction in case of QoS 1 and QoS 2 fsm requested by the application layer (e.g. |
| f_EPTF_MQTT_publish_fromEnv | Handles PUBLISH and publish response (PUB REC/PUB REL/PUB COMP) messages received from the peer (i.e. |
| f_EPTF_MQTT_publish_watchdog | Handles the T_watchdog event in the MQTT_Publish FSM |
| f_EPTF_MQTT_publish_startT_watchdog | Start a T_watchdog timer in the MQTT_Publish FSM |
| f_EPTF_MQTT_publish_cancelT_watchdog | Cancels the T_watchdog timer of an MQTT_Publish FSM |
| f_EPTF_MQTT_publish_setState | Sets the new state of a MQTT_Publish FSM |
| f_EPTF_MQTT_publish_remove | Releaseing resources of an MQTT_Publish FSM |
| f_EPTF_MQTT_setStepCtx | Sets the entity and FSM indexes in the MQTT step context |
| f_EPTF_MQTT_setCtx | Sets the instance pointers of MQTT_StepCtx to the related instances of a simulated device (entity) and FSM |
| f_EPTF_MQTT_isFsmInitialized | Checks if an FSM instance has already been initialized |
| f_EPTF_MQTT_getIntValue | Retreives an element of an <EPTF_IntegerList> if it exists |
| f_EPTF_MQTT_Logging_VERBOSE | Logging functions for the VERBOSE log level |
| f_EPTF_MQTT_Logging_DEBUG | Logging functions for the DEBUG log level |
| f_EPTF_MQTT_Logging_WARNING | Logging functions for the WARNING log level |
| f_EPTF_MQTT_Logging_ERROR | Logging functions for the ERROR log level |
| f_EPTF_MQTT_dispatchEvent | Dispatches events to an entity/fsm |
| f_EPTF_MQTT_qos_int2enum | Converts the integer value of QoS to its enumerated value |
| f_EPTF_MQTT_publishResponseType | Checks if an MQTT message is a response to a PUBLISH |
| f_EPTF_MQTT_publishResponsePacketId | Get the packet identifier of an MQTT message, if it is a response to a PUBLISH |
function f_EPTF_MQTT_LGen_init( in charstring pl_name ) runs on EPTF_MQTT_LGen_CT
The main initialization function for the EPTF_MQTT_LGen_CT component type
| pl_name | in charstring - the name for the component instance |
function f_EPTF_MQTT_LGen_initLogging() runs on EPTF_MQTT_LGen_CT
Initializing CLL’s logging feature on the EPTF_MQTT_LGen_CT component type
function f_MQTT_cleanUp() runs on EPTF_MQTT_LGen_CT
The main clean up function for the EPTF_MQTT_LGen_CT component type
function f_MQTT_eCtxBind( in integer pl_eIdx ) runs on EPTF_MQTT_LGen_CT return EPTF_IntegerList
This function is called by the CLL for each entity instance created on a particular instace of EPTF_MQTT_LGen_CT
| pl_eIdx | in integer - the index of the entity instance on this load generator component instance |
| <EPTF_IntegerList> | The list will contain the index of the entity the context belongs to |
function f_MQTT_eCtxUnbind( in integer pl_eIdx ) runs on EPTF_MQTT_LGen_CT
The reverse operation of f_MQTT_eCtxBind. Cleans up resources reserved during f_MQTT_eCtxBind. Called by the CLL.
| pl_eIdx | in integer - the index of the entity instance on this load generator component instance |
function f_MQTT_eCtxReset( in integer pl_eIdx ) runs on EPTF_MQTT_LGen_CT
The resources reserved during f_MQTT_eCtxBind are reinitalized (reset). Called by the CLL.
| pl_eIdx | in integer - the index of the entity instance on this load generator component instance |
function f_EPTF_MQTT_declareEvents() runs on EPTF_MQTT_LGen_CT
Declares the FSM events to the CLL framework implemented by EPTF_MQTT_LGen_CT
function f_EPTF_MQTT_declareSteps() runs on EPTF_MQTT_LGen_CT
Declares the FSM steps to the CLL framework implemented by EPTF_MQTT_LGen_CT
function f_EPTF_MQTT_LGen_receiveMessage( in EPTF_MQTT_PDU pl_message ) runs on EPTF_MQTT_LGen_CT
The transport layer implementation EPTF_MQTT_Transport_Provider_CT can report received EPTF_MQTT_PDU message to the load generator layer EPTF_MQTT_Transport_User_CT extended by EPTF_MQTT_LGen_CT using this function.
| pl_message | in EPTF_MQTT_PDU - received message |
function f_EPTF_MQTT_LGen_receiveEvent( in ASP_Event p_event ) runs on EPTF_MQTT_LGen_CT
The transport layer implementation EPTF_MQTT_Transport_Provider_CT can report received <ASP_Event> events to the load generator layer EPTF_MQTT_Transport_User_CT extended by EPTF_MQTT_LGen_CT using this function.
| pl_message | in <ASP_Event> - received event |
function f_EPTF_MQTT_LGen_transportApiResponse( in EPTF_MQTT_Transport_Response pl_rsp ) runs on EPTF_MQTT_LGen_CT
The transport layer implementation EPTF_MQTT_Transport_Provider_CT can report received EPTF_MQTT_Transport_Response responses to the load generator layer EPTF_MQTT_Transport_User_CT extended by EPTF_MQTT_LGen_CT using this function.
| pl_rsp | in EPTF_MQTT_Transport_Response - received transport api response |
function f_EPTF_MQTT_LGen_send( inout EPTF_MQTT_PDU p_msg ) runs on EPTF_MQTT_LGen_CT
This function is used to send out a message of a EPTF_MQTT_PDU using the registered function fcb_EPTF_MQTT_Transport_sendMessage of the underlying transport layer instance.
| p_msg | intout EPTF_MQTT_PDU - the message to be sent |
function f_MQTT_step_init( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test Step to dynamically allocate and initialize the MQTT FSM context for the caller FSM. Prerequisite to call any other MQTT test step.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args |
function f_MQTT_step_cleanUp( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test Step to free up the MQTT FSM context for the caller FSM. Frees up all allocated instances that were used by this FSM instance.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args |
function f_MQTT_step_setLocalAddress( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the local address in the entity context.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args |
| pl_ptr.refContext.fRefArgs[0] | integer - Index of the socket to use as local address |
function f_MQTT_step_setLocalAddress_byVars( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the local address in the entity context.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args (1st param: remoteHost: charstring, 2nd param: remotePort: integer) |
function f_MQTT_step_setRemoteAddress( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the remote address in the FSM context.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args |
| pl_ptr.refContext.fRefArgs[0] | integer - Index of the socket to use as local address |
function f_MQTT_step_setRemoteAddress_byVars( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the remote address in the FSM context.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args (1st param: remoteHost: charstring, 2nd param: remotePort: integer) |
function f_MQTT_step_startListening( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
The test step expects that a transport endpoint is set in the addressDB as a local address. The step will initiate allocating the local address associated with the current session in the MQTT context and call the callback function to start listening.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args |
function f_MQTT_step_transportConnect( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
The test step expects that local and remote socket adresses are set in the addressDB. The step will initiate allocating the local and remote addresses associated with the current session in the MQTT context and call the callback function to establish a connection.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args |
function f_MQTT_step_transportClose( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
The test step expects that a transport endpoint is set in the addressDB as a local address. The step will call the callback function to close the connection by the local address associated with the current session in the MQTT context.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args (1st param int: expectResponse (optional)) |
function f_MQTT_step_loadTemplate_byIntIdx( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to load a MQTT_Template from tsp_EPTF_MQTT_LGen_templates into v_MQTT_msgToSend (which can be sent using the send test step) by its integer index in test step args.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args |
function f_MQTT_step_loadTemplate_byStringId( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to load a MQTT_Template from tsp_EPTF_MQTT_LGen_templates into v_MQTT_msgToSend (which can be sent using the send test step) by its string Id.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args |
function f_MQTT_step_setTopic_stringParam( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the string value referred by the test step argument as the topic of the first subscription entry in SUBSCRIBE and PUBLISH messages.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args(1st param: topic name charstring) |
function f_MQTT_step_setTopic_add_stringParam( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to add the string value referred by the test step argument to the topic of the first subscription entry in SUBSCRIBE and PUBLISH messages.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args(1st param: topic name charstring) |
function f_MQTT_step_setTopic_add_varParams( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to add the string value of variables referred by the test step argument to the topic of the first subscription entry in SUBSCRIBE and PUBLISH messages.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args(params: variables) |
function f_MQTT_step_setTopic_add_clientId( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to add client ID in the current session to the topic in the first subscription in SUBSCRIBE and to PUBLISH message.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args(param: clientId) |
function f_MQTT_step_setQos_intParam( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the QoS level in SUBSCRIBE and PUBLISH messages using test step arguments
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args(1st param: qos level (0,1,2) integer) |
function f_MQTT_step_setPublishMessage_stringParam( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the content of the payload in PUBLISH message.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args(1st param: publish message charstring) |
function f_MQTT_step_setPublishMessage_add_stringParam( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to concatenate a string to the content of the PUBLISH message
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args(1st param: publish message charstring) |
function f_MQTT_step_setPublishMessage_add_varParams( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to add the content of a set of variables to the payload of a PUBLISH message.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args(params: variables) |
function f_MQTT_step_setPublishMessage_add_clientId( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to add client ID of the current session to the payload of a PUBLISH message.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args(param: clientId) |
function f_MQTT_step_reportPingResponse( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the report ping response to enable/disable using using step arguments.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args - 1:enable, 0:disable |
function f_MQTT_step_reportPublishResponse( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the report publish response to enable/disable using step arguments
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args(1st param: enable (1)/disable (0): integer) |
function f_MQTT_step_send( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to send out an MQTT message from v_MQTT_msgToSend. The message will be processed by the Applib’s MQTT stack The step expects the localAddress and the remoteAddress to be configured in addressDB.
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args |
function f_EPTF_MQTT_addressDB_add( in Socket p_addr, inout integer p_idx ) runs on EPTF_MQTT_LGen_CT
Add a socket address to the addressDB and return its index if no such entry yet, or return its index if already exists
| p_addr | in <Socket> - socket address |
| p_idx | inout integer - index of the address entry |
function f_EPTF_MQTT_addressDB_Socket2String( Socket p_sock ) return charstring
Converts a socket address in <Socket> type format to the string format “<IP address>:<port number>” to be used as hash key
| p_sock | inout <Socket> - socket address |
| *charstring* | Socket address in string format |
function f_EPTF_MQTT_templateDB_init() runs on EPTF_MQTT_LGen_CT
Initializes the v_MQTT_templateDB MQTT_Template_DB database by adding the templates given in tsp_EPTF_MQTT_LGen_templates
function f_EPTF_MQTT_templateDB_add( in MQTT_Template p_template ) runs on EPTF_MQTT_LGen_CT return integer
Adds a new element to the v_MQTT_templateDB MQTT_Template_DB database
| p_template | in MQTT_Template - the element to be added |
| *integer* | the index of the added element in the database |
function f_EPTF_MQTT_templateDB_lookUp( in charstring p_id ) runs on EPTF_MQTT_LGen_CT return integer
Gets the index of an MQTT_Template element in v_MQTT_templateDB MQTT_Template_DB database
| p_id | in charstring - the id of the MQTT_Template |
| *integer* | the index of the searched template in the database, or -1 if not found |
function f_EPTF_MQTT_templateDB_get( in integer p_idx, inout MQTT_v3_1_1_ReqResp p_pdu ) runs on EPTF_MQTT_LGen_CT
Retrieves an element from the v_MQTT_templateDB MQTT_Template_DB database
| p_idx | in integer - the index of the element to be retrieved |
| p_pdu | inout <MQTT_v3_1_1_ReqResp> - the retrieved element |
function f_EPTF_MQTT_templateDB_cleanUp() runs on EPTF_MQTT_LGen_CT
Cleans up the reserved resources of the v_MQTT_templateDB MQTT_Template_DB database
function f_EPTF_MQTT_sessionDB_init() runs on EPTF_MQTT_LGen_CT
Initializes the v_MQTT_sessionDB MQTT_Session_DB database and adds its hash to v_MQTT_sessionDB.hashRef
function f_EPTF_MQTT_sessionDB_cleanUp() runs on EPTF_MQTT_LGen_CT
Cleans up the reserved resources of the v_MQTT_sessionDB MQTT_Session_DB database
function f_EPTF_MQTT_sessionDB_add( in MQTT_Session p_session ) runs on EPTF_MQTT_LGen_CT return integer
Adds a new element to the v_MQTT_sessionDB MQTT_Session_DB database
| p_session | in MQTT_Session - the element to be added |
| *integer* | the index of the added element in the database |
function f_EPTF_MQTT_sessionDB_lookUp( in Socket p_sock ) runs on EPTF_MQTT_LGen_CT return integer
Gets the index of a session in v_MQTT_sessionDB MQTT_Session_DB database by its socket address
| p_sock | in <Socket> - the socket address to look up |
| *integer* | the index of the added element in the database, or -1 if not found |
function f_EPTF_MQTT_sessionDB_get( in integer p_idx, inout MQTT_Session p_session ) runs on EPTF_MQTT_LGen_CT return boolean
Retrieves a session’s data from the v_MQTT_sessionDB MQTT_Session_DB database
| p_idx | in integer - the index of the element to be retrieved |
| p_session | inout MQTT_Session - the retrieved session context |
| *boolean* | true if OK, false if no session element with this index |
function f_EPTF_MQTT_sessionDB_check( in integer p_idx ) runs on EPTF_MQTT_LGen_CT return boolean
Checks if a session element exists in the v_MQTT_sessionDB MQTT_Session_DB database
| p_idx | in integer - the index of the element to be checked |
| boolean | true if the session exists |
function f_EPTF_MQTT_sessionDB_remove( in integer p_idx ) runs on EPTF_MQTT_LGen_CT
Removes an element from the v_MQTT_sessionDB MQTT_Session_DB database and releases its resources
| p_idx | in integer - the index of the element to be removed |
function f_EPTF_MQTT_sessionDB_addrHash( in Socket p_sock ) return charstring
Converts a socket address in <Socket> type format to the string format “<IP address>:<port number>” to be used as a hash key
| p_sock | in <Socket> - socket address |
| charstring | socket address in string format |
function f_EPTF_MQTT_publishDB_init() runs on EPTF_MQTT_LGen_CT
Initializes the v_MQTT_publishDB MQTT_Publish_DB database and creates its hashmap
function f_EPTF_MQTT_publishDB_cleanUp() runs on EPTF_MQTT_LGen_CT
Cleans up the reserved resources of the v_MQTT_publishDB MQTT_Publish_DB database
function f_EPTF_MQTT_publishDB_add( in MQTT_Publish p_pub ) runs on EPTF_MQTT_LGen_CT return integer
Adds a new element to the v_MQTT_publishDB MQTT_Publish_DB database
| p_pub | in MQTT_Publish - the element to be added |
| *integer* | the index of the added element in the database |
function f_EPTF_MQTT_publishDB_lookUp( in integer p_sessionIdx, in integer p_packetId ) runs on EPTF_MQTT_LGen_CT return integer
Gets the index of an MQTT_Publish element in v_MQTT_publishDB MQTT_Publish_DB database by its session and packet id-s
| p_sessionIdx | in integer - input session id |
| p_packetId | in integer - input packet id |
| *integer* | the index of the searched element in the database, or -1 if not found |
function f_EPTF_MQTT_publishDB_get( in integer p_idx, inout MQTT_Publish p_pub ) runs on EPTF_MQTT_LGen_CT return boolean
Retrieves an element from the v_MQTT_publishDB MQTT_Publish_DB database
| p_idx | in integer - the index of the element to be retrieved |
| p_pub | inout MQTT_Publish - the retrieved element |
| boolean | true: success, false: no element with the index p_idx |
function f_EPTF_MQTT_publishDB_check( in integer p_idx ) runs on EPTF_MQTT_LGen_CT return boolean
Checks if an element exists in the v_MQTT_publishDB MQTT_Publish_DB database
| p_idx | in integer - the index of the element to be checked |
| boolean | true: element present, false: element doesn’t exists |
function f_EPTF_MQTT_publishDB_remove( in integer p_idx ) runs on EPTF_MQTT_LGen_CT
Removes an element from the v_MQTT_publishDB MQTT_Publish_DB database
| p_idx | in integer - the index of the element to be Removed |
function f_EPTF_MQTT_publishDB_packetIdHash( in integer p_sessionIdx, in integer p_packetId ) return charstring
Converts a pair of session ID & packet ID to the string format “session_<sessionId>:id_<packetId>” to be used as a hash key
| p_sessionIdx | in integer - input session ID |
| p_packetId | in integer - input packet ID |
| charstring | converted IDs |
function f_EPTF_MQTT_subscriptionDB_init() runs on EPTF_MQTT_LGen_CT
Initializes the v_MQTT_subscriptionDB MQTT_Subscription_DB database
function f_EPTF_MQTT_subscriptionDB_cleanUp() runs on EPTF_MQTT_LGen_CT
Cleans up the reserved resources of the v_MQTT_subscriptionDB MQTT_Subscription_DB database
function f_EPTF_MQTT_subscriptionDB_add( in MQTT_Subscription p_sub ) runs on EPTF_MQTT_LGen_CT return integer
Adds a new element to the v_MQTT_subscriptionDB MQTT_Subscription_DB database
| p_sub | in MQTT_Subscription - the element to be added |
| *integer* | the index of the added element in the database |
function f_EPTF_MQTT_subscriptionDB_setKey_packetId( in integer p_idx, in integer p_sessionIdx, in integer p_packetId ) runs on EPTF_MQTT_LGen_CT
Insert an integer element to the subscription hashmap, key is composed from session ID and packet ID
| p_idx | in integer - data to be inserted |
| p_sessionIdx | in integer - input session ID, used in hashmap key |
| p_packetId | in integer - input packet ID, used in hashmap key |
function f_EPTF_MQTT_subscriptionDB_removeKey_packetId( in integer p_idx, in integer p_sessionIdx, in integer p_packetId ) runs on EPTF_MQTT_LGen_CT
Removes the element from the subscription hashmap identified by its session ID and packet ID
| p_idx | in integer - NOT USED |
| p_sessionIdx | in integer - input session ID, used in hashmap key |
| p_packetId | in integer - input packet ID, used in hashmap key |
function f_EPTF_MQTT_subscriptionDB_lookUp_packetId( in integer p_sessionIdx, in integer p_packetId ) runs on EPTF_MQTT_LGen_CT return integer
Gets the index of an MQTT_Subscription element in v_MQTT_subscriptionDB MQTT_Subscription_DB database by a session ID and packet ID
| p_sessionIdx | in integer - input session ID, used in hashmap key |
| p_packetId | in integer - input packet ID, used in hashmap key |
| *integer* | the index of the searched element in the database, or -1 if not found |
function f_EPTF_MQTT_subscriptionDB_lookUp_topicName( in integer p_sessionIdx, in charstring p_topicName ) runs on EPTF_MQTT_LGen_CT return integer
Gets the index of an MQTT_Subscription element in v_MQTT_subscriptionDB MQTT_Subscription_DB database by a session ID and packet ID
| p_sessionIdx | in integer - input session ID, used in hashmap key |
| p_topicName | in charstring - input topic, used in hashmap key |
| *integer* | the index of the searched element in the database, or -1 if not found |
function f_EPTF_MQTT_subscriptionDB_get( in integer p_idx, inout MQTT_Subscription p_sub ) runs on EPTF_MQTT_LGen_CT return boolean
Retrieves an element from the v_MQTT_subscriptionDB MQTT_Subscription_DB database
| p_idx | in integer - the index of the element to be retrieved |
| p_sub | inout MQTT_Subscription - the retrieved element |
| *boolean* | true: success, false: element with this index doesn’t exist |
function f_EPTF_MQTT_subscriptionDB_check( in integer p_idx ) runs on EPTF_MQTT_LGen_CT return boolean
Checks if an element at an index exists the v_MQTT_subscriptionDB MQTT_Subscription_DB database
| p_idx | in integer - the index of the element to be checked |
| *boolean* | true: success, false: element at this index is not present |
function f_EPTF_MQTT_subscriptionDB_remove( in integer p_idx ) runs on EPTF_MQTT_LGen_CT
Removes an element from the v_MQTT_subscriptionDB MQTT_Subscription_DB database
| p_idx | in integer - the index of the element to be removed |
function f_EPTF_MQTT_subscriptionDB_packetIdHash( in integer p_sessionIdx, in integer p_packetId ) return charstring
Converts a pair of session ID & packet ID to the string format “session_<sessionId>:id_<packetId>” to be used as hash key
| p_sessionIdx | in integer - input session ID |
| p_packetId | in integer - input packet ID |
| charstring | converted IDs |
function f_EPTF_MQTT_subscriptionDB_topicHash( in integer p_sessionIdx, in charstring p_topic ) return charstring
Converts a pair of session ID & topic to the string format “session_<sessionId>:topic_<topic>” to be used as hash key
| p_sessionIdx | in integer - input session ID |
| p_topic | in charstring - input topic string |
| charstring | converted IDs |
function f_EPTF_MQTT_stack_fromApp( inout EPTF_MQTT_PDU p_msg, in MQTT_StepCtx p_ctx ) runs on EPTF_MQTT_LGen_CT
This is the main entry point for the MQTT stack realization of the EPTF_MQTT_LGen_CT component that handles messages received from the application layer (e.g. FSMs)
| p_msg | inout EPTF_MQTT_PDU - message that enters into the stack (will be modified by the stack) |
| p_ctx | in MQTT_StepCtx - pointers for the instances related to a particular simulated entity |
function f_EPTF_MQTT_stack_fromEnv( inout EPTF_MQTT_PDU p_msg ) runs on EPTF_MQTT_LGen_CT
This is the main entry point for the MQTT stack realization of the EPTF_MQTT_LGen_CT component that handles messages received from the environment layer (e.g. transport layer)
| p_msg | inout EPTF_MQTT_PDU - message that enters into the stack (will be modified by the stack) |
function f_EPTF_MQTT_session_fromApp( inout EPTF_MQTT_PDU p_msg, in integer p_sIdx ) runs on EPTF_MQTT_LGen_CT
This is the entry point for an MQTT session fsm handling events coming from the application layer (e.g. client/broker FSMs)
| p_msg | inout EPTF_MQTT_PDU - next transport message to be sent |
| p_sIdx | in integer - session index |

function f_EPTF_MQTT_session_fromEnv( inout EPTF_MQTT_PDU p_msg, in integer p_sIdx ) runs on EPTF_MQTT_LGen_CT
This is the entry point for an MQTT session fsm from the environment layer (e.g. transport layer)
| p_msg | inout EPTF_MQTT_PDU - transport message received |
| p_sIdx | in integer - session index |

function f_EPTF_MQTT_session_keepalive( in EPTF_ScheduledAction pl_action, in integer pl_eventIndex ) runs on EPTF_MQTT_LGen_CT return boolean
Handles the T_keepalive timer event in the MQTT_Session FSM
| pl_action | inout <EPTF_ScheduledAction> - the scheduled action <> |
| pl_eventIndex | in integer - eveny index in the scheduler |
| *boolean* | true <always> |
function f_EPTF_MQTT_session_startT_keepalive( in integer pl_sIdx, in float pl_time ) runs on EPTF_MQTT_LGen_CT return boolean
Starts the T_keepalive timer for an MQTT_Session FSM
| pl_sIdx | in integer - session index (?) |
| pl_time | in float - value of the keepalive timer |
| *boolean* | true: succesful , false: 0 or negative timer value |
function f_EPTF_MQTT_session_cancelT_keepalive( in integer pl_sessionIdx ) runs on EPTF_MQTT_LGen_CT
Cancels the T_keepalive timer of an MQTT_Session FSM
| pl_sessionIdx | in integer - session index |
function f_EPTF_MQTT_session_getNextPacketId( in MQTT_StepCtx p_ctx ) runs on EPTF_MQTT_LGen_CT return integer
Sets the value of the packet id field in the next message to be sent in a session
| p_ctx | in MQTT_StepCtx - Pointer of the context embedding the session id. |
| *integer* | packet id for the next message |
function f_EPTF_MQTT_session_setState( in integer p_sessionIdx, in MQTT_Session_State p_nextState ) runs on EPTF_MQTT_LGen_CT
Sets a new state for an MQTT_Session FSM
| p_sessionIdx | in integer - index of session |
| p_nextState | in MQTT_Session_State - new state of the state machine |
function f_EPTF_MQTT_session_send( in integer p_sessionIdx, inout EPTF_MQTT_PDU p_msg ) runs on EPTF_MQTT_LGen_CT
Sends a message to the transort layer with type EPTF_MQTT_PDU and the provided session index
| p_sessionIdx | in integer - session index |
| p_msg | intout EPTF_MQTT_PDU - the message to be sent |
function f_EPTF_MQTT_session_registerSubscription( in integer p_sessionIdx, in integer p_subIdx ) runs on EPTF_MQTT_LGen_CT
Adds a subscription index to an MQTT_Session
| p_sessionIdx | in integer - session index |
| p_subIdx | in integer - subscription index to add |
function f_EPTF_MQTT_session_deregisterSubscription( in integer p_sessionIdx, in integer p_subIdx ) runs on EPTF_MQTT_LGen_CT
Removes a subscription index from MQTT_Session
| p_sessionIdx | in integer - session index |
| p_subIdx | in integer - subscription index to remove |
function f_EPTF_MQTT_session_registerPublish( in integer p_sessionIdx, in integer p_pubIdx ) runs on EPTF_MQTT_LGen_CT
Adds a publish index to an MQTT_Session
| p_sessionIdx | in integer - session index |
| p_subIdx | in integer - publish index to add |
function f_EPTF_MQTT_session_deregisterPublish( in integer p_sessionIdx, in integer p_pubIdx ) runs on EPTF_MQTT_LGen_CT
Removes a publish index from an MQTT_Session
| p_sessionIdx | in integer - session index |
| p_subIdx | in integer - publish index to add |
function f_EPTF_MQTT_session_remove( in integer p_sessionIdx ) runs on EPTF_MQTT_LGen_CT
Releases all resources related to an MQTT_Session and removes it from the MQTT_Session_DB
| p_sessionIdx | in integer - session index |
function f_EPTF_MQTT_subscription_fromSession( inout EPTF_MQTT_PDU p_msg, in integer p_subIdx ) runs on EPTF_MQTT_LGen_CT
Implements part of the MQTT_Subscription FSM that handles the events coming from the MQTT_Session
| p_msg | inout EPTF_MQTT_PDU - message that |
| p_subIdx | in integer - subscription index |

function f_EPTF_MQTT_subscription_fromEnv( inout EPTF_MQTT_PDU p_msg, in integer p_subIdx ) runs on EPTF_MQTT_LGen_CT
Implements part of the MQTT_Subscription FSM that handles the events coming from the environment
| p_msg | inout EPTF_MQTT_PDU - received transport message |
| p_subIdx | in integer - subscription index |

function f_EPTF_MQTT_subscription_watchdog( in EPTF_ScheduledAction pl_action, in integer pl_eventIndex ) runs on EPTF_MQTT_LGen_CT return boolean
Handles the T_watchdog event in the <MQTT_Subscribe> FSM
| pl_action | in <EPTF_ScheduledAction> - scheduled action |
| pl_eventIndex | in integer - event index |
| *boolean* | true <always> |
<MQTT_Subscribe>
function f_EPTF_MQTT_subscription_startT_watchdog( in integer pl_sIdx, in float pl_time ) runs on EPTF_MQTT_LGen_CT return boolean
Start a T_watchdog timer in the MQTT_Subscription FSM
| pl_sIdx | in integer - subscription transaction index |
| pl_time | in float - time from now when the action takes place |
| *boolean* | true: action scheduled , false: 0 or negative timer value is passed |
function f_EPTF_MQTT_subscription_cancelT_watchdog( in integer pl_sIdx ) runs on EPTF_MQTT_LGen_CT
Cancels the T_watchdog timer of an MQTT_Subscription FSM
| pl_sIdx | in integer - index of the subscription FSM in subscriptionDB |
function f_EPTF_MQTT_subscription_setState( in integer p_subIdx, in MQTT_Subscription_State p_nextState ) runs on EPTF_MQTT_LGen_CT
Sets a new state of a MQTT_Subscription FSM
| p_subIdx | in integer - subscription index |
| p_nextState | in MQTT_Subscription_State - new state in the state machine |
function f_EPTF_MQTT_subscription_remove( in integer p_subIdx ) runs on EPTF_MQTT_LGen_CT
Removing resources related to MQTT_Subscription FSM
| p_subIdx | in integer - subscription index |
function f_EPTF_MQTT_publish_fromSession( inout EPTF_MQTT_PDU p_msg, in integer p_pubIdx ) runs on EPTF_MQTT_LGen_CT
Handles a publish transaction in case of QoS 1 and QoS 2 fsm requested by the application layer (e.g. client/broker FSMs)
| p_msg | inout EPTF_MQTT_PDU - transport message |
| p_pubIdx | in integer - publish index |


function f_EPTF_MQTT_publish_fromEnv( inout EPTF_MQTT_PDU p_msg, in integer p_pubIdx ) runs on EPTF_MQTT_LGen_CT
Handles PUBLISH and publish response (PUB REC/PUB REL/PUB COMP) messages received from the peer (i.e. from transport layer) based on its QoS and originator
| p_msg | inout EPTF_MQTT_PDU - received transport message |
| p_pubIdx | in integer - publish index |


function f_EPTF_MQTT_publish_watchdog( in EPTF_ScheduledAction pl_action, in integer pl_eventIndex ) runs on EPTF_MQTT_LGen_CT return boolean
Handles the T_watchdog event in the MQTT_Publish FSM
| pl_action | in <EPTF_ScheduledAction> - scheduled action |
| pl_eventIndex | in integer - event index |
| *boolean* | true <always> |
function f_EPTF_MQTT_publish_startT_watchdog( in integer pl_pIdx, in float pl_time ) runs on EPTF_MQTT_LGen_CT return boolean
Start a T_watchdog timer in the MQTT_Publish FSM
| pl_pIdx | in integer - publish transaction index |
| pl_time | in float - time from now when the action takes place |
| *boolean* | true: action scheduled , false: 0 or negative timer value is passed |
function f_EPTF_MQTT_publish_cancelT_watchdog( in integer pl_publishIdx ) runs on EPTF_MQTT_LGen_CT
Cancels the T_watchdog timer of an MQTT_Publish FSM
| pl_publishIdx | in integer - index of the publish FSM in publishDB |
function f_EPTF_MQTT_publish_setState( in integer p_pubIdx, in MQTT_Publish_State p_nextState ) runs on EPTF_MQTT_LGen_CT
Sets the new state of a MQTT_Publish FSM
| p_pubIdx | in integer - index of the publish FSM in publishDB |
| p_nextState | in MQTT_Publish_State - new state of the state machine |
function f_EPTF_MQTT_publish_remove( in integer p_pubIdx ) runs on EPTF_MQTT_LGen_CT
Releaseing resources of an MQTT_Publish FSM
| p_pubIdx | in integer - publish index |
function f_EPTF_MQTT_setStepCtx( in EPTF_LGenBase_TestStepArgs pl_ptr, inout MQTT_StepCtx p_ctx ) runs on EPTF_MQTT_LGen_CT return boolean
Sets the entity and FSM indexes in the MQTT step context
| pl_ptr | in <EPTF_LGenBase_TestStepArgs> - test step args |
| p_ctx | inout MQTT_StepCtx - returns MQTT step context |
| *boolean* | was the operation successful? |
function f_EPTF_MQTT_setCtx( in integer p_eIdx, in integer p_fsmIdx, inout MQTT_StepCtx p_ctx ) runs on EPTF_MQTT_LGen_CT return boolean
Sets the instance pointers of MQTT_StepCtx to the related instances of a simulated device (entity) and FSM
| p_eIdx | in integer - entity index |
| p_fsmIdx | in integer - FSM index |
| p_ctx | inout MQTT_StepCtx - returned context value |
function f_EPTF_MQTT_isFsmInitialized( in integer pl_eIdx, in integer pl_fsmIdx, inout integer pl_sessionIdx ) runs on EPTF_MQTT_LGen_CT return boolean
Checks if an FSM instance has already been initialized
| p_eIdx | in integer - entity index |
| p_fsmIdx | in integer - FSM index |
| pl_sessionIdx | inout integer - returns session index if initialized, -1 if not |
| boolean | true: initialized, false: not initialized |
function f_EPTF_MQTT_getIntValue( in EPTF_IntegerList pl_intList, in integer pl_number, inout integer pl_value ) return boolean
Retreives an element of an <EPTF_IntegerList> if it exists
| pl_intList | in <EPTF_IntegerList> - list of integers |
| pl_number | in integer - index of the integer to be retrieved |
| pl_value | inout integer - returns the value of the retrieved integer |
| *boolean* | true if the element exists in the integer list |
function f_EPTF_MQTT_dispatchEvent( in integer pl_eventIdx, in integer pl_eIdx, in integer pl_fsmCtx, in EPTF_IntegerList pl_reportedArgs ) runs on EPTF_MQTT_LGen_CT
Dispatches events to an entity/fsm
| pl_eventIdx | in integer - index of the event |
| pl_eIdx | in integer - the index of the entity |
| pl_fsmCtx | in integer - the index of FSM |
| pl_reportedArgs | in <EPTF_IntegerList> - additional arguments to be reported to the entity/FSM |
function f_EPTF_MQTT_publishResponseType( in MQTT_v3_1_1_ReqResp p_msg ) return boolean
Checks if an MQTT message is a response to a PUBLISH
| p_msg | in <MQTT_v3_1_1_ReqResp> - the MQTT message to be checked |
| *boolean* | true: message is a publish response type message |
function f_EPTF_MQTT_publishResponsePacketId( in MQTT_v3_1_1_ReqResp p_msg ) return integer
Get the packet identifier of an MQTT message, if it is a response to a PUBLISH
| p_msg | in <MQTT_v3_1_1_ReqResp> - the input MQTT message |
| *integer* | Packet identifier value if the message was of a PUBLISH response type, -1 in other cases |
The main initialization function for the EPTF_MQTT_LGen_CT component type
function f_EPTF_MQTT_LGen_init( in charstring pl_name ) runs on EPTF_MQTT_LGen_CT
MQTT load generator component
type component EPTF_MQTT_LGen_CT extends EPTF_MQTT_Transport_User_CT, EPTF_LGenBase_CT, EPTF_Logging_CT
Initializing CLL’s logging feature on the EPTF_MQTT_LGen_CT component type
function f_EPTF_MQTT_LGen_initLogging() runs on EPTF_MQTT_LGen_CT
The main clean up function for the EPTF_MQTT_LGen_CT component type
function f_MQTT_cleanUp() runs on EPTF_MQTT_LGen_CT
This function is called by the CLL for each entity instance created on a particular instace of EPTF_MQTT_LGen_CT
function f_MQTT_eCtxBind( in integer pl_eIdx ) runs on EPTF_MQTT_LGen_CT return EPTF_IntegerList
The reverse operation of f_MQTT_eCtxBind.
function f_MQTT_eCtxUnbind( in integer pl_eIdx ) runs on EPTF_MQTT_LGen_CT
The resources reserved during f_MQTT_eCtxBind are reinitalized (reset).
function f_MQTT_eCtxReset( in integer pl_eIdx ) runs on EPTF_MQTT_LGen_CT
Declares the FSM events to the CLL framework implemented by EPTF_MQTT_LGen_CT
function f_EPTF_MQTT_declareEvents() runs on EPTF_MQTT_LGen_CT
Declares the FSM steps to the CLL framework implemented by EPTF_MQTT_LGen_CT
function f_EPTF_MQTT_declareSteps() runs on EPTF_MQTT_LGen_CT
The transport layer implementation EPTF_MQTT_Transport_Provider_CT can report received EPTF_MQTT_PDU message to the load generator layer EPTF_MQTT_Transport_User_CT extended by EPTF_MQTT_LGen_CT using this function.
function f_EPTF_MQTT_LGen_receiveMessage( in EPTF_MQTT_PDU pl_message ) runs on EPTF_MQTT_LGen_CT
Base component type for a MQTT transport realization, declares variables to register the transport user functions
type component EPTF_MQTT_Transport_Provider_CT
Encapsulates a MQTT PDU with the corresponding entity (and FSM) indices and transport information
type record EPTF_MQTT_PDU
Base component type for a MQTT transport user realization
type component EPTF_MQTT_Transport_User_CT
The transport layer implementation EPTF_MQTT_Transport_Provider_CT can report received ASP_Event events to the load generator layer EPTF_MQTT_Transport_User_CT extended by EPTF_MQTT_LGen_CT using this function.
function f_EPTF_MQTT_LGen_receiveEvent( in ASP_Event p_event ) runs on EPTF_MQTT_LGen_CT
The transport layer implementation EPTF_MQTT_Transport_Provider_CT can report received EPTF_MQTT_Transport_Response responses to the load generator layer EPTF_MQTT_Transport_User_CT extended by EPTF_MQTT_LGen_CT using this function.
function f_EPTF_MQTT_LGen_transportApiResponse( in EPTF_MQTT_Transport_Response pl_rsp ) runs on EPTF_MQTT_LGen_CT
Type for transport response
type record EPTF_MQTT_Transport_Response
This function is used to send out a message of a EPTF_MQTT_PDU using the registered function fcb_EPTF_MQTT_Transport_sendMessage of the underlying transport layer instance.
function f_EPTF_MQTT_LGen_send( inout EPTF_MQTT_PDU p_msg ) runs on EPTF_MQTT_LGen_CT
Call-back function type for sending a EPTF_MQTT_PDU MQTT message
type function fcb_EPTF_MQTT_Transport_sendMessage( in EPTF_MQTT_PDU pl_msg ) runs on self
Test Step to dynamically allocate and initialize the MQTT FSM context for the caller FSM.
function f_MQTT_step_init( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test Step to free up the MQTT FSM context for the caller FSM.
function f_MQTT_step_cleanUp( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the local address in the entity context.
function f_MQTT_step_setLocalAddress( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the local address in the entity context.
function f_MQTT_step_setLocalAddress_byVars( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the remote address in the FSM context.
function f_MQTT_step_setRemoteAddress( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the remote address in the FSM context.
function f_MQTT_step_setRemoteAddress_byVars( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
The test step expects that a transport endpoint is set in the addressDB as a local address.
function f_MQTT_step_startListening( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
The test step expects that local and remote socket adresses are set in the addressDB.
function f_MQTT_step_transportConnect( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
The test step expects that a transport endpoint is set in the addressDB as a local address.
function f_MQTT_step_transportClose( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to load a MQTT_Template from tsp_EPTF_MQTT_LGen_templates into v_MQTT_msgToSend (which can be sent using the send test step) by its integer index in test step args.
function f_MQTT_step_loadTemplate_byIntIdx( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Grouping a MQTT_v3_1_1_ReqResp with an id
type record MQTT_Template
Test step to load a MQTT_Template from tsp_EPTF_MQTT_LGen_templates into v_MQTT_msgToSend (which can be sent using the send test step) by its string Id.
function f_MQTT_step_loadTemplate_byStringId( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the string value referred by the test step argument as the topic of the first subscription entry in SUBSCRIBE and PUBLISH messages.
function f_MQTT_step_setTopic_stringParam( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to add the string value referred by the test step argument to the topic of the first subscription entry in SUBSCRIBE and PUBLISH messages.
function f_MQTT_step_setTopic_add_stringParam( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to add the string value of variables referred by the test step argument to the topic of the first subscription entry in SUBSCRIBE and PUBLISH messages.
function f_MQTT_step_setTopic_add_varParams( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to add client ID in the current session to the topic in the first subscription in SUBSCRIBE and to PUBLISH message.
function f_MQTT_step_setTopic_add_clientId( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the QoS level in SUBSCRIBE and PUBLISH messages using test step arguments
function f_MQTT_step_setQos_intParam( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the content of the payload in PUBLISH message.
function f_MQTT_step_setPublishMessage_stringParam( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to concatenate a string to the content of the PUBLISH message
function f_MQTT_step_setPublishMessage_add_stringParam( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to add the content of a set of variables to the payload of a PUBLISH message.
function f_MQTT_step_setPublishMessage_add_varParams( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to add client ID of the current session to the payload of a PUBLISH message.
function f_MQTT_step_setPublishMessage_add_clientId( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the report ping response to enable/disable using using step arguments.
function f_MQTT_step_reportPingResponse( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to set the report publish response to enable/disable using step arguments
function f_MQTT_step_reportPublishResponse( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Test step to send out an MQTT message from v_MQTT_msgToSend.
function f_MQTT_step_send( in EPTF_LGenBase_TestStepArgs pl_ptr ) runs on EPTF_MQTT_LGen_CT
Function to initialize the addressDB
function f_EPTF_MQTT_addressDB_init() runs on EPTF_MQTT_LGen_CT
Function to clean up the address database and release its resources
function f_EPTF_MQTT_addressDB_cleanUp() runs on EPTF_MQTT_LGen_CT
Add a socket address to the addressDB and return its index if no such entry yet, or return its index if already exists
function f_EPTF_MQTT_addressDB_add( in Socket p_addr, inout integer p_idx ) runs on EPTF_MQTT_LGen_CT
Get a socket address from the addressDB by its index
function f_EPTF_MQTT_addressDB_get( inout Socket p_addr, in integer p_idx ) runs on EPTF_MQTT_LGen_CT
Get the index of a socket entry in addressDB
function f_EPTF_MQTT_addressDB_lookUp( in Socket p_sock ) runs on EPTF_MQTT_LGen_CT return integer
Converts a socket address in Socket type format to the string format “IP address:<port number>” to be used as hash key
function f_EPTF_MQTT_addressDB_Socket2String( Socket p_sock ) return charstring
Initializes the v_MQTT_templateDB MQTT_Template_DB database by adding the templates given in tsp_EPTF_MQTT_LGen_templates
function f_EPTF_MQTT_templateDB_init() runs on EPTF_MQTT_LGen_CT
Storing MQTT_Template instances
type record MQTT_Template_DB
Adds a new element to the v_MQTT_templateDB MQTT_Template_DB database
function f_EPTF_MQTT_templateDB_add( in MQTT_Template p_template ) runs on EPTF_MQTT_LGen_CT return integer
Gets the index of an MQTT_Template element in v_MQTT_templateDB MQTT_Template_DB database
function f_EPTF_MQTT_templateDB_lookUp( in charstring p_id ) runs on EPTF_MQTT_LGen_CT return integer
Retrieves an element from the v_MQTT_templateDB MQTT_Template_DB database
function f_EPTF_MQTT_templateDB_get( in integer p_idx, inout MQTT_v3_1_1_ReqResp p_pdu ) runs on EPTF_MQTT_LGen_CT
Cleans up the reserved resources of the v_MQTT_templateDB MQTT_Template_DB database
function f_EPTF_MQTT_templateDB_cleanUp() runs on EPTF_MQTT_LGen_CT
Initializes the v_MQTT_sessionDB MQTT_Session_DB database and adds its hash to v_MQTT_sessionDB.hashRef
function f_EPTF_MQTT_sessionDB_init() runs on EPTF_MQTT_LGen_CT
Storing MQTT_Session instances
type record MQTT_Session_DB
Cleans up the reserved resources of the v_MQTT_sessionDB MQTT_Session_DB database
function f_EPTF_MQTT_sessionDB_cleanUp() runs on EPTF_MQTT_LGen_CT
Adds a new element to the v_MQTT_sessionDB MQTT_Session_DB database
function f_EPTF_MQTT_sessionDB_add( in MQTT_Session p_session ) runs on EPTF_MQTT_LGen_CT return integer
Sets the hash of the local socket address of a session by the session index
function f_EPTF_MQTT_sessionDB_setKey( in integer p_idx ) runs on EPTF_MQTT_LGen_CT
Gets the index of a session in v_MQTT_sessionDB MQTT_Session_DB database by its socket address
function f_EPTF_MQTT_sessionDB_lookUp( in Socket p_sock ) runs on EPTF_MQTT_LGen_CT return integer
Retrieves a session’s data from the v_MQTT_sessionDB MQTT_Session_DB database
function f_EPTF_MQTT_sessionDB_get( in integer p_idx, inout MQTT_Session p_session ) runs on EPTF_MQTT_LGen_CT return boolean
Checks if a session element exists in the v_MQTT_sessionDB MQTT_Session_DB database
function f_EPTF_MQTT_sessionDB_check( in integer p_idx ) runs on EPTF_MQTT_LGen_CT return boolean
Removes an element from the v_MQTT_sessionDB MQTT_Session_DB database and releases its resources
function f_EPTF_MQTT_sessionDB_remove( in integer p_idx ) runs on EPTF_MQTT_LGen_CT
Converts a socket address in Socket type format to the string format “IP address:<port number>” to be used as a hash key
function f_EPTF_MQTT_sessionDB_addrHash( in Socket p_sock ) return charstring
Initializes the v_MQTT_publishDB MQTT_Publish_DB database and creates its hashmap
function f_EPTF_MQTT_publishDB_init() runs on EPTF_MQTT_LGen_CT
Storing MQTT_Publish instances
type record MQTT_Publish_DB
Cleans up the reserved resources of the v_MQTT_publishDB MQTT_Publish_DB database
function f_EPTF_MQTT_publishDB_cleanUp() runs on EPTF_MQTT_LGen_CT
Adds a new element to the v_MQTT_publishDB MQTT_Publish_DB database
function f_EPTF_MQTT_publishDB_add( in MQTT_Publish p_pub ) runs on EPTF_MQTT_LGen_CT return integer
Gets the index of an MQTT_Publish element in v_MQTT_publishDB MQTT_Publish_DB database by its session and packet id-s
function f_EPTF_MQTT_publishDB_lookUp( in integer p_sessionIdx, in integer p_packetId ) runs on EPTF_MQTT_LGen_CT return integer
Models an MQTT publish
type record MQTT_Publish
Retrieves an element from the v_MQTT_publishDB MQTT_Publish_DB database
function f_EPTF_MQTT_publishDB_get( in integer p_idx, inout MQTT_Publish p_pub ) runs on EPTF_MQTT_LGen_CT return boolean
Checks if an element exists in the v_MQTT_publishDB MQTT_Publish_DB database
function f_EPTF_MQTT_publishDB_check( in integer p_idx ) runs on EPTF_MQTT_LGen_CT return boolean
Removes an element from the v_MQTT_publishDB MQTT_Publish_DB database
function f_EPTF_MQTT_publishDB_remove( in integer p_idx ) runs on EPTF_MQTT_LGen_CT
Converts a pair of session ID & packet ID to the string format “session_sessionId:id_packetId” to be used as a hash key
function f_EPTF_MQTT_publishDB_packetIdHash( in integer p_sessionIdx, in integer p_packetId ) return charstring
Initializes the v_MQTT_subscriptionDB MQTT_Subscription_DB database
function f_EPTF_MQTT_subscriptionDB_init() runs on EPTF_MQTT_LGen_CT
Storing MQTT_Subscription instances
type record MQTT_Subscription_DB
Cleans up the reserved resources of the v_MQTT_subscriptionDB MQTT_Subscription_DB database
function f_EPTF_MQTT_subscriptionDB_cleanUp() runs on EPTF_MQTT_LGen_CT
Adds a new element to the v_MQTT_subscriptionDB MQTT_Subscription_DB database
function f_EPTF_MQTT_subscriptionDB_add( in MQTT_Subscription p_sub ) runs on EPTF_MQTT_LGen_CT return integer
Insert an integer element to the subscription hashmap, key is composed from session ID and packet ID
function f_EPTF_MQTT_subscriptionDB_setKey_packetId( in integer p_idx, in integer p_sessionIdx, in integer p_packetId ) runs on EPTF_MQTT_LGen_CT
Removes the element from the subscription hashmap identified by its session ID and packet ID
function f_EPTF_MQTT_subscriptionDB_removeKey_packetId( in integer p_idx, in integer p_sessionIdx, in integer p_packetId ) runs on EPTF_MQTT_LGen_CT
Gets the index of an MQTT_Subscription element in v_MQTT_subscriptionDB MQTT_Subscription_DB database by a session ID and packet ID
function f_EPTF_MQTT_subscriptionDB_lookUp_packetId( in integer p_sessionIdx, in integer p_packetId ) runs on EPTF_MQTT_LGen_CT return integer
Models an MQTT subscription
type record MQTT_Subscription
Gets the index of an MQTT_Subscription element in v_MQTT_subscriptionDB MQTT_Subscription_DB database by a session ID and packet ID
function f_EPTF_MQTT_subscriptionDB_lookUp_topicName( in integer p_sessionIdx, in charstring p_topicName ) runs on EPTF_MQTT_LGen_CT return integer
Retrieves an element from the v_MQTT_subscriptionDB MQTT_Subscription_DB database
function f_EPTF_MQTT_subscriptionDB_get( in integer p_idx, inout MQTT_Subscription p_sub ) runs on EPTF_MQTT_LGen_CT return boolean
Checks if an element at an index exists the v_MQTT_subscriptionDB MQTT_Subscription_DB database
function f_EPTF_MQTT_subscriptionDB_check( in integer p_idx ) runs on EPTF_MQTT_LGen_CT return boolean
Removes an element from the v_MQTT_subscriptionDB MQTT_Subscription_DB database
function f_EPTF_MQTT_subscriptionDB_remove( in integer p_idx ) runs on EPTF_MQTT_LGen_CT
Converts a pair of session ID & packet ID to the string format “session_sessionId:id_packetId” to be used as hash key
function f_EPTF_MQTT_subscriptionDB_packetIdHash( in integer p_sessionIdx, in integer p_packetId ) return charstring
Converts a pair of session ID & topic to the string format “session_sessionId:topic_topic” to be used as hash key
function f_EPTF_MQTT_subscriptionDB_topicHash( in integer p_sessionIdx, in charstring p_topic ) return charstring
This is the main entry point for the MQTT stack realization of the EPTF_MQTT_LGen_CT component that handles messages received from the application layer (e.g.
function f_EPTF_MQTT_stack_fromApp( inout EPTF_MQTT_PDU p_msg, in MQTT_StepCtx p_ctx ) runs on EPTF_MQTT_LGen_CT
This is the main entry point for the MQTT stack realization of the EPTF_MQTT_LGen_CT component that handles messages received from the environment layer (e.g.
function f_EPTF_MQTT_stack_fromEnv( inout EPTF_MQTT_PDU p_msg ) runs on EPTF_MQTT_LGen_CT
This is the entry point for an MQTT session fsm handling events coming from the application layer (e.g.
function f_EPTF_MQTT_session_fromApp( inout EPTF_MQTT_PDU p_msg, in integer p_sIdx ) runs on EPTF_MQTT_LGen_CT
This is the entry point for an MQTT session fsm from the environment layer (e.g.
function f_EPTF_MQTT_session_fromEnv( inout EPTF_MQTT_PDU p_msg, in integer p_sIdx ) runs on EPTF_MQTT_LGen_CT
Handles the T_keepalive timer event in the MQTT_Session FSM
function f_EPTF_MQTT_session_keepalive( in EPTF_ScheduledAction pl_action, in integer pl_eventIndex ) runs on EPTF_MQTT_LGen_CT return boolean
Models and MQTT session
type record MQTT_Session
Starts the T_keepalive timer for an MQTT_Session FSM
function f_EPTF_MQTT_session_startT_keepalive( in integer pl_sIdx, in float pl_time ) runs on EPTF_MQTT_LGen_CT return boolean
Cancels the T_keepalive timer of an MQTT_Session FSM
function f_EPTF_MQTT_session_cancelT_keepalive( in integer pl_sessionIdx ) runs on EPTF_MQTT_LGen_CT
Sets the value of the packet id field in the next message to be sent in a session
function f_EPTF_MQTT_session_getNextPacketId( in MQTT_StepCtx p_ctx ) runs on EPTF_MQTT_LGen_CT return integer
Sets a new state for an MQTT_Session FSM
function f_EPTF_MQTT_session_setState( in integer p_sessionIdx, in MQTT_Session_State p_nextState ) runs on EPTF_MQTT_LGen_CT
Sends a message to the transort layer with type EPTF_MQTT_PDU and the provided session index
function f_EPTF_MQTT_session_send( in integer p_sessionIdx, inout EPTF_MQTT_PDU p_msg ) runs on EPTF_MQTT_LGen_CT
Adds a subscription index to an MQTT_Session
function f_EPTF_MQTT_session_registerSubscription( in integer p_sessionIdx, in integer p_subIdx ) runs on EPTF_MQTT_LGen_CT
Removes a subscription index from MQTT_Session
function f_EPTF_MQTT_session_deregisterSubscription( in integer p_sessionIdx, in integer p_subIdx ) runs on EPTF_MQTT_LGen_CT
Adds a publish index to an MQTT_Session
function f_EPTF_MQTT_session_registerPublish( in integer p_sessionIdx, in integer p_pubIdx ) runs on EPTF_MQTT_LGen_CT
Removes a publish index from an MQTT_Session
function f_EPTF_MQTT_session_deregisterPublish( in integer p_sessionIdx, in integer p_pubIdx ) runs on EPTF_MQTT_LGen_CT
Releases all resources related to an MQTT_Session and removes it from the MQTT_Session_DB
function f_EPTF_MQTT_session_remove( in integer p_sessionIdx ) runs on EPTF_MQTT_LGen_CT
Implements part of the MQTT_Subscription FSM that handles the events coming from the MQTT_Session
function f_EPTF_MQTT_subscription_fromSession( inout EPTF_MQTT_PDU p_msg, in integer p_subIdx ) runs on EPTF_MQTT_LGen_CT
Implements part of the MQTT_Subscription FSM that handles the events coming from the environment
function f_EPTF_MQTT_subscription_fromEnv( inout EPTF_MQTT_PDU p_msg, in integer p_subIdx ) runs on EPTF_MQTT_LGen_CT
Handles the T_watchdog event in the MQTT_Subscribe FSM
function f_EPTF_MQTT_subscription_watchdog( in EPTF_ScheduledAction pl_action, in integer pl_eventIndex ) runs on EPTF_MQTT_LGen_CT return boolean
Start a T_watchdog timer in the MQTT_Subscription FSM
function f_EPTF_MQTT_subscription_startT_watchdog( in integer pl_sIdx, in float pl_time ) runs on EPTF_MQTT_LGen_CT return boolean
Cancels the T_watchdog timer of an MQTT_Subscription FSM
function f_EPTF_MQTT_subscription_cancelT_watchdog( in integer pl_sIdx ) runs on EPTF_MQTT_LGen_CT
Sets a new state of a MQTT_Subscription FSM
function f_EPTF_MQTT_subscription_setState( in integer p_subIdx, in MQTT_Subscription_State p_nextState ) runs on EPTF_MQTT_LGen_CT
Removing resources related to MQTT_Subscription FSM
function f_EPTF_MQTT_subscription_remove( in integer p_subIdx ) runs on EPTF_MQTT_LGen_CT
Handles a publish transaction in case of QoS 1 and QoS 2 fsm requested by the application layer (e.g.
function f_EPTF_MQTT_publish_fromSession( inout EPTF_MQTT_PDU p_msg, in integer p_pubIdx ) runs on EPTF_MQTT_LGen_CT
Handles PUBLISH and publish response (PUB REC/PUB REL/PUB COMP) messages received from the peer (i.e.
function f_EPTF_MQTT_publish_fromEnv( inout EPTF_MQTT_PDU p_msg, in integer p_pubIdx ) runs on EPTF_MQTT_LGen_CT
Handles the T_watchdog event in the MQTT_Publish FSM
function f_EPTF_MQTT_publish_watchdog( in EPTF_ScheduledAction pl_action, in integer pl_eventIndex ) runs on EPTF_MQTT_LGen_CT return boolean
Start a T_watchdog timer in the MQTT_Publish FSM
function f_EPTF_MQTT_publish_startT_watchdog( in integer pl_pIdx, in float pl_time ) runs on EPTF_MQTT_LGen_CT return boolean
Cancels the T_watchdog timer of an MQTT_Publish FSM
function f_EPTF_MQTT_publish_cancelT_watchdog( in integer pl_publishIdx ) runs on EPTF_MQTT_LGen_CT
Sets the new state of a MQTT_Publish FSM
function f_EPTF_MQTT_publish_setState( in integer p_pubIdx, in MQTT_Publish_State p_nextState ) runs on EPTF_MQTT_LGen_CT
Releaseing resources of an MQTT_Publish FSM
function f_EPTF_MQTT_publish_remove( in integer p_pubIdx ) runs on EPTF_MQTT_LGen_CT
Sets the entity and FSM indexes in the MQTT step context
function f_EPTF_MQTT_setStepCtx( in EPTF_LGenBase_TestStepArgs pl_ptr, inout MQTT_StepCtx p_ctx ) runs on EPTF_MQTT_LGen_CT return boolean
Sets the instance pointers of MQTT_StepCtx to the related instances of a simulated device (entity) and FSM
function f_EPTF_MQTT_setCtx( in integer p_eIdx, in integer p_fsmIdx, inout MQTT_StepCtx p_ctx ) runs on EPTF_MQTT_LGen_CT return boolean
Type that stores the most important pointers
type record MQTT_StepCtx
Checks if an FSM instance has already been initialized
function f_EPTF_MQTT_isFsmInitialized( in integer pl_eIdx, in integer pl_fsmIdx, inout integer pl_sessionIdx ) runs on EPTF_MQTT_LGen_CT return boolean
Retreives an element of an EPTF_IntegerList if it exists
function f_EPTF_MQTT_getIntValue( in EPTF_IntegerList pl_intList, in integer pl_number, inout integer pl_value ) return boolean
Logging functions for the VERBOSE log level
function f_EPTF_MQTT_Logging_VERBOSE( in @lazy charstring pl_message ) runs on EPTF_MQTT_LGen_CT
Logging functions for the DEBUG log level
function f_EPTF_MQTT_Logging_DEBUG( in @lazy charstring pl_message ) runs on EPTF_MQTT_LGen_CT
Logging functions for the WARNING log level
function f_EPTF_MQTT_Logging_WARNING( in @lazy charstring pl_message ) runs on EPTF_MQTT_LGen_CT
Logging functions for the ERROR log level
function f_EPTF_MQTT_Logging_ERROR( in @lazy charstring pl_message ) runs on EPTF_MQTT_LGen_CT
Dispatches events to an entity/fsm
function f_EPTF_MQTT_dispatchEvent( in integer pl_eventIdx, in integer pl_eIdx, in integer pl_fsmCtx, in EPTF_IntegerList pl_reportedArgs ) runs on EPTF_MQTT_LGen_CT
Converts the integer value of QoS to its enumerated value
function f_EPTF_MQTT_qos_int2enum( in integer p_qos ) return QoS
Checks if an MQTT message is a response to a PUBLISH
function f_EPTF_MQTT_publishResponseType( in MQTT_v3_1_1_ReqResp p_msg ) return boolean
Get the packet identifier of an MQTT message, if it is a response to a PUBLISH
function f_EPTF_MQTT_publishResponsePacketId( in MQTT_v3_1_1_ReqResp p_msg ) return integer
Call-back function type for reporting received EPTF_MQTT_PDU MQTT message
type function fcb_EPTF_MQTT_Transport_receiveMessage( in EPTF_MQTT_PDU pl_message ) runs on self
Call-back function type for reporting received ASP_Event MQTT event
type function fcb_EPTF_MQTT_Transport_receiveEvent( in ASP_Event p_event ) runs on self
Call-back function type for reporting a EPTF_MQTT_Transport_Response MQTT transport response
type function fcb_EPTF_MQTT_Transport_apiResponse( in EPTF_MQTT_Transport_Response pl_rsp ) runs on self
Integer constant for the MQTT init test step
const integer c_MQTT_stepIdx_init := 0
Charstring constant for the MQTT init test step
const charstring c_MQTT_stepName_init := "MQTT Applib: init"
Integer constant for the MQTT clean up test step
const integer c_MQTT_stepIdx_cleanUp := 1
Charstring constant for the MQTT clean up test step
const charstring c_MQTT_stepName_cleanUp := "MQTT Applib: cleanUp"
Integer constant for the MQTT set local address
const integer c_MQTT_stepIdx_setLocalAddress := 2
Integer constant for the MQTT set local address
const charstring c_MQTT_stepName_setLocalAddress := "MQTT Applib: setLocalAddress"
Integer constant for the MQTT set local address by variables test step
const integer c_MQTT_stepIdx_setLocalAddress_byVars := 3
Integer constant for the MQTT set local address by variables test step
const charstring c_MQTT_stepName_setLocalAddress_byVars := "MQTT Applib: setLocalAddress_byVars"
Integer constant for the MQTT set remote address
const integer c_MQTT_stepIdx_setRemoteAddress := 4
Integer constant for the MQTT set remote address
const charstring c_MQTT_stepName_setRemoteAddress := "MQTT Applib: setRemoteAddress"
Integer constant for the MQTT set remote address by variables test step
const integer c_MQTT_stepIdx_setRemoteAddress_byVars := 5
Integer constant for the MQTT set remote address by variables test step
const charstring c_MQTT_stepName_setRemoteAddress_byVars := "MQTT Applib: setRemoteAddress_byVars"
Integer constant for the MQTT start listening test step
const integer c_MQTT_stepIdx_startListening := 8
Charstring constant for the MQTT start listening test step
const charstring c_MQTT_stepName_startListening := "MQTT Applib: startListening"
Call-back function type for sending a EPTF_MQTT_Transport_Request MQTT transport request
type function fcb_EPTF_MQTT_Transport_apiRequest( in EPTF_MQTT_Transport_Request pl_req ) runs on self
Integer constant for the MQTT transport connect test step
const integer c_MQTT_stepIdx_transportConnect := 6
Charstring constant for the MQTT transport connect test step
const charstring c_MQTT_stepName_transportConnect := "MQTT Applib: transportConnect"
Integer constant for the MQTT transport succesful indication
const integer c_MQTT_eventIdx_transportSucc := 0
Integer constant for the MQTT transport fail indication
const integer c_MQTT_eventIdx_transportFail := 1
Integer constant for the MQTT transport close test step
const integer c_MQTT_stepIdx_transportClose := 7
Charstring constant for the MQTT transport close test step
const charstring c_MQTT_stepName_transportClose := "MQTT Applib: transportClose"
Integer constant for the MQTT load template by integer idx pointer test step
const integer c_MQTT_stepIdx_loadTemplate_byIntIdx := 9
Charstring constant for the MQTT load template by integer idx pointer test step
const charstring c_MQTT_stepName_loadTemplate_byIntIdx := "MQTT Applib: loadTemplate_byIntIdx"
Integer constant for the MQTT load template by string id test step
const integer c_MQTT_stepIdx_loadTemplate_byStringId := 10
Charstring constant for the MQTT load template by string id test step
const charstring c_MQTT_stepName_loadTemplate_byStringId := "MQTT Applib: loadTemplate_byStringId"
Integer constant for the MQTT set topic by string parameter test step
const integer c_MQTT_stepIdx_setTopic_stringParam := 12
Charstring constant for the MQTT set topic by string parameter test step
const charstring c_MQTT_stepName_setTopic_stringParam := "MQTT Applib: setTopic_stringParam"
Integer constant for the MQTT set topic by adding a string test step
const integer c_MQTT_stepIdx_setTopic_add_stringParam := 13
Charstring constant for the MQTT set topic by adding a string test step
const charstring c_MQTT_stepName_setTopic_add_stringParam := "MQTT Applib: setTopic_add_stringParam"
Integer constant for the MQTT set topic by adding variable parameters test step
const integer c_MQTT_stepIdx_setTopic_add_varParams := 14
Charstring constant for the MQTT set topic by adding variable parameters test step
const charstring c_MQTT_stepName_setTopic_add_varParams := "MQTT Applib: setTopic_add_varParams"
Integer constant for the MQTT set topic by adding the client id test step
const integer c_MQTT_stepIdx_setTopic_add_clientId := 15
Charstring constant for the MQTT set topic by adding the client id test step
const charstring c_MQTT_stepName_setTopic_add_clientId := "MQTT Applib: setTopic_add_clientId"
Integer constant for the MQTT set QoS using integer parameter test step
const integer c_MQTT_stepIdx_setQos_intParam := 16
Charstring constant for the MQTT set QoS using integer parameter test step
const charstring c_MQTT_stepName_setQos_intParam := "MQTT Applib: setQos_intParam"
Integer constant for the MQTT set publish message using a string parameter test step
const integer c_MQTT_stepIdx_setPublishMessage_stringParam := 17
Charstring constant for the MQTT set publish message using a string parameter test step
const charstring c_MQTT_stepName_setPublishMessage_stringParam := "MQTT Applib: setPublishMessage_stringParam"
Integer constant for the MQTT set publish by adding a string parameter test step
const integer c_MQTT_stepIdx_setPublishMessage_add_stringParam := 18
Charstring constant for the MQTT set publish by adding a string parameter test step
const charstring c_MQTT_stepName_setPublishMessage_add_stringParam := "MQTT Applib: setPublishMessage_add_stringParam"
Integer constant for the MQTT set publish by adding variable parameters test step
const integer c_MQTT_stepIdx_setPublishMessage_add_varParams := 19
Charstring constant for the MQTT set publish by adding variable parameters test step
const charstring c_MQTT_stepName_setPublishMessage_add_varParams := "MQTT Applib: setPublishMessage_add_varParams"
Integer constant for the MQTT set publish by adding the client id test step
const integer c_MQTT_stepIdx_setPublishMessage_add_clientId := 20
Charstring constant for the MQTT set publish by adding the client id test step
const charstring c_MQTT_stepName_setPublishMessage_add_clientId := "MQTT Applib: setPublishMessage_add_clientId"
Integer constant for the MQTT enabling/disabling the reporting of a ping response test step
const integer c_MQTT_stepIdx_reportPingResponse := 21
Charstring constant for the MQTT enabling/disabling the reporting of a ping response test step
const charstring c_MQTT_stepName_reportPingResponse := "MQTT Applib: reportPingResponse"
Integer constant for the MQTT enabling/disabling the reporting of a publish response test step
const integer c_MQTT_stepIdx_reportPublishResponse := 22
Charstring constant for the MQTT enabling/disabling the reporting of a publish response test step
const charstring c_MQTT_stepName_reportPublishResponse := "MQTT Applib: reportPublishResponse"
Integer constant for the MQTT send test step
const integer c_MQTT_stepIdx_send := 11
Charstring constant for the MQTT send test step
const charstring c_MQTT_stepName_send := "MQTT Applib: send"
Storing Socket instances
type record MQTT_Address_DB
State of an MQTT_Publish
type union MQTT_Publish_State