blob: f452981a0955987c931b8c655986b47fa610e948 [file] [log] [blame]
///////////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2000-2021 Ericsson Telecom AB
//
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v2.0
// which accompanies this distribution, and is available at
// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html
///////////////////////////////////////////////////////////////////////////////
// File: EPTF_MQTT_LGen_Definitions.ttcn
// Description:
// Rev: R1B
// Prodnr: CNL 113 860
// Updated: 2021-02-03
// Contact: http://ttcn.ericsson.se
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
// Module: EPTF_MQTT_LGen_Definitions
//
// Purpose:
// This module contains the definitions for the MQTT load generator component
//
// Module depends on:
// - <EPTF_MQTT_Transport_Definitions>
// - <EPTF_CLL_LGenBase_Definitions>
// - <EPTF_CLL_Logging_Definitions>
// - <EPTF_CLL_FBQ_Definitions>
// - <EPTF_CLL_Common_Definitions>
// - <Socket_API_Definitions>
// - <MQTT_v3_1_1_Types>
//
// Module Parameters:
// tsp_EPTF_MQTT_LGen_debug - <tsp_EPTF_MQTT_LGen_debug> - *boolean* - Enabled/disable debug logging
// tsp_EPTF_MQTT_LGen_debugVerbose - <tsp_EPTF_MQTT_LGen_debugVerbose> - *boolean* - Enabled/disable verbosity of debug logging
// tsp_EPTF_MQTT_LGen_maxBindableCtx - <tsp_EPTF_MQTT_LGen_maxBindableCtx> - *integer* - Maximum number of context to bind(?)
// tsp_EPTF_MQTT_LGen_templates - <tsp_EPTF_MQTT_LGen_templates> - <MQTT_Template_List> - MQTT message template definitions for sending
// tsp_EPTF_MQTT_PUBLISH_responseWatchdog - <tsp_EPTF_MQTT_PUBLISH_responseWatchdog> - *float* - Watchdog timer value to wait responses to an MQTT PUBLISH message
// tsp_EPTF_MQTT_SUBSCRIBE_responseWatchdog - <tsp_EPTF_MQTT_SUBSCRIBE_responseWatchdog> - *float* - Watchdog timer value to wait responses to an MQTT SUBSCRIBE message
//
// Events:
// MQTT transport success - <c_MQTT_eventIdx_transportSucc>, <c_MQTT_eventName_transportSucc>
// MQTT transport fail - <c_MQTT_eventIdx_transportFail>, <c_MQTT_eventName_transportFail>
// MQTT transport established - <c_MQTT_eventIdx_transportEstablished>, <c_MQTT_eventName_established>
// MQTT transport closed - <c_MQTT_eventIdx_transportClosed>, <c_MQTT_eventName_transportClosed>
// CONNACK accepted - <c_MQTT_eventIdx_CONNACK_Accepted>, <c_MQTT_eventName_CONNACK_Accepted>
// CONNAK refused - <c_MQTT_eventIdx_CONNACK_Refused>, <c_MQTT_eventName_CONNACK_Refused>
// SUBACK accepted - <c_MQTT_eventIdx_SUBACK_Accepted>, <c_MQTT_eventName_SUBACK_Accepted>
// SUBACK refused <c_MQTT_eventIdx_SUBACK_Refused>, <c_MQTT_eventName_SUBACK_Refused>
// UNSUBACK - <c_MQTT_eventIdx_UNSUBACK>, <c_MQTT_eventName_UNSUBACK>
// PUBLISH - <c_MQTT_eventIdx_PUBLISH>, <c_MQTT_eventName_PUBLISH>
// PING request - <c_MQTT_eventIdx_PING_Request>, <c_MQTT_eventName_PING_Request>
// PING response - <c_MQTT_eventIdx_PING_Response>, <c_MQTT_eventName_PING_Response>
// PUBACK - <c_MQTT_eventIdx_PUBACK>, <c_MQTT_eventName_PUBACK>
// PUBREC - <c_MQTT_eventIdx_PUBREC>, <c_MQTT_eventName_PUBREC>
// PUBREL - <c_MQTT_eventIdx_PUBREL>, <c_MQTT_eventName_PUBREL>
// PUBCOMP - <c_MQTT_eventIdx_PUBCOMP>, <c_MQTT_eventName_PUBCOMP>
// PUBLISH timeout - <c_MQTT_eventIdx_PUBLISH_Timeout>, <c_MQTT_eventName_PUBLISH_Timeout>
// SUBSCRIBE timeout - <c_MQTT_eventIdx_SUBSCRIBE_Timeout>, <c_MQTT_eventName_SUBSCRIBE_Timeout>
//
// TestSteps:
// MQTT init - <f_MQTT_step_init>, <c_MQTT_stepIdx_init>, <c_MQTT_stepName_init>
// MQTT cleanUp - <f_MQTT_step_cleanUp>, <c_MQTT_stepIdx_init>, <c_MQTT_stepIdx_init>
// set local address - <f_MQTT_step_setLocalAddress_byVars>, <c_MQTT_stepIdx_setLocalAddress_byVars>, <c_MQTT_stepName_setLocalAddress_byVars>
// set remote address - <f_MQTT_step_setRemoteAddress_byVars>, <c_MQTT_stepIdx_setRemoteAddress_byVars>, <c_MQTT_stepName_setRemoteAddress_byVars>
// transport connect - <f_MQTT_step_transportConnect>, <c_MQTT_stepIdx_transportConnect>, <c_MQTT_stepName_transportConnect>
// transport close - <f_MQTT_step_transportClose>, <c_MQTT_stepIdx_transportClose>, <c_MQTT_stepName_transportClose>
// start listening - <f_MQTT_step_startListening>, <c_MQTT_stepIdx_startListening>, <c_MQTT_stepName_startListening>
// load MQTT template - <f_MQTT_step_loadTemplate_byIntIdx>, <c_MQTT_stepIdx_loadTemplate_byIntIdx>, <c_MQTT_stepName_loadTemplate_byIntIdx>
// <f_MQTT_step_loadTemplate_byStringId>, <c_MQTT_stepIdx_loadTemplate_byStringId>, <c_MQTT_stepName_loadTemplate_byStringId>
// send message - <f_MQTT_step_send>, <c_MQTT_stepIdx_send>, <c_MQTT_stepName_send>
// set topic - <f_MQTT_step_setTopic_stringParam>, <c_MQTT_stepIdx_setTopic_stringParam>, <c_MQTT_stepName_setTopic_stringParam>
// <f_MQTT_step_setTopic_add_stringParam>, <c_MQTT_stepIdx_setTopic_add_stringParam>, <c_MQTT_stepName_setTopic_add_stringParam>
// <f_MQTT_step_setTopic_add_varParams>, <c_MQTT_stepIdx_setTopic_add_varParams>, <c_MQTT_stepName_setTopic_add_varParams>
// <f_MQTT_step_setTopic_add_clientId>, <c_MQTT_stepIdx_setTopic_add_clientId>, <c_MQTT_stepName_setTopic_add_clientId>
// set QoS - <f_MQTT_step_setQos_intParam>, <c_MQTT_stepIdx_setQos_intParam>, <c_MQTT_stepName_setQos_intParam>
// set publish message - <f_MQTT_step_setPublishMessage_stringParam>, <c_MQTT_stepIdx_setPublishMessage_stringParam>, <c_MQTT_stepName_setPublishMessage_stringParam>
// <f_MQTT_step_setPublishMessage_add_stringParam>, <c_MQTT_stepIdx_setPublishMessage_add_stringParam>, <c_MQTT_stepName_setPublishMessage_add_stringParam>
// <f_MQTT_step_setPublishMessage_add_varParams>, <c_MQTT_stepIdx_setPublishMessage_add_varParams>, <c_MQTT_stepName_setPublishMessage_add_varParams>
// <f_MQTT_step_setPublishMessage_add_clientId>, <c_MQTT_stepIdx_setPublishMessage_add_clientId>, <c_MQTT_stepName_setPublishMessage_add_clientId>
// MQTT - <f_MQTT_step_reportPingResponse>, <c_MQTT_stepIdx_reportPingResponse>, <c_MQTT_stepName_reportPingResponse>
// MQTT - <f_MQTT_step_reportPublishResponse>, <c_MQTT_stepIdx_reportPublishResponse>, <c_MQTT_stepName_reportPublishResponse>
//
// Class Diagram:
// (see EPTF_MQTT_LGen_Definitions.classes.jpg)
//
///////////////////////////////////////////////////////////////
module EPTF_MQTT_LGen_Definitions
{
import from EPTF_MQTT_Transport_Definitions all;
import from EPTF_CLL_LGenBase_Definitions all;
import from EPTF_CLL_Logging_Definitions all;
import from EPTF_CLL_FBQ_Definitions all;
import from EPTF_CLL_Common_Definitions all;
import from Socket_API_Definitions all;
import from MQTT_v3_1_1_Types all;
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_MQTT_LGen_debug
//
// Purpose:
// Enabled/disable debug logging
//
// Type:
// *boolean*
//
// Default value:
// *false*
///////////////////////////////////////////////////////////
modulepar boolean tsp_EPTF_MQTT_LGen_debug := false;
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_MQTT_LGen_debugVerbose
//
// Purpose:
// Enabled/disable verbosity of debug logging
//
// Type:
// *boolean*
//
// Default value:
// *false*
///////////////////////////////////////////////////////////
modulepar boolean tsp_EPTF_MQTT_LGen_debugVerbose := false;
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_MQTT_LGen_maxBindableCtx
//
// Purpose:
// Can be used to limit the maximum number of contexts
// set it to -1 otherwise.
//
// Type:
// *integer*
//
// Default value:
// *-1*
///////////////////////////////////////////////////////////
modulepar integer tsp_EPTF_MQTT_LGen_maxBindableCtx := -1;
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_MQTT_LGen_templates
//
// Purpose:
// MQTT message template definitions for sending
//
// Type:
// <MQTT_Template_List>
//
// Default value:
// Empty list: {}
///////////////////////////////////////////////////////////
modulepar MQTT_Template_List tsp_EPTF_MQTT_LGen_templates := {};
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_MQTT_PUBLISH_responseWatchdog
//
// Purpose:
// Watchdog timer value to wait responses to an MQTT PUBLISH message
//
// Type:
// *float*
//
// Default value:
// Empty list: {}
///////////////////////////////////////////////////////////
modulepar float tsp_EPTF_MQTT_PUBLISH_responseWatchdog := 0.0;
///////////////////////////////////////////////////////////
// Module parameter: tsp_EPTF_MQTT_SUBSCRIBE_responseWatchdog
//
// Purpose:
// Watchdog timer value to wait responses to an MQTT SUBSCRIBE message
//
// Type:
// *float*
//
// Default value:
// Empty list: {}
///////////////////////////////////////////////////////////
modulepar float tsp_EPTF_MQTT_SUBSCRIBE_responseWatchdog := 0.0;
const integer c_MQTT_LGen_Logging_WARNING := 0;
const integer c_MQTT_LGen_Logging_DEBUG := 1;
const integer c_MQTT_LGen_Logging_DEBUGV := 2;
const integer c_MQTT_LGen_Logging_ERROR := 3;
const charstring c_MQTT_behaviorType := "MQTT Behavior";
/*****************************************************************
@startuml EPTF_MQTT_LGen_Definitions.classes.jpg
class EPTF_MQTT_LGen_CT {
boolean v_MQTT_initialized
integer v_MQTT_bIdx
integer v_MQTT_loggingMaskId
MQTT_Address_DB v_MQTT_addressDB
MQTT_Template_DB v_MQTT_templateDB
MQTT_Session_DB v_MQTT_sessionDB
MQTT_Subscription_DB v_MQTT_subscriptionDB
MQTT_Publish_DB v_MQTT_publishDB
MQTT_StepCtx v_MQTT_ctx
MQTT_Session v_MQTT_session
MQTT_Subscription v_MQTT_subscription
MQTT_Publish v_MQTT_publish
EPTF_MQTT_PDU v_MQTT_msgToProcess
EPTF_MQTT_PDU v_MQTT_msgToSend
fcb_EPTF_MQTT_messageReceived vf_MQTT_msgReceived
f_EPTF_MQTT_LGen_init(in charstring pl_name)
f_EPTF_MQTT_LGen_initLogging()
f_MQTT_cleanUp()
f_MQTT_eCtxBind(in integer pl_eIdx)
f_MQTT_eCtxUnbind(in integer pl_eIdx)
f_MQTT_eCtxReset(in integer pl_eIdx)
f_EPTF_MQTT_declareEvents()
f_EPTF_MQTT_declareSteps()
f_EPTF_MQTT_LGen_receiveMessage(in EPTF_MQTT_PDU pl_message)
f_EPTF_MQTT_LGen_receiveEvent(in ASP_Event p_event)
f_EPTF_MQTT_LGen_transportApiResponse(in EPTF_MQTT_Transport_Response pl_rsp)
f_EPTF_MQTT_LGen_send(inout EPTF_MQTT_PDU p_msg)
f_EPTF_MQTT_stack_fromApp(inout EPTF_MQTT_PDU p_msg, in MQTT_StepCtx p_ctx)
f_EPTF_MQTT_stack_fromEnv(inout EPTF_MQTT_PDU p_msg)
f_EPTF_MQTT_isFsmInitialized(in integer pl_eIdx, in integer pl_fsmIdx, inout integer pl_sessionIdx)
f_EPTF_MQTT_Logging_VERBOSE(in @lazy charstring pl_message)
f_EPTF_MQTT_Logging_DEBUG(in @lazy charstring pl_message)
f_EPTF_MQTT_Logging_WARNING(in @lazy charstring pl_message)
f_EPTF_MQTT_Logging_ERROR(in @lazy charstring pl_message)
f_EPTF_MQTT_dispatchEvent(in integer pl_eventIdx, in integer pl_eIdx, in integer pl_fsmCtx, in EPTF_IntegerList pl_reportedArgs)
}
EPTF_MQTT_LGen_CT "1" --> "1\n.v_MQTT_addressDB" MQTT_Address_DB
EPTF_MQTT_LGen_CT "1" --> "1\n.v_MQTT_templateDB" MQTT_Template_DB
EPTF_MQTT_LGen_CT "1" --> "1\n.v_MQTT_sessionDB" MQTT_Session_DB
EPTF_MQTT_LGen_CT "1" --> "1\n.v_MQTT_subscriptionDB" v_MQTT_subscriptionDB
EPTF_MQTT_LGen_CT "1" --> "1\n.v_MQTT_publishDB" v_MQTT_publishDB
class MQTT_Address_DB {
EPTF_FreeBusyQueue queue
MQTT_Address_List data
integer hashRef
f_EPTF_MQTT_addressDB_init()
f_EPTF_MQTT_addressDB_add(in Socket p_addr, inout integer p_idx)
f_EPTF_MQTT_addressDB_lookUp(in Socket p_sock)
f_EPTF_MQTT_addressDB_get(inout Socket p_addr, in integer p_idx)
f_EPTF_MQTT_addressDB_Socket2String(Socket p_sock)
f_EPTF_MQTT_addressDB_cleanUp()
}
MQTT_Address_DB "1" --> "*\n.data[]" Socket
class MQTT_Template_DB {
EPTF_FreeBusyQueue queue
MQTT_Template_List data
integer hashRef
f_EPTF_MQTT_templateDB_init()
f_EPTF_MQTT_templateDB_add(in MQTT_Template p_template)
f_EPTF_MQTT_templateDB_lookUp(in charstring p_id)
f_EPTF_MQTT_templateDB_get(in integer p_idx, inout Socket MQTT_v3_1_1_ReqResp p_pdu)
f_EPTF_MQTT_templateDB_cleanUp()
}
MQTT_Template_DB "1" --> "*\n.data[]" MQTT_Template
class MQTT_Session_DB {
EPTF_FreeBusyQueue queue
MQTT_Session_List data
integer hashRef
f_EPTF_MQTT_sessionDB_init()
f_EPTF_MQTT_sessionDB_add(in MQTT_Session p_session)
f_EPTF_MQTT_sessionDB_lookUp(in Socket p_sock)
f_EPTF_MQTT_sessionDB_get(in integer p_idx, inout MQTT_Session p_session)
f_EPTF_MQTT_sessionDB_setKey(in integer p_idx)
f_EPTF_MQTT_sessionDB_check(in integer p_idx)
f_EPTF_MQTT_sessionDB_remove(in integer p_idx)
f_EPTF_MQTT_sessionDB_addrHash(in Socket p_sock)
f_EPTF_MQTT_sessionDB_cleanUp()
}
MQTT_Session_DB "1" --> "*\n.data[]" MQTT_Session
class MQTT_Session {
integer eIdx
integer fsmIdx
integer localAddrIdx
integer remoteAddrIdx
charstring clientId
float keepAliveTime
integer nextPacketId,
integer[] subscriptionRefs
integer[] publishRefs
integer keepaliveTimer
boolean reportPingResponse
boolean reportPublishResponse
MQTT_Session_State state
f_EPTF_MQTT_session_fromApp(inout EPTF_MQTT_PDU p_msg, in integer p_sIdx)
f_EPTF_MQTT_session_fromEnv(inout EPTF_MQTT_PDU p_msg, in integer p_sIdx)
f_EPTF_MQTT_session_keepalive(in EPTF_ScheduledAction pl_action, in integer pl_eventIndex)
f_EPTF_MQTT_session_startT_keepalive(in integer pl_sIdx, in float pl_time)
f_EPTF_MQTT_session_cancelT_keepalive(in integer pl_sessionIdx)
f_EPTF_MQTT_session_getNextPacketId(in MQTT_StepCtx p_ctx)
f_EPTF_MQTT_session_setState(in integer p_sessionIdx, in MQTT_Session_State p_nextState)
f_EPTF_MQTT_session_send(in integer p_sessionIdx, inout EPTF_MQTT_PDU p_msg)
f_EPTF_MQTT_session_registerSubscription(in integer p_sessionIdx, in integer p_subIdx)
f_EPTF_MQTT_session_deregisterSubscription(in integer p_sessionIdx, in integer p_subIdx)
f_EPTF_MQTT_session_registerPublish(in integer p_sessionIdx, in integer p_pubIdx)
f_EPTF_MQTT_session_deregisterPublish(in integer p_sessionIdx, in integer p_pubIdx)
f_EPTF_MQTT_session_remove(in integer p_sessionIdx)
}
MQTT_Session "1" --> "1\n.localAddrIdx" Socket
MQTT_Session "1" --> "1\n.remoteAddrIdx" Socket
MQTT_Session "1\n.sessionIdx" <--> "*\n.subscriptionRefs[]" MQTT_Subscription
MQTT_Session "1\n.sessionIdx" <--> "*\n.publishRefs[]" MQTT_Publish
class MQTT_Subscription_DB {
EPTF_FreeBusyQueue queue
MQTT_Subscription_List data
integer hashRef
f_EPTF_MQTT_subscriptionDB_init()
f_EPTF_MQTT_subscriptionDB_add(in MQTT_Subscription p_sub)
f_EPTF_MQTT_subscriptionDB_setKey_packetId(in integer p_idx, in integer p_sessionIdx, in integer p_packetId)
f_EPTF_MQTT_subscriptionDB_removeKey_packetId(in integer p_idx, in integer p_sessionIdx, in integer p_packetId)
f_EPTF_MQTT_subscriptionDB_lookUp_packetId(in integer p_sessionIdx, in integer p_packetId)
f_EPTF_MQTT_subscriptionDB_lookUp_topicName(in integer p_sessionIdx, in charstring p_topicName)
f_EPTF_MQTT_subscriptionDB_get(in integer p_idx, inout MQTT_Subscription p_sub)
f_EPTF_MQTT_subscriptionDB_check(in integer p_idx)
f_EPTF_MQTT_subscriptionDB_remove(in integer p_idx)
f_EPTF_MQTT_subscriptionDB_packetIdHash(in integer p_sessionIdx, in integer p_packetId)
f_EPTF_MQTT_subscriptionDB_topicHash(in integer p_sessionIdx, in charstring p_topic)
f_EPTF_MQTT_subscriptionDB_cleanUp()
}
MQTT_Subscription_DB "1" --> "*\n.data[]" MQTT_Subscription
class MQTT_Subscription {
integer sessionIdx
integer watchdogTimer
MQTT_v3_1_1_Subscribe request
MQTT_Subscription_State state
f_EPTF_MQTT_subscription_fromSession(inout EPTF_MQTT_PDU p_msg, in integer p_subIdx)
f_EPTF_MQTT_subscription_fromEnv(inout EPTF_MQTT_PDU p_msg, in integer p_subIdx)
f_EPTF_MQTT_subscription_setState(in integer p_subIdx, in MQTT_Subscription_State p_nextState)
f_EPTF_MQTT_subscription_remove(in integer p_subIdx)
}
class MQTT_Publish_DB {
EPTF_FreeBusyQueue queue
MQTT_Publish_List data
integer hashRef
f_EPTF_MQTT_publishDB_init()
f_EPTF_MQTT_publishDB_add(in MQTT_Publish p_pub)
f_EPTF_MQTT_publishDB_lookUp(in integer p_sessionIdx, in integer p_packetId)
f_EPTF_MQTT_publishDB_get(in integer p_idx, inout MQTT_Publish p_pub)
f_EPTF_MQTT_publishDB_check(in integer p_idx)
f_EPTF_MQTT_publishDB_remove(in integer p_idx)
f_EPTF_MQTT_publishDB_packetIdHash(in integer p_sessionIdx, in integer p_packetId)
f_EPTF_MQTT_publishDB_cleanUp()
}
MQTT_Publish_DB "1" --> "*\n.data[]" MQTT_Publish
class MQTT_Publish {
integer sessionIdx
integer packetId
integer watchdogTimer
MQTT_Publish_Side side
MQTT_Publish_State state
f_EPTF_MQTT_publish_fromSession(inout EPTF_MQTT_PDU p_msg, in integer p_pubIdx)
f_EPTF_MQTT_publish_fromEnv(inout EPTF_MQTT_PDU p_msg, in integer p_pubIdx)
f_EPTF_MQTT_publish_watchdog(in EPTF_ScheduledAction pl_action, in integer pl_eventIndex)
f_EPTF_MQTT_publish_startT_watchdog(in integer pl_pIdx, in float pl_time)
f_EPTF_MQTT_publish_cancelT_watchdog(in integer pl_publishIdx)
f_EPTF_MQTT_publish_setState(in integer p_pubIdx, in MQTT_Publish_State p_nextState)
f_EPTF_MQTT_publish_remove(in integer p_pubIdx)
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: MQTT_Template
//
// Purpose:
// Grouping a <MQTT_v3_1_1_ReqResp> with an id
//
// Elements:
// id - *charstring* - identifier
// msg - <MQTT_v3_1_1_ReqResp> - MQTT PDU
///////////////////////////////////////////////////////////
type record MQTT_Template
{
charstring id,
MQTT_v3_1_1_ReqResp msg
}
///////////////////////////////////////////////////////////
// Type: MQTT_Template_List
//
// Purpose:
// List of <MQTT_Template>
///////////////////////////////////////////////////////////
type record of MQTT_Template MQTT_Template_List;
/*****************************************************************
@startuml EPTF_MQTT_LGen_Definitions.MQTT_Template_DB.jpg
class MQTT_Template_DB {
EPTF_FreeBusyQueue queue
MQTT_Template_List data
integer hashRef
f_EPTF_MQTT_templateDB_init()
f_EPTF_MQTT_templateDB_add(in MQTT_Template p_template)
f_EPTF_MQTT_templateDB_lookUp(in charstring p_id)
f_EPTF_MQTT_templateDB_get(in integer p_idx, inout Socket MQTT_v3_1_1_ReqResp p_pdu)
f_EPTF_MQTT_templateDB_cleanUp()
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: MQTT_Template_DB
//
// Purpose:
// Storing <MQTT_Template> instances
//
// Class:
// (see EPTF_MQTT_LGen_Definitions.MQTT_Template_DB.jpg)
//
// Elements:
// data - <MQTT_Template_List> - elements
// hashRef - charstring2int hash reference
//
// Related Functions:
// - <f_EPTF_MQTT_templateDB_init> ()
// - <f_EPTF_MQTT_templateDB_add> (in <MQTT_Template> p_template)
// - <f_EPTF_MQTT_templateDB_lookUp> (in *charstring* p_id)
// - <f_EPTF_MQTT_templateDB_get> (in *integer* p_idx, inout <MQTT_v3_1_1_ReqResp> p_pdu)
// - <f_EPTF_MQTT_templateDB_cleanUp> ()
///////////////////////////////////////////////////////////
type record MQTT_Template_DB
{
MQTT_Template_List data,
integer hashRef
}
/*****************************************************************
@startuml EPTF_MQTT_LGen_Definitions.MQTT_Session.jpg
class MQTT_Session {
integer eIdx
integer fsmIdx
integer localAddrIdx
integer remoteAddrIdx
charstring clientId
float keepAliveTime
integer nextPacketId,
integer[] subscriptionRefs
integer[] publishRefs
integer keepaliveTimer
boolean reportPingResponse
boolean reportPublishResponse
MQTT_Session_State state
f_EPTF_MQTT_session_fromApp(inout EPTF_MQTT_PDU p_msg, in integer p_sIdx)
f_EPTF_MQTT_session_fromEnv(inout EPTF_MQTT_PDU p_msg, in integer p_sIdx)
f_EPTF_MQTT_session_keepalive(in EPTF_ScheduledAction pl_action, in integer pl_eventIndex)
f_EPTF_MQTT_session_startT_keepalive(in integer pl_sIdx, in float pl_time)
f_EPTF_MQTT_session_cancelT_keepalive(in integer pl_sessionIdx)
f_EPTF_MQTT_session_getNextPacketId(in MQTT_StepCtx p_ctx)
f_EPTF_MQTT_session_setState(in integer p_sessionIdx, in MQTT_Session_State p_nextState)
f_EPTF_MQTT_session_send(in integer p_sessionIdx, inout EPTF_MQTT_PDU p_msg)
f_EPTF_MQTT_session_registerSubscription(in integer p_sessionIdx, in integer p_subIdx)
f_EPTF_MQTT_session_deregisterSubscription(in integer p_sessionIdx, in integer p_subIdx)
f_EPTF_MQTT_session_registerPublish(in integer p_sessionIdx, in integer p_pubIdx)
f_EPTF_MQTT_session_deregisterPublish(in integer p_sessionIdx, in integer p_pubIdx)
f_EPTF_MQTT_session_remove(in integer p_sessionIdx)
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: MQTT_Session
//
// Purpose:
// Models and MQTT session
//
// Class:
// (see EPTF_MQTT_LGen_Definitions.MQTT_Session.jpg)
//
// FSM Diagram of a MQTT session:
// (see EPTF_MQTT_LGen_Functions.MQTT_Session.jpg)
//
// Elements:
// eIdx - *integer* - pointer to the entity that owns the session
// fsmIdx - *integer* - pointer to the fsm that owns the session
// localAddressIdx - *integer* - pointer to the local address in *v_MQTT_addressDB*
// remoteAddressIdx - *integer* - pointer to the remote address in *v_MQTT_addressDB*
// clientId - *charstring* - the client ID used in the session
// keepAliveTime - *float* - timer used for sending keep alive messages
// nextPacketId - *integer* - id used for the next packet
// subscriptionRefs - <EPTF_IntegerList> - pointer to subscriptions in *v_MQTT_subscriptionDB* <MQTT_Subscription_DB>
// publishRefs - <EPTF_IntegerList> - pointer to publications in *v_MQTT_publishDB* <MQTT_Publish_DB>
// keepaliveTimer - *integer* - reference for the keep alive timer in the scheduler
// reportPingResponse - *boolean* - enable/disable reporting of ping responses
// reportPublishResponse - *boolean* - enable/disabled reporting of publish responses
// state - <MQTT_Session_State> - state of an MQTT session
//
// Related Functions:
// - <f_EPTF_MQTT_session_fromApp> (*inout* <EPTF_MQTT_PDU> p_msg, *in integer* p_sIdx)
// - <f_EPTF_MQTT_session_fromEnv> (*inout* <EPTF_MQTT_PDU> p_msg, *in integer* p_sIdx)
// - <f_EPTF_MQTT_session_keepalive> (*in* <EPTF_ScheduledAction> pl_action, *in integer* pl_eventIndex)
// - <f_EPTF_MQTT_session_startT_keepalive> (*in integer* pl_sIdx, *in float* pl_time)
// - <f_EPTF_MQTT_session_cancelT_keepalive> (*in integer* pl_sessionIdx)
// - <f_EPTF_MQTT_session_getNextPacketId> (*in* <MQTT_StepCtx> p_ctx)
// - <f_EPTF_MQTT_session_setState> (*in integer* p_sessionIdx, *in* <MQTT_Session_State> p_nextState)
// - <f_EPTF_MQTT_session_send> (*in integer* p_sessionIdx, *inout* <EPTF_MQTT_PDU> p_msg)
// - <f_EPTF_MQTT_session_registerSubscription> (*in integer* p_sessionIdx, *in integer* p_subIdx)
// - <f_EPTF_MQTT_session_deregisterSubscription> (*in integer* p_sessionIdx, *in integer* p_subIdx)
// - <f_EPTF_MQTT_session_registerPublish> (*in integer* p_sessionIdx, *in integer* p_pubIdx)
// - <f_EPTF_MQTT_session_deregisterPublish> (*in integer* p_sessionIdx, *in integer* p_pubIdx)
// - <f_EPTF_MQTT_session_remove> (*in integer* p_sessionIdx)
///////////////////////////////////////////////////////////
type record MQTT_Session
{
integer eIdx,
integer fsmIdx,
integer localAddrIdx,
integer remoteAddrIdx,
charstring clientId,
float keepAliveTime,
integer nextPacketId,
EPTF_IntegerList subscriptionRefs,
EPTF_IntegerList publishRefs,
integer keepaliveTimer,
boolean reportPingResponse,
boolean reportPublishResponse,
MQTT_Session_State state
}
///////////////////////////////////////////////////////////
// Enum: MQTT_Session_State
//
// Purpose:
// States of an <MQTT_Session> state machine
//
// Elements:
// - DISCONNECTED
// - CONNECTING
// - CONNECTED
// - REMOVING
///////////////////////////////////////////////////////////
type enumerated MQTT_Session_State {
DISCONNECTED,
CONNECTING,
CONNECTED,
REMOVING
}
const MQTT_Session c_MQTT_Session_init :=
{
eIdx := -1,
fsmIdx := -1,
localAddrIdx := -1,
remoteAddrIdx := -1,
clientId := "",
keepAliveTime := 0.0,
nextPacketId := 0,
subscriptionRefs := {},
publishRefs := {},
keepaliveTimer := -1,
reportPingResponse := false,
reportPublishResponse := false,
state := DISCONNECTED
}
///////////////////////////////////////////////////////////
// Type: MQTT_Session_List
//
// Purpose:
// List of <MQTT_Session>
///////////////////////////////////////////////////////////
type record of MQTT_Session MQTT_Session_List;
/*****************************************************************
@startuml EPTF_MQTT_LGen_Definitions.MQTT_Session_DB.jpg
class MQTT_Session_DB {
EPTF_FreeBusyQueue queue
MQTT_Session_List data
integer hashRef
f_EPTF_MQTT_sessionDB_init()
f_EPTF_MQTT_sessionDB_add(in MQTT_Session p_session)
f_EPTF_MQTT_sessionDB_lookUp(in Socket p_sock)
f_EPTF_MQTT_sessionDB_get(in integer p_idx, inout MQTT_Session p_session)
f_EPTF_MQTT_sessionDB_setKey(in integer p_idx)
f_EPTF_MQTT_sessionDB_check(in integer p_idx)
f_EPTF_MQTT_sessionDB_remove(in integer p_idx)
f_EPTF_MQTT_sessionDB_addrHash(in Socket p_sock)
f_EPTF_MQTT_sessionDB_cleanUp()
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: MQTT_Session_DB
//
// Purpose:
// Storing <MQTT_Session> instances
//
// Class:
// (see EPTF_MQTT_LGen_Definitions.MQTT_Session_DB.jpg)
//
// Elements:
// queue - <EPTF_FreeBusyQueue> - free-busy queue to provide dynamic array
// data - <MQTT_Session_List> - elements
// hashRef - str2int hash reference
//
// Related Functions:
// - <f_EPTF_MQTT_sessionDB_init> ()
// - <f_EPTF_MQTT_sessionDB_add> (in <MQTT_Session> p_session)
// - <f_EPTF_MQTT_sessionDB_lookUp> (in <Socket> p_sock)
// - <f_EPTF_MQTT_sessionDB_get> (in integer p_idx, inout MQTT_Session p_session)
// - <f_EPTF_MQTT_sessionDB_setKey> (in integer p_idx)
// - <f_EPTF_MQTT_sessionDB_check> (in integer p_idx)
// - <f_EPTF_MQTT_sessionDB_remove> (in integer p_idx)
// - <f_EPTF_MQTT_sessionDB_addrHash> (in <Socket> p_sock)
// - <f_EPTF_MQTT_sessionDB_cleanUp> ()
///////////////////////////////////////////////////////////
type record MQTT_Session_DB
{
EPTF_FreeBusyQueue queue,
MQTT_Session_List data,
integer hashRef
}
/*****************************************************************
@startuml EPTF_MQTT_LGen_Definitions.MQTT_Subscription.jpg
class MQTT_Subscription {
integer sessionIdx
integer watchdogTimer
MQTT_v3_1_1_Subscribe request
MQTT_Subscription_State state
f_EPTF_MQTT_subscription_fromSession(inout EPTF_MQTT_PDU p_msg, in integer p_subIdx)
f_EPTF_MQTT_subscription_fromEnv(inout EPTF_MQTT_PDU p_msg, in integer p_subIdx)
f_EPTF_MQTT_subscription_setState(in integer p_subIdx, in MQTT_Subscription_State p_nextState)
f_EPTF_MQTT_subscription_remove(in integer p_subIdx)
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: MQTT_Subscription
//
// Purpose:
// Models an MQTT subscription
//
// Class:
// (see EPTF_MQTT_LGen_Definitions.MQTT_Subscription.jpg)
//
// Elements:
// sessionIdx - *integer* - the session, the subscription belongs to
// watchdogTimer - *integer* - reference to the watchod timer
// request - <MQTT_v3_1_1_Subscribe> - the MQTT PDU that initialized the subscription (optional)
// state - <MQTT_Subscription_State> - state of an MQTT subscription
//
// Related Functions:
// - <f_EPTF_MQTT_subscription_fromSession>(*inout* <EPTF_MQTT_PDU> p_msg, *in integer* p_subIdx)
// - <f_EPTF_MQTT_subscription_fromEnv>(*inout* <EPTF_MQTT_PDU> p_msg, *in integer* p_subIdx)
// - <f_EPTF_MQTT_subscription_setState>(*in integer* p_subIdx, *in* <MQTT_Subscription_State> p_nextState)
// - <f_EPTF_MQTT_subscription_remove>(*in integer* p_subIdx)
//
// FSM Diagram of a MQTT subscription:
// (see EPTF_MQTT_LGen_Functions.MQTT_Subscription.jpg)
///////////////////////////////////////////////////////////
type record MQTT_Subscription
{
integer sessionIdx,
integer watchdogTimer,
MQTT_v3_1_1_Subscribe request optional,
MQTT_Subscription_State state
}
// TODO: Currently only one topic per subscription is handled only!
///////////////////////////////////////////////////////////
// Enum: MQTT_Subscription_State
//
// Purpose:
// States of an <MQTT_Subscription> state machine
//
// Elements:
// - UNSUBSCRIBED
// - SUBSCRIBING
// - SUBSCRIBED
// - UNSUBSCRIBING
// - REMOVING
///////////////////////////////////////////////////////////
type enumerated MQTT_Subscription_State {
UNSUBSCRIBED,
SUBSCRIBING,
SUBSCRIBED,
UNSUBSCRIBING,
REMOVING
}
const MQTT_Subscription c_MQTT_Subscription_init :=
{
sessionIdx := -1,
watchdogTimer := -1,
request := omit,
state := UNSUBSCRIBED
}
///////////////////////////////////////////////////////////
// Type: MQTT_Subscription_List
//
// Purpose:
// List of <MQTT_Subscription>
///////////////////////////////////////////////////////////
type record of MQTT_Subscription MQTT_Subscription_List;
/*****************************************************************
@startuml EPTF_MQTT_LGen_Definitions.MQTT_Subscription_DB.jpg
class MQTT_Subscription_DB {
EPTF_FreeBusyQueue queue
MQTT_Subscription_List data
integer hashRef
f_EPTF_MQTT_subscriptionDB_init()
f_EPTF_MQTT_subscriptionDB_add(in MQTT_Subscription p_sub)
f_EPTF_MQTT_subscriptionDB_setKey_packetId(in integer p_idx, in integer p_sessionIdx, in integer p_packetId)
f_EPTF_MQTT_subscriptionDB_removeKey_packetId(in integer p_idx, in integer p_sessionIdx, in integer p_packetId)
f_EPTF_MQTT_subscriptionDB_lookUp_packetId(in integer p_sessionIdx, in integer p_packetId)
f_EPTF_MQTT_subscriptionDB_lookUp_topicName(in integer p_sessionIdx, in charstring p_topicName)
f_EPTF_MQTT_subscriptionDB_get(in integer p_idx, inout MQTT_Subscription p_sub)
f_EPTF_MQTT_subscriptionDB_check(in integer p_idx)
f_EPTF_MQTT_subscriptionDB_remove(in integer p_idx)
f_EPTF_MQTT_subscriptionDB_packetIdHash(in integer p_sessionIdx, in integer p_packetId)
f_EPTF_MQTT_subscriptionDB_topicHash(in integer p_sessionIdx, in charstring p_topic)
f_EPTF_MQTT_subscriptionDB_cleanUp()
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: MQTT_Subscription_DB
//
// Purpose:
// Storing <MQTT_Subscription> instances
//
// Class:
// (see EPTF_MQTT_LGen_Definitions.MQTT_Subscription_DB.jpg)
//
// Elements:
// queue - <EPTF_FreeBusyQueue> - free-busy queue to provide dynamic array
// data - <MQTT_Subscription_List> - elements
// hashRef - str2int hash reference
//
// Related Functions:
// - <f_EPTF_MQTT_subscriptionDB_init> ()
// - <f_EPTF_MQTT_subscriptionDB_add> (*in* <MQTT_Subscription> p_sub)
// - <f_EPTF_MQTT_subscriptionDB_setKey_packetId> (*in integer* p_idx, *in integer* p_sessionIdx, *in integer* p_packetId)
// - <f_EPTF_MQTT_subscriptionDB_removeKey_packetId> (*in integer* p_idx, *in integer* p_sessionIdx, *in integer* p_packetId)
// - <f_EPTF_MQTT_subscriptionDB_lookUp_packetId> (*in integer* p_sessionIdx, *in integer* p_packetId)
// - <f_EPTF_MQTT_subscriptionDB_lookUp_topicName> (*in integer* p_sessionIdx, *in charstring* p_topicName)
// - <f_EPTF_MQTT_subscriptionDB_get> (*in integer* p_idx, *inout* <MQTT_Subscription> p_sub)
// - <f_EPTF_MQTT_subscriptionDB_check> (*in integer* p_idx)
// - <f_EPTF_MQTT_subscriptionDB_remove> (*in integer* p_idx)
// - <f_EPTF_MQTT_subscriptionDB_packetIdHash> (*in integer* p_sessionIdx, *in integer* p_packetId)
// - <f_EPTF_MQTT_subscriptionDB_topicHash> (*in integer* p_sessionIdx, *in charstring* p_topic)
// - <f_EPTF_MQTT_subscriptionDB_cleanUp> ()
///////////////////////////////////////////////////////////
type record MQTT_Subscription_DB
{
EPTF_FreeBusyQueue queue,
MQTT_Subscription_List data,
integer hashRef // sessionIdx+packetId or sessionIdx+topicName
}
/*****************************************************************
@startuml EPTF_MQTT_LGen_Definitions.MQTT_Publish.jpg
class MQTT_Publish {
integer sessionIdx
integer packetId
integer watchdogTimer
MQTT_Publish_Side side
MQTT_Publish_State state
f_EPTF_MQTT_publish_fromSession(inout EPTF_MQTT_PDU p_msg, in integer p_pubIdx)
f_EPTF_MQTT_publish_fromEnv(inout EPTF_MQTT_PDU p_msg, in integer p_pubIdx)
f_EPTF_MQTT_publish_watchdog(in EPTF_ScheduledAction pl_action, in integer pl_eventIndex)
f_EPTF_MQTT_publish_startT_watchdog(in integer pl_pIdx, in float pl_time)
f_EPTF_MQTT_publish_cancelT_watchdog(in integer pl_publishIdx)
f_EPTF_MQTT_publish_setState(in integer p_pubIdx, in MQTT_Publish_State p_nextState)
f_EPTF_MQTT_publish_remove(in integer p_pubIdx)
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: MQTT_Publish
//
// Purpose:
// Models an MQTT publish
//
// Class:
// (see EPTF_MQTT_LGen_Definitions.MQTT_Publish.jpg)
//
// Elements:
// sessionIdx - *integer* - the session, the subscription belongs to
// packetId - *integer* - packet id
// watchdogTimer - *integer* - reference to the watchdog timer in the scheduler
// side - <MQTT_Publish_Side> - originating or terminating side of the publication
// state - <MQTT_Publish_State> - state of an MQTT publish
//
// Related Functions:
// - <f_EPTF_MQTT_publish_fromSession> (*inout* <EPTF_MQTT_PDU> p_msg, *in integer* p_pubIdx)
// - <f_EPTF_MQTT_publish_fromEnv> (*inout* <EPTF_MQTT_PDU> p_msg, *in integer* p_pubIdx)
// - <f_EPTF_MQTT_publish_watchdog> (*in* <EPTF_ScheduledAction> pl_action, *in integer* pl_eventIndex)
// - <f_EPTF_MQTT_publish_startT_watchdog> (*in integer* pl_pIdx, *in float* pl_time)
// - <f_EPTF_MQTT_publish_cancelT_watchdog> (*in integer* pl_publishIdx)
// - <f_EPTF_MQTT_publish_setState> (*in integer* p_pubIdx, *in* <MQTT_Publish_State> p_nextState)
// - <f_EPTF_MQTT_publish_remove> (*in integer* p_pubIdx)
//
// FSM Diagram of a MQTT publish:
// (see EPTF_MQTT_LGen_Functions.MQTT_Publish_qos1.jpg)
// (see EPTF_MQTT_LGen_Functions.MQTT_Publish_qos2.jpg)
///////////////////////////////////////////////////////////
type record MQTT_Publish
{
integer sessionIdx,
integer packetId,
//MQTT_v3_1_1_Publish request optional,
integer watchdogTimer,
MQTT_Publish_Side side,
MQTT_Publish_State state
}
const MQTT_Publish c_MQTT_Publish_init :=
{
sessionIdx := -1,
packetId := -1,
//request := omit,
watchdogTimer := -1,
side := ORIG,
state := { created := true }
}
///////////////////////////////////////////////////////////
// Enum: MQTT_Publish_Side
//
// Purpose:
// Side of an <MQTT_Publish>
//
// Elements:
// - ORIG
// - TERM
///////////////////////////////////////////////////////////
type enumerated MQTT_Publish_Side
{
ORIG,
TERM
}
///////////////////////////////////////////////////////////
// Type: MQTT_Publish_State
//
// Purpose:
// State of an <MQTT_Publish>
//
// Elements:
// qos1 - <MQTT_PublishQos1_State> - QoS1 state
// qos2 - <MQTT_PublishQos2_State> - QoS2 state
// created - *boolean* - just created
// removing - *boolean* - currently removing
///////////////////////////////////////////////////////////
type union MQTT_Publish_State
{
MQTT_PublishQos1_State qos1,
MQTT_PublishQos2_State qos2,
boolean created,
boolean removing
}
///////////////////////////////////////////////////////////
// Enum: MQTT_PublishQos1_State
//
// Purpose:
// Qos1 state of an <MQTT_Publish_State>
//
// Elements:
// - CREATED
// - PUBLISHED
// - ACKNOWLEDGED
///////////////////////////////////////////////////////////
type enumerated MQTT_PublishQos1_State
{
CREATED,
PUBLISHED,
ACKNOWLEDGED
}
///////////////////////////////////////////////////////////
// Enum: MQTT_PublishQos2_State
//
// Purpose:
// Qos2 state of an <MQTT_Publish_State>
//
// Elements:
// - CREATED
// - PUBLISHED
// - RECEIVED
// - RELEASED
// - COMPLETE
///////////////////////////////////////////////////////////
type enumerated MQTT_PublishQos2_State
{
CREATED,
PUBLISHED,
RECEIVED,
RELEASED,
COMPLETE
}
///////////////////////////////////////////////////////////
// Type: MQTT_Publish_List
//
// Purpose:
// List of <MQTT_Publish>
///////////////////////////////////////////////////////////
type record of MQTT_Publish MQTT_Publish_List;
/*****************************************************************
@startuml EPTF_MQTT_LGen_Definitions.MQTT_Publish_DB.jpg
class MQTT_Publish_DB {
EPTF_FreeBusyQueue queue
MQTT_Publish_List data
integer hashRef
f_EPTF_MQTT_publishDB_init()
f_EPTF_MQTT_publishDB_add(in MQTT_Publish p_pub)
f_EPTF_MQTT_publishDB_lookUp(in integer p_sessionIdx, in integer p_packetId)
f_EPTF_MQTT_publishDB_get(in integer p_idx, inout MQTT_Publish p_pub)
f_EPTF_MQTT_publishDB_check(in integer p_idx)
f_EPTF_MQTT_publishDB_remove(in integer p_idx)
f_EPTF_MQTT_publishDB_packetIdHash(in integer p_sessionIdx, in integer p_packetId)
f_EPTF_MQTT_publishDB_cleanUp()
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: MQTT_Publish_DB
//
// Purpose:
// Storing <MQTT_Publish> instances
//
// Class:
// (see EPTF_MQTT_LGen_Definitions.MQTT_Publish_DB.jpg)
//
// Elements:
// queue - <EPTF_FreeBusyQueue> - free-busy queue to provide dynamic array
// data - <MQTT_Publish_List> - elements
// hashRef - str2int hash reference
//
// Related Functions:
// - <f_EPTF_MQTT_publishDB_init> ()
// - <f_EPTF_MQTT_publishDB_add> (*in* <MQTT_Publish> p_pub)
// - <f_EPTF_MQTT_publishDB_lookUp> (*in integer* p_sessionIdx, *in integer* p_packetId)
// - <f_EPTF_MQTT_publishDB_get> (*in integer* p_idx, *inout* <MQTT_Publish> p_pub)
// - <f_EPTF_MQTT_publishDB_check> (*in integer* p_idx)
// - <f_EPTF_MQTT_publishDB_remove> (*in integer* p_idx)
// - <f_EPTF_MQTT_publishDB_packetIdHash> (*in integer* p_sessionIdx, *in integer* p_packetId)
// - <f_EPTF_MQTT_publishDB_cleanUp> ()
///////////////////////////////////////////////////////////
type record MQTT_Publish_DB
{
EPTF_FreeBusyQueue queue,
MQTT_Publish_List data,
integer hashRef // sessionIdx+packetId
}
///////////////////////////////////////////////////////////
// Type: MQTT_StepCtx
//
// Purpose:
// Type that stores the most important pointers
//
// Elements:
// eIdx - *integer* - entity index
// fsmIdx - *integer* - fsm index
// sessionIdx - *integer* - MQTT session index <MQTT_Session>
///////////////////////////////////////////////////////////
type record MQTT_StepCtx
{
integer eIdx,
integer fsmIdx,
integer sessionIdx
}
const MQTT_StepCtx c_MQTT_StepCtx_empty :=
{
eIdx := -1,
fsmIdx := -1,
sessionIdx := -1
}
///////////////////////////////////////////////////////////
// Type: MQTT_Address_List
//
// Purpose:
// List of <Socket>
///////////////////////////////////////////////////////////
type record of Socket MQTT_Address_List;
/*****************************************************************
@startuml EPTF_MQTT_LGen_Definitions.MQTT_Address_DB.jpg
class MQTT_Address_DB {
EPTF_FreeBusyQueue queue
MQTT_Address_List data
integer hashRef
f_EPTF_MQTT_addressDB_init()
f_EPTF_MQTT_addressDB_add(in Socket p_addr, inout integer p_idx)
f_EPTF_MQTT_addressDB_lookUp(in Socket p_sock)
f_EPTF_MQTT_addressDB_get(inout Socket p_addr, in integer p_idx)
f_EPTF_MQTT_addressDB_Socket2String(Socket p_sock)
f_EPTF_MQTT_addressDB_cleanUp()
}
@enduml
******************************************************************/
///////////////////////////////////////////////////////////
// Type: MQTT_Address_DB
//
// Purpose:
// Storing <Socket> instances
//
// Class:
// (see EPTF_MQTT_LGen_Definitions.MQTT_Address_DB.jpg)
//
// Elements:
// queue - <EPTF_FreeBusyQueue> - free-busy queue to provide dynamic array
// data - <MQTT_Address_List> - elements
// hashRef - str2int hash reference
//
// Related Functions:
// - <f_EPTF_MQTT_addressDB_init> ()
// - <f_EPTF_MQTT_addressDB_add> (*in* <Socket> p_addr, *inout integer* p_idx)
// - <f_EPTF_MQTT_addressDB_lookUp> (*in* <Socket> p_sock)
// - <f_EPTF_MQTT_addressDB_get> (*inout* <Socket> p_addr, *in integer* p_idx)
// - <f_EPTF_MQTT_addressDB_Socket2String> (<Socket> p_sock)
// - <f_EPTF_MQTT_addressDB_cleanUp> ()
///////////////////////////////////////////////////////////
type record MQTT_Address_DB
{
EPTF_FreeBusyQueue queue,
MQTT_Address_List data,
integer hashRef
}
///////////////////////////////////////////////////////////
// Type: fcb_EPTF_MQTT_messageReceived
//
// Purpose:
// Call-back function type for reporting received MQTT messages
//
// Elements:
// pl_message - *in* <EPTF_MQTT_PDU> - received MQTT message
///////////////////////////////////////////////////////////
type function fcb_EPTF_MQTT_messageReceived(in EPTF_MQTT_PDU pl_message) runs on self;
/*****************************************************************
@startuml EPTF_MQTT_LGen_Definitions.EPTF_MQTT_LGen_CT.jpg
class EPTF_MQTT_LGen_CT {
boolean v_MQTT_initialized
integer v_MQTT_bIdx
integer v_MQTT_loggingMaskId
MQTT_Address_DB v_MQTT_addressDB
MQTT_Template_DB v_MQTT_templateDB
MQTT_Session_DB v_MQTT_sessionDB
MQTT_Subscription_DB v_MQTT_subscriptionDB
MQTT_Publish_DB v_MQTT_publishDB
MQTT_StepCtx v_MQTT_ctx
MQTT_Session v_MQTT_session
MQTT_Subscription v_MQTT_subscription
MQTT_Publish v_MQTT_publish
EPTF_MQTT_PDU v_MQTT_msgToProcess
EPTF_MQTT_PDU v_MQTT_msgToSend
fcb_EPTF_MQTT_messageReceived vf_MQTT_msgReceived
f_EPTF_MQTT_LGen_init(in charstring pl_name)
f_EPTF_MQTT_LGen_initLogging()
f_MQTT_cleanUp()
f_MQTT_eCtxBind(in integer pl_eIdx)
f_MQTT_eCtxUnbind(in integer pl_eIdx)
f_MQTT_eCtxReset(in integer pl_eIdx)
f_EPTF_MQTT_declareEvents()
f_EPTF_MQTT_declareSteps()
f_EPTF_MQTT_LGen_receiveMessage(in EPTF_MQTT_PDU pl_message)
f_EPTF_MQTT_LGen_receiveEvent(in ASP_Event p_event)
f_EPTF_MQTT_LGen_transportApiResponse(in EPTF_MQTT_Transport_Response pl_rsp)
f_EPTF_MQTT_LGen_send(inout EPTF_MQTT_PDU p_msg)
f_EPTF_MQTT_stack_fromApp(inout EPTF_MQTT_PDU p_msg, in MQTT_StepCtx p_ctx)
f_EPTF_MQTT_stack_fromEnv(inout EPTF_MQTT_PDU p_msg)
f_EPTF_MQTT_isFsmInitialized(in integer pl_eIdx, in integer pl_fsmIdx, inout integer pl_sessionIdx)
f_EPTF_MQTT_Logging_VERBOSE(in @lazy charstring pl_message)
f_EPTF_MQTT_Logging_DEBUG(in @lazy charstring pl_message)
f_EPTF_MQTT_Logging_WARNING(in @lazy charstring pl_message)
f_EPTF_MQTT_Logging_ERROR(in @lazy charstring pl_message)
f_EPTF_MQTT_dispatchEvent(in integer pl_eventIdx, in integer pl_eIdx, in integer pl_fsmCtx, in EPTF_IntegerList pl_reportedArgs)
}
@enduml
*****************************************************************/
///////////////////////////////////////////////////////////
// Type: EPTF_MQTT_LGen_CT
//
// Purpose:
// MQTT load generator component
//
// Class:
// (see EPTF_MQTT_LGen_Definitions.EPTF_MQTT_LGen_CT.jpg)
//
// Extensions:
// - <EPTF_LGenBase_CT>
// - <EPTF_MQTT_Transport_User_CT>
// - <EPTF_Logging_CT>
//
// Ports:
// -
//
// Timers:
// -
//
// Variables:
// v_MQTT_initialized - *boolean* - Flag to indicate that if init function was already called
// v_MQTT_bIdx - *integer* - Name of the NAS_EPS LGen component
// v_MQTT_loggingMaskId - *integer* - logging mask id
//
// v_MQTT_ctx - <MQTT_StepCtx> - collection of the most important pointers
// v_MQTT_session - <MQTT_Session> - temporary variable for a <MQTT_Session>
// v_MQTT_subscription - <MQTT_Subscription> - temporary variable for a <MQTT_Subscription>
// v_MQTT_publish - <MQTT_Publish> - temporary variable for a <MQTT_Publish>
//
// v_MQTT_msgToProcess - <EPTF_MQTT_PDU> - message to process
// v_MQTT_msgToSend - <EPTF_MQTT_PDU> - message to send
//
//
// vf_MQTT_msgReceived - <fcb_EPTF_MQTT_messageReceived> - Function hook for reporting received messages
//
// Instance databases:
// v_MQTT_addressDB - <MQTT_Address_DB> - address database of <Socket>
// v_MQTT_templateDB - <MQTT_Template_DB> - template database <MQTT_Template>
// v_MQTT_sessionDB - <MQTT_Session_DB> - MQTT session database of <MQTT_Session>
// v_MQTT_subscriptionDB - <MQTT_Subscription_DB> - MQTT subscription database of <MQTT_Subscription>
// v_MQTT_publishDB - <MQTT_Publish_DB> - MQTT publish database of <MQTT_Session>
//
// Related Functions:
// - <f_EPTF_MQTT_LGen_init> (*in charstring* pl_name)
// - <f_EPTF_MQTT_LGen_initLogging> ()
// - <f_MQTT_cleanUp> ()
// - <f_MQTT_eCtxBind> (*in integer* pl_eIdx)
// - <f_MQTT_eCtxUnbind> (*in integer* pl_eIdx)
// - <f_MQTT_eCtxReset> (*in integer* pl_eIdx)
// - <f_EPTF_MQTT_declareEvents> ()
// - <f_EPTF_MQTT_declareSteps> ()
// - <f_EPTF_MQTT_LGen_receiveMessage> (*in* <EPTF_MQTT_PDU> pl_message)
// - <f_EPTF_MQTT_LGen_receiveEvent> (*in* <ASP_Event> p_event)
// - <f_EPTF_MQTT_LGen_transportApiResponse> (*in* <EPTF_MQTT_Transport_Response> pl_rsp)
// - <f_EPTF_MQTT_LGen_send> (*inout* <EPTF_MQTT_PDU> p_msg)
// - <f_EPTF_MQTT_stack_fromApp> (*inout* <EPTF_MQTT_PDU> p_msg, *in* <MQTT_StepCtx> p_ctx)
// - <f_EPTF_MQTT_stack_fromEnv> (*inout* <EPTF_MQTT_PDU> p_msg)
// - <f_EPTF_MQTT_isFsmInitialized> (*in integer* pl_eIdx, *in integer* pl_fsmIdx, *inout integer* pl_sessionIdx)
// - <f_EPTF_MQTT_Logging_VERBOSE> (*in @lazy charstring* pl_message)
// - <f_EPTF_MQTT_Logging_DEBUG> (*in @lazy charstring* pl_message)
// - <f_EPTF_MQTT_Logging_WARNING> (*in @lazy charstring* pl_message)
// - <f_EPTF_MQTT_Logging_ERROR> (*in @lazy charstring* pl_message)
// - <f_EPTF_MQTT_dispatchEvent> (*in integer* pl_eventIdx, *in integer* pl_eIdx, *in integer* pl_fsmCtx, *in* <EPTF_IntegerList> pl_reportedArgs)
///////////////////////////////////////////////////////////
type component EPTF_MQTT_LGen_CT extends EPTF_MQTT_Transport_User_CT, EPTF_LGenBase_CT, EPTF_Logging_CT
{
var boolean v_MQTT_initialized := false;
var integer v_MQTT_bIdx;
var integer v_MQTT_loggingMaskId := -1;
var MQTT_Address_DB v_MQTT_addressDB;
var MQTT_Template_DB v_MQTT_templateDB;
var MQTT_Session_DB v_MQTT_sessionDB;
var MQTT_Subscription_DB v_MQTT_subscriptionDB;
var MQTT_Publish_DB v_MQTT_publishDB;
var MQTT_StepCtx v_MQTT_ctx := c_MQTT_StepCtx_empty;
var MQTT_Session v_MQTT_session := c_MQTT_Session_init;
var MQTT_Subscription v_MQTT_subscription := c_MQTT_Subscription_init;
var MQTT_Publish v_MQTT_publish := c_MQTT_Publish_init;
var EPTF_MQTT_PDU v_MQTT_msgToProcess;
var EPTF_MQTT_PDU v_MQTT_msgToSend;
var fcb_EPTF_MQTT_messageReceived vf_MQTT_msgReceived := null;
}
const integer c_MQTT_AppData_sessionIdx := 0;
// Events
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_transportSucc
//
// Purpose:
// Integer constant for the MQTT transport succesful indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_transportSucc := 0;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_transportSucc
//
// Purpose:
// Charstring constant for the MQTT transport succesful indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_transportSucc := "MQTT transport: succ rsp";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_transportFail
//
// Purpose:
// Integer constant for the MQTT transport fail indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_transportFail := 1;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_transportFail
//
// Purpose:
// Charstring constant for the MQTT transport fail indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_transportFail := "MQTT transport: fail rsp";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_transportEstablished
//
// Purpose:
// Integer constant for the MQTT transport established indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_transportEstablished := 2;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_transportEstablished
//
// Purpose:
// Charstring constant for the MQTT transport established indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_transportEstablished := "MQTT transport: connection established";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_transportClosed
//
// Purpose:
// Integer constant for the MQTT transport closed indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_transportClosed := 3;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_transportClosed
//
// Purpose:
// Charstring constant for the MQTT transport closed indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_transportClosed := "MQTT transport: connection closed";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_CONNACK_Accepted
//
// Purpose:
// Integer constant for the MQTT CONNACK accepted indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_CONNACK_Accepted := 4;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_CONNACK_Accepted
//
// Purpose:
// Charstring constant for the MQTT CONNACK accepted indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_CONNACK_Accepted := "MQTT rsp: CONNACK Accepted";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_CONNACK_Refused
//
// Purpose:
// Integer constant for the MQTT CONNACK refused indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_CONNACK_Refused := 5;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_CONNACK_Refused
//
// Purpose:
// Charstring constant for the MQTT CONNACK refused indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_CONNACK_Refused := "MQTT rsp: CONNACK Refused";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_SUBACK_Accepted
//
// Purpose:
// Integer constant for the MQTT SUBACK accepted indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_SUBACK_Accepted := 6;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_SUBACK_Accepted
//
// Purpose:
// Charstring constant for the MQTT SUBACK accepted indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_SUBACK_Accepted := "MQTT rsp: SUBACK Accepted";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_SUBACK_Refused
//
// Purpose:
// Integer constant for the MQTT SUBACK refused indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_SUBACK_Refused := 7;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_SUBACK_Refused
//
// Purpose:
// Charstring constant for the MQTT SUBACK refused indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_SUBACK_Refused := "MQTT rsp: SUBACK Refused";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_UNSUBACK
//
// Purpose:
// Integer constant for the MQTT UNSUBACK indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_UNSUBACK := 8;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_UNSUBACK
//
// Purpose:
// Charstring constant for the MQTT UNSUBACK indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_UNSUBACK := "MQTT rsp: UNSUBACK";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_PUBLISH
//
// Purpose:
// Integer constant for the MQTT PUBLISH indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_PUBLISH := 9;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_PUBLISH
//
// Purpose:
// Charstring constant for the MQTT PUBLISH indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_PUBLISH := "MQTT req: PUBLISH";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_PING_Request
//
// Purpose:
// Integer constant for the MQTT PING request indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_PING_Request := 10;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_PING_Request
//
// Purpose:
// Charstring constant for the MQTT PING request indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_PING_Request := "MQTT req: PING";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_PING_Response
//
// Purpose:
// Integer constant for the MQTT PING response indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_PING_Response := 11;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_PING_Response
//
// Purpose:
// Charstring constant for the MQTT PING response indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_PING_Response := "MQTT rsp: PING";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_PUBACK
//
// Purpose:
// Integer constant for the MQTT PUBACK indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_PUBACK := 12;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_PUBACK
//
// Purpose:
// Charstring constant for the MQTT PUBACK indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_PUBACK := "MQTT rsp: PUBACK";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_PUBREC
//
// Purpose:
// Integer constant for the MQTT PUBREC indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_PUBREC := 13;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_PUBREC
//
// Purpose:
// Charstring constant for the MQTT PUBREC indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_PUBREC := "MQTT rsp: PUBREC";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_PUBREL
//
// Purpose:
// Integer constant for the MQTT PUBREL indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_PUBREL := 14;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_PUBREL
//
// Purpose:
// Charstring constant for the MQTT PUBREL indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_PUBREL := "MQTT req: PUBREL";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_PUBCOMP
//
// Purpose:
// Integer constant for the MQTT PUBCOMP indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_PUBCOMP := 15;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_PUBCOMP
//
// Purpose:
// Charstring constant for the MQTT PUBCOMP indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_PUBCOMP := "MQTT rsp: PUBCOMP";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_PUBLISH_Timeout
//
// Purpose:
// Integer constant for the MQTT PUBLISH timeout indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_PUBLISH_Timeout := 16;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_PUBLISH_Timeout
//
// Purpose:
// Charstring constant for the MQTT PUBLISH timeout indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_PUBLISH_Timeout := "MQTT timeout: PUBLISH Timeout";
///////////////////////////////////////////////////////////
// const: c_MQTT_eventIdx_SUBSCRIBE_Timeout
//
// Purpose:
// Integer constant for the MQTT SUBSCRIBE timeout indication
///////////////////////////////////////////////////////////
const integer c_MQTT_eventIdx_SUBSCRIBE_Timeout := 17;
///////////////////////////////////////////////////////////
// const: c_MQTT_eventName_SUBSCRIBE_Timeout
//
// Purpose:
// Charstring constant for the MQTT SUBSCRIBE timeout indication
///////////////////////////////////////////////////////////
const charstring c_MQTT_eventName_SUBSCRIBE_Timeout := "MQTT timeout: SUBSCRIBE Timeout";
// Steps
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_init
//
// Purpose:
// Integer constant for the MQTT init test step
//
// Related Function:
// - <f_MQTT_step_init>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_init := 0;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_init
//
// Purpose:
// Charstring constant for the MQTT init test step
//
// Related Function:
// - <f_MQTT_step_init>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_init := "MQTT Applib: init";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_cleanUp
//
// Purpose:
// Integer constant for the MQTT clean up test step
//
// Related Function:
// - <f_MQTT_step_cleanUp>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_cleanUp := 1;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_cleanUp
//
// Purpose:
// Charstring constant for the MQTT clean up test step
//
// Related Function:
// - <f_MQTT_step_cleanUp>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_cleanUp := "MQTT Applib: cleanUp";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_setLocalAddress
//
// Purpose:
// Integer constant for the MQTT set local address
//
// Related Function:
// - <f_MQTT_step_setLocalAddress_byVars>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_setLocalAddress := 2;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_setLocalAddress
//
// Purpose:
// Integer constant for the MQTT set local address
//
// Related Function:
// - <f_MQTT_step_setLocalAddress>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_setLocalAddress := "MQTT Applib: setLocalAddress";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_setLocalAddress_byVars
//
// Purpose:
// Integer constant for the MQTT set local address by variables test step
//
// Related Function:
// - <f_MQTT_step_setLocalAddress_byVars>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_setLocalAddress_byVars := 3;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_setLocalAddress_byVars
//
// Purpose:
// Integer constant for the MQTT set local address by variables test step
//
// Related Function:
// - <f_MQTT_step_setLocalAddress_byVars>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_setLocalAddress_byVars := "MQTT Applib: setLocalAddress_byVars";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_setRemoteAddress
//
// Purpose:
// Integer constant for the MQTT set remote address
//
// Related Function:
// - <f_MQTT_step_setRemoteAddress>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_setRemoteAddress := 4;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_setRemoteAddress
//
// Purpose:
// Integer constant for the MQTT set remote address
//
// Related Function:
// - <f_MQTT_step_setRemoteAddress_byVars>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_setRemoteAddress := "MQTT Applib: setRemoteAddress";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_setRemoteAddress_byVars
//
// Purpose:
// Integer constant for the MQTT set remote address by variables test step
//
// Related Function:
// - <f_MQTT_step_setRemoteAddress_byVars>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_setRemoteAddress_byVars := 5;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_setRemoteAddress_byVars
//
// Purpose:
// Integer constant for the MQTT set remote address by variables test step
//
// Related Function:
// - <f_MQTT_step_setRemoteAddress_byVars>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_setRemoteAddress_byVars := "MQTT Applib: setRemoteAddress_byVars";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_transportConnect
//
// Purpose:
// Integer constant for the MQTT transport connect test step
//
// Related Function:
// - <f_MQTT_step_transportConnect>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_transportConnect := 6;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_transportConnect
//
// Purpose:
// Charstring constant for the MQTT transport connect test step
//
// Related Function:
// - <f_MQTT_step_transportConnect>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_transportConnect := "MQTT Applib: transportConnect";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_transportClose
//
// Purpose:
// Integer constant for the MQTT transport close test step
//
// Related Function:
// - <f_MQTT_step_transportClose>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_transportClose := 7;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_transportClose
//
// Purpose:
// Charstring constant for the MQTT transport close test step
//
// Related Function:
// - <f_MQTT_step_transportClose>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_transportClose := "MQTT Applib: transportClose";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_startListening
//
// Purpose:
// Integer constant for the MQTT start listening test step
//
// Related Function:
// - <f_MQTT_step_startListening>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_startListening := 8;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_startListening
//
// Purpose:
// Charstring constant for the MQTT start listening test step
//
// Related Function:
// - <f_MQTT_step_startListening>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_startListening := "MQTT Applib: startListening";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_loadTemplate_byIntIdx
//
// Purpose:
// Integer constant for the MQTT load template by integer idx pointer test step
//
// Related Function:
// - <f_MQTT_step_loadTemplate_byIntIdx>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_loadTemplate_byIntIdx := 9;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_loadTemplate_byIntIdx
//
// Purpose:
// Charstring constant for the MQTT load template by integer idx pointer test step
//
// Related Function:
// - <f_MQTT_step_loadTemplate_byIntIdx>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_loadTemplate_byIntIdx := "MQTT Applib: loadTemplate_byIntIdx";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_loadTemplate_byStringId
//
// Purpose:
// Integer constant for the MQTT load template by string id test step
//
// Related Function:
// - <f_MQTT_step_loadTemplate_byStringId>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_loadTemplate_byStringId := 10;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_loadTemplate_byStringId
//
// Purpose:
// Charstring constant for the MQTT load template by string id test step
//
// Related Function:
// - <f_MQTT_step_loadTemplate_byStringId>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_loadTemplate_byStringId := "MQTT Applib: loadTemplate_byStringId";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_send
//
// Purpose:
// Integer constant for the MQTT send test step
//
// Related Function:
// - <f_MQTT_step_send>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_send := 11;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_send
//
// Purpose:
// Charstring constant for the MQTT send test step
//
// Related Function:
// - <f_MQTT_step_send>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_send := "MQTT Applib: send";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_setTopic_stringParam
//
// Purpose:
// Integer constant for the MQTT set topic by string parameter test step
//
// Related Function:
// - <f_MQTT_step_setTopic_stringParam>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_setTopic_stringParam := 12;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_setTopic_stringParam
//
// Purpose:
// Charstring constant for the MQTT set topic by string parameter test step
//
// Related Function:
// - <f_MQTT_step_setTopic_stringParam>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_setTopic_stringParam := "MQTT Applib: setTopic_stringParam";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_setTopic_add_stringParam
//
// Purpose:
// Integer constant for the MQTT set topic by adding a string test step
//
// Related Function:
// - <f_MQTT_step_setTopic_add_stringParam>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_setTopic_add_stringParam := 13;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_setTopic_add_stringParam
//
// Purpose:
// Charstring constant for the MQTT set topic by adding a string test step
//
// Related Function:
// - <f_MQTT_step_setTopic_add_stringParam>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_setTopic_add_stringParam := "MQTT Applib: setTopic_add_stringParam";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_setTopic_add_varParams
//
// Purpose:
// Integer constant for the MQTT set topic by adding variable parameters test step
//
// Related Function:
// - <f_MQTT_step_setTopic_add_varParams>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_setTopic_add_varParams := 14;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_setTopic_add_varParams
//
// Purpose:
// Charstring constant for the MQTT set topic by adding variable parameters test step
//
// Related Function:
// - <f_MQTT_step_setTopic_add_varParams>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_setTopic_add_varParams := "MQTT Applib: setTopic_add_varParams";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_setTopic_add_clientId
//
// Purpose:
// Integer constant for the MQTT set topic by adding the client id test step
//
// Related Function:
// - <f_MQTT_step_setTopic_add_clientId>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_setTopic_add_clientId := 15;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_setTopic_add_clientId
//
// Purpose:
// Charstring constant for the MQTT set topic by adding the client id test step
//
// Related Function:
// - <f_MQTT_step_setTopic_add_clientId>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_setTopic_add_clientId := "MQTT Applib: setTopic_add_clientId";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_setQos_intParam
//
// Purpose:
// Integer constant for the MQTT set QoS using integer parameter test step
//
// Related Function:
// - <f_MQTT_step_setQos_intParam>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_setQos_intParam := 16;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_setQos_intParam
//
// Purpose:
// Charstring constant for the MQTT set QoS using integer parameter test step
//
// Related Function:
// - <f_MQTT_step_setQos_intParam>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_setQos_intParam := "MQTT Applib: setQos_intParam";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_setPublishMessage_stringParam
//
// Purpose:
// Integer constant for the MQTT set publish message using a string parameter test step
//
// Related Function:
// - <f_MQTT_step_setPublishMessage_stringParam>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_setPublishMessage_stringParam := 17;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_setPublishMessage_stringParam
//
// Purpose:
// Charstring constant for the MQTT set publish message using a string parameter test step
//
// Related Function:
// - <f_MQTT_step_setPublishMessage_stringParam>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_setPublishMessage_stringParam := "MQTT Applib: setPublishMessage_stringParam";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_setPublishMessage_add_stringParam
//
// Purpose:
// Integer constant for the MQTT set publish by adding a string parameter test step
//
// Related Function:
// - <f_MQTT_step_setPublishMessage_add_stringParam>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_setPublishMessage_add_stringParam := 18;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_setPublishMessage_add_stringParam
//
// Purpose:
// Charstring constant for the MQTT set publish by adding a string parameter test step
//
// Related Function:
// - <f_MQTT_step_setPublishMessage_add_stringParam>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_setPublishMessage_add_stringParam := "MQTT Applib: setPublishMessage_add_stringParam";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_setPublishMessage_add_varParams
//
// Purpose:
// Integer constant for the MQTT set publish by adding variable parameters test step
//
// Related Function:
// - <f_MQTT_step_setPublishMessage_add_varParams>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_setPublishMessage_add_varParams := 19;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_setPublishMessage_add_varParams
//
// Purpose:
// Charstring constant for the MQTT set publish by adding variable parameters test step
//
// Related Function:
// - <f_MQTT_step_setPublishMessage_add_varParams>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_setPublishMessage_add_varParams := "MQTT Applib: setPublishMessage_add_varParams";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_setPublishMessage_add_clientId
//
// Purpose:
// Integer constant for the MQTT set publish by adding the client id test step
//
// Related Function:
// - <f_MQTT_step_setPublishMessage_add_clientId>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_setPublishMessage_add_clientId := 20;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_setPublishMessage_add_clientId
//
// Purpose:
// Charstring constant for the MQTT set publish by adding the client id test step
//
// Related Function:
// - <f_MQTT_step_setPublishMessage_add_clientId>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_setPublishMessage_add_clientId := "MQTT Applib: setPublishMessage_add_clientId";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_reportPingResponse
//
// Purpose:
// Integer constant for the MQTT enabling/disabling the reporting of a ping response test step
//
// Related Function:
// - <f_MQTT_step_reportPingResponse>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_reportPingResponse := 21;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_reportPingResponse
//
// Purpose:
// Charstring constant for the MQTT enabling/disabling the reporting of a ping response test step
//
// Related Function:
// - <f_MQTT_step_reportPingResponse>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_reportPingResponse := "MQTT Applib: reportPingResponse";
///////////////////////////////////////////////////////////
// const: c_MQTT_stepIdx_reportPublishResponse
//
// Purpose:
// Integer constant for the MQTT enabling/disabling the reporting of a publish response test step
//
// Related Function:
// - <f_MQTT_step_reportPublishResponse>
///////////////////////////////////////////////////////////
const integer c_MQTT_stepIdx_reportPublishResponse := 22;
///////////////////////////////////////////////////////////
// const: c_MQTT_stepName_reportPublishResponse
//
// Purpose:
// Charstring constant for the MQTT enabling/disabling the reporting of a publish response test step
//
// Related Function:
// - <f_MQTT_step_reportPublishResponse>
///////////////////////////////////////////////////////////
const charstring c_MQTT_stepName_reportPublishResponse := "MQTT Applib: reportPublishResponse";
}