This module contains the functions of the MQTT local transport component
EPTF_MQTT_LocalTransport_Definitions
| EPTF_MQTT_LocalTransport_Functions | This module contains the functions of the MQTT local transport component |
| f_EPTF_MQTT_LocalTransport_init | The main initialization function of the <EPTF_MQTT_LocalTransport_CT> component type |
| f_EPTF_MQTT_LocalTransport_initLogging | Initializing CLL’s logging feature on the <EPTF_MQTT_LocalTransport_CT> component type |
| f_EPTF_MQTT_LocalTransport_cleanup | The main clean up function for the <EPTF_MQTT_LocalTransport_CT> component type |
| f_EPTF_MQTT_IPL4asp_handleEvent | Handler function to be registered into the IPL4 transport layer <EPTF_CLL_TransportIPL4_Functions>. |
| f_EPTF_MQTT_IPL4asp_handleMessage | Handler function to be regisitered into the IPL4 transport layer <EPTF_CLL_TransportIPL4_Functions>. |
| f_EPTF_MQTT_LocalTransport_send | Function to send out a EPTF_MQTT_PDU message using the local transport. |
| f_EPTF_MQTT_LocalTransport_transportApiRequest | Function to handle incoming transport API requests |
| f_EPTF_MQTT_LocalTransport_sendApiResponse | Function to handle incoming transport API requests |
| f_EPTF_MQTT_LocalTransport_startListening | Start listening on a local TCP socket and store its data and state in socketDB |
| f_EPTF_MQTT_LocalTransport_connect | Open a TCP connection and store its data and state in socketDB |
| f_EPTF_MQTT_LocalTransport_close | Close a TCP connection and remove its entry from the socketDB |
| f_EPTF_MQTT_LocalTransport_IPL4_send | Send a message and add 1 message and its length to MQTT transport stats variable |
| f_EPTF_MQTT_LocalTransport_socketDB_init | Initializes the v_MQTT_LocalTransport_localSocketDB <SocketDB> database |
| f_EPTF_MQTT_LocalTransport_socketDB_cleanUp | Cleans up the reserved resources of the v_MQTT_LocalTransport_localSocketDB <SocketDB> database |
| f_EPTF_MQTT_LocalTransport_socketDB_add | Adds a new element to the v_MQTT_LocalTransport_localSocketDB <SocketDB> database |
| f_EPTF_MQTT_LocalTransport_socketDB_lookUp | Gets the index of an <SocketEntry> element in v_MQTT_LocalTransport_localSocketDB <SocketDB> database based on its socket data |
| f_EPTF_MQTT_LocalTransport_socketDB_lookUp_connId | Gets the index of an <SocketEntry> element in v_MQTT_LocalTransport_localSocketDB <SocketDB> database based on its connection id |
| f_EPTF_MQTT_LocalTransport_socketDB_get | Retrieves an element from the v_MQTT_LocalTransport_localSocketDB <SocketDB> database |
| f_EPTF_MQTT_LocalTransport_socketDB_remove | Removes an element from the v_MQTT_LocalTransport_localSocketDB <SocketDB> database and frees up its reserved resources |
| f_EPTF_MQTT_Socket2String | Converts socket data from <Socket> type to the format “<hostname>:<port number>” |
| f_MQTT_Transport_Logging_VERBOSE | Logging functions for the VERBOSE log level |
| f_MQTT_Transport_Logging_DEBUG | Logging functions for the DEBUG log level |
| f_MQTT_Transport_Logging_WARNING | Logging functions for the WARNING log level |
| f_MQTT_Transport_Logging_ERROR | Logging functions for the ERROR log level |
| f_EPTF_MQTT_IPL4asp_handleResult | Checks the result of an IPL4 transport operation and records an MQTT transport stats warning if unsuccessful |
function f_EPTF_MQTT_IPL4asp_handleEvent( in EPTF_Transport_TransportType pl_transportType, in ConnectionId pl_connId, in PortEvent pl_event ) runs on EPTF_MQTT_LocalTransport_CT
Handler function to be registered into the IPL4 transport layer <EPTF_CLL_TransportIPL4_Functions>. It is used to receieve transport events from the underlying IPL4 transport layer. The function currently handles the connection closed event and forwards every event to the load generator layer’s handler function.
<EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_IPL4asp_handleMessage( in EPTF_Transport_TransportType pl_transportType, in ConnectionId pl_connId, in HostName pl_remHost, in PortNumber pl_remPort, in HostName pl_locHost, in PortNumber pl_locPort, in ProtoTuple pl_proto, in integer pl_userData, in octetstring pl_msg ) runs on EPTF_MQTT_LocalTransport_CT
Handler function to be regisitered into the IPL4 transport layer <EPTF_CLL_TransportIPL4_Functions>. It is used to receieve MQTT messages from the underlying IPL4 transport layer. The function looks up the entity that owns the particular connection and forwards the message and the entity information to the load generator layer
<EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_LocalTransport_send( in EPTF_MQTT_PDU pl_msg ) runs on EPTF_MQTT_LocalTransport_CT
Function to send out a EPTF_MQTT_PDU message using the local transport. It automatically looks up the corresponding <Socket> or creates it on the fly if it doesn’t exist yet
| pl_msg | in EPTF_MQTT_PDU - message to be sent |
<EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_LocalTransport_transportApiRequest( EPTF_MQTT_Transport_Request pl_req ) runs on EPTF_MQTT_LocalTransport_CT
Function to handle incoming transport API requests
| pl_req | in EPTF_MQTT_Transport_Request - transport API request |
<EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_LocalTransport_sendApiResponse( EPTF_MQTT_Transport_Response pl_rsp ) runs on EPTF_MQTT_LocalTransport_CT
Function to handle incoming transport API requests
| pl_rsp | in EPTF_MQTT_Transport_Response - transport API response |
<EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_LocalTransport_startListening( in Socket p_local, in integer p_sessionIdx, inout integer p_idx ) runs on EPTF_MQTT_LocalTransport_CT return boolean
Start listening on a local TCP socket and store its data and state in socketDB
| p_local | in <Socket> - local socket |
| p_sessionIdx | in integer - session Id stored with the socket data in socketDB |
| p_idx | inout integer - the index of the added element in the database |
| *boolean* | was the operation succesful? |
<EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_LocalTransport_connect( in Socket p_local, in Socket p_remote, in integer p_sessionIdx, inout integer p_idx ) runs on EPTF_MQTT_LocalTransport_CT return boolean
Open a TCP connection and store its data and state in socketDB
| p_local | in <Socket> - local socket |
| p_remote | in <Socket> - remote socket |
| pl_sessionIdx | in integer - session Id stored with the connection data in socketDB |
| p_idx | inout integer - the index of the added element in the database |
| *boolean* | was the operation succesful? |
<EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_LocalTransport_close( in integer p_socketIdx ) runs on EPTF_MQTT_LocalTransport_CT return boolean
Close a TCP connection and remove its entry from the socketDB
| p_socketIdx | in integer - the index of the connection in socketDB to be closed |
| *boolean* | was the operation succesful? |
<EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_LocalTransport_IPL4_send( in integer pl_connId, in charstring pl_remName, in integer pl_remPort, in ProtoTuple pl_proto, in octetstring pl_msg ) runs on EPTF_MQTT_LocalTransport_CT
Send a message and add 1 message and its length to MQTT transport stats variable
| pl_connId | in integer - connection Id |
| pl_remName | in charstring - name of the remote host |
| pl_remPort | in integer - remote port number |
| pl_proto | in <ProtoTuple> - type of protocol of the connection |
| pl_msg | in octetstring - message to be sent |
<EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_LocalTransport_socketDB_add( in SocketEntry p_sock ) runs on EPTF_MQTT_LocalTransport_CT return integer
Adds a new element to the v_MQTT_LocalTransport_localSocketDB <SocketDB> database
| p_sock | in <SocketEntry> - the element to be added |
| *integer* | the index of the added element in the database |
<SocketDB> <EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_LocalTransport_socketDB_lookUp( in Socket p_sock ) runs on EPTF_MQTT_LocalTransport_CT return integer
Gets the index of an <SocketEntry> element in v_MQTT_LocalTransport_localSocketDB <SocketDB> database based on its socket data
| p_sock | in <Socket> - socket data of the element to be found |
| *integer* | the index of the element, or -1 if not found |
<SocketDB> <EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_LocalTransport_socketDB_lookUp_connId( in integer p_connId ) runs on EPTF_MQTT_LocalTransport_CT return integer
Gets the index of an <SocketEntry> element in v_MQTT_LocalTransport_localSocketDB <SocketDB> database based on its connection id
| p_connId | in integer - the connection id |
| *integer* | the index of the element, or -1 if not found |
<SocketDB> <EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_LocalTransport_socketDB_get( in integer p_idx, inout SocketEntry p_sock ) runs on EPTF_MQTT_LocalTransport_CT return boolean
Retrieves an element from the v_MQTT_LocalTransport_localSocketDB <SocketDB> database
| p_idx | in integer - the index of the element to be retrieved |
| p_sock | inout <SocketEntry> - the retrieved element |
| boolean | was the operation successful? |
<SocketDB> <EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_LocalTransport_socketDB_remove( in integer p_idx ) runs on EPTF_MQTT_LocalTransport_CT
Removes an element from the v_MQTT_LocalTransport_localSocketDB <SocketDB> database and frees up its reserved resources
| p_idx | in integer - the index of the element to be removed |
<SocketDB> <EPTF_MQTT_LocalTransport_CT>
function f_EPTF_MQTT_IPL4asp_handleResult( inout Result p_res ) runs on EPTF_MQTT_LocalTransport_CT return boolean
Checks the result of an IPL4 transport operation and records an MQTT transport stats warning if unsuccessful
| p_res | inout Result - result of an IPL4 transport operation |
| boolen | true: no error or “Temporary unavailable”, false: error different from “Temporary unavailable” |
<EPTF_MQTT_LocalTransport_CT>
The main initialization function of the EPTF_MQTT_LocalTransport_CT component type
function f_EPTF_MQTT_LocalTransport_init() runs on EPTF_MQTT_LocalTransport_CT
Initializing CLL’s logging feature on the EPTF_MQTT_LocalTransport_CT component type
function f_EPTF_MQTT_LocalTransport_initLogging() runs on EPTF_MQTT_LocalTransport_CT
The main clean up function for the EPTF_MQTT_LocalTransport_CT component type
function f_EPTF_MQTT_LocalTransport_cleanup() runs on EPTF_MQTT_LocalTransport_CT
Handler function to be registered into the IPL4 transport layer EPTF_CLL_TransportIPL4_Functions.
function f_EPTF_MQTT_IPL4asp_handleEvent( in EPTF_Transport_TransportType pl_transportType, in ConnectionId pl_connId, in PortEvent pl_event ) runs on EPTF_MQTT_LocalTransport_CT
Handler function to be regisitered into the IPL4 transport layer EPTF_CLL_TransportIPL4_Functions.
function f_EPTF_MQTT_IPL4asp_handleMessage( in EPTF_Transport_TransportType pl_transportType, in ConnectionId pl_connId, in HostName pl_remHost, in PortNumber pl_remPort, in HostName pl_locHost, in PortNumber pl_locPort, in ProtoTuple pl_proto, in integer pl_userData, in octetstring pl_msg ) runs on EPTF_MQTT_LocalTransport_CT
Function to send out a EPTF_MQTT_PDU message using the local transport.
function f_EPTF_MQTT_LocalTransport_send( in EPTF_MQTT_PDU pl_msg ) runs on EPTF_MQTT_LocalTransport_CT
Encapsulates a MQTT PDU with the corresponding entity (and FSM) indices and transport information
type record EPTF_MQTT_PDU
Function to handle incoming transport API requests
function f_EPTF_MQTT_LocalTransport_transportApiRequest( EPTF_MQTT_Transport_Request pl_req ) runs on EPTF_MQTT_LocalTransport_CT
Function to handle incoming transport API requests
function f_EPTF_MQTT_LocalTransport_sendApiResponse( EPTF_MQTT_Transport_Response pl_rsp ) runs on EPTF_MQTT_LocalTransport_CT
Start listening on a local TCP socket and store its data and state in socketDB
function f_EPTF_MQTT_LocalTransport_startListening( in Socket p_local, in integer p_sessionIdx, inout integer p_idx ) runs on EPTF_MQTT_LocalTransport_CT return boolean
Open a TCP connection and store its data and state in socketDB
function f_EPTF_MQTT_LocalTransport_connect( in Socket p_local, in Socket p_remote, in integer p_sessionIdx, inout integer p_idx ) runs on EPTF_MQTT_LocalTransport_CT return boolean
Close a TCP connection and remove its entry from the socketDB
function f_EPTF_MQTT_LocalTransport_close( in integer p_socketIdx ) runs on EPTF_MQTT_LocalTransport_CT return boolean
Send a message and add 1 message and its length to MQTT transport stats variable
function f_EPTF_MQTT_LocalTransport_IPL4_send( in integer pl_connId, in charstring pl_remName, in integer pl_remPort, in ProtoTuple pl_proto, in octetstring pl_msg ) runs on EPTF_MQTT_LocalTransport_CT
Initializes the v_MQTT_LocalTransport_localSocketDB SocketDB database
function f_EPTF_MQTT_LocalTransport_socketDB_init() runs on EPTF_MQTT_LocalTransport_CT
Cleans up the reserved resources of the v_MQTT_LocalTransport_localSocketDB SocketDB database
function f_EPTF_MQTT_LocalTransport_socketDB_cleanUp() runs on EPTF_MQTT_LocalTransport_CT
Adds a new element to the v_MQTT_LocalTransport_localSocketDB SocketDB database
function f_EPTF_MQTT_LocalTransport_socketDB_add( in SocketEntry p_sock ) runs on EPTF_MQTT_LocalTransport_CT return integer
Gets the index of an SocketEntry element in v_MQTT_LocalTransport_localSocketDB SocketDB database based on its socket data
function f_EPTF_MQTT_LocalTransport_socketDB_lookUp( in Socket p_sock ) runs on EPTF_MQTT_LocalTransport_CT return integer
Gets the index of an SocketEntry element in v_MQTT_LocalTransport_localSocketDB SocketDB database based on its connection id
function f_EPTF_MQTT_LocalTransport_socketDB_lookUp_connId( in integer p_connId ) runs on EPTF_MQTT_LocalTransport_CT return integer
Retrieves an element from the v_MQTT_LocalTransport_localSocketDB SocketDB database
function f_EPTF_MQTT_LocalTransport_socketDB_get( in integer p_idx, inout SocketEntry p_sock ) runs on EPTF_MQTT_LocalTransport_CT return boolean
Removes an element from the v_MQTT_LocalTransport_localSocketDB SocketDB database and frees up its reserved resources
function f_EPTF_MQTT_LocalTransport_socketDB_remove( in integer p_idx ) runs on EPTF_MQTT_LocalTransport_CT
Converts socket data from Socket type to the format “hostname:<port number>”
function f_EPTF_MQTT_Socket2String( Socket p_sock ) return charstring
Logging functions for the VERBOSE log level
function f_MQTT_Transport_Logging_VERBOSE( in @lazy charstring pl_message ) runs on EPTF_MQTT_LocalTransport_CT
Logging functions for the DEBUG log level
function f_MQTT_Transport_Logging_DEBUG( in @lazy charstring pl_message ) runs on EPTF_MQTT_LocalTransport_CT
Logging functions for the WARNING log level
function f_MQTT_Transport_Logging_WARNING( in @lazy charstring pl_message ) runs on EPTF_MQTT_LocalTransport_CT
Logging functions for the ERROR log level
function f_MQTT_Transport_Logging_ERROR( in @lazy charstring pl_message ) runs on EPTF_MQTT_LocalTransport_CT
Checks the result of an IPL4 transport operation and records an MQTT transport stats warning if unsuccessful
function f_EPTF_MQTT_IPL4asp_handleResult( inout Result p_res ) runs on EPTF_MQTT_LocalTransport_CT return boolean
Type for transport request
type record EPTF_MQTT_Transport_Request
Type for transport response
type record EPTF_MQTT_Transport_Response