blob: f8f3f4a31b100415d7f1508af5fca39603880d9d [file] [log] [blame]
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>IOT_LGen_Definitions - Massive IoT Test Tools</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script></head><body class="FramedContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version 1.52 -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="IOT_LGen_Definitions"></a>IOT_LGen_Definitions</h1><div class=CBody><h4 class=CHeading>Purpose</h4><p>This module contains the definitions for an IoT load generator component</p><h4 class=CHeading>Detailed comments</h4><p>RIoT is a load generator built on top of the TitanSim load generator framework.&nbsp; It is capable of simulating devices using some IoT protocols (CoAP, LwM2M, MQTT, HTTP).&nbsp; RIoT (and the TitanSim framework) was created to support non-functional tests, where load generation is required like performance, stability, scalability.</p><h4 class=CHeading>Events, TestSteps</h4><p><a href="IOT_LGen_Steps-ttcn.html#IOT_LGen_Steps" class=LFile id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">IOT_LGen_Steps</a></p><h4 class=CHeading>Module Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>tsp_IOT_LGen_FSMs</td><td class=CDLDescription>&lt;EPTF_LGenBase_FsmTableDeclaratorList&gt; - FSM declarations that can be instantiated for the traffic cases</td></tr></table><h4 class=CHeading>Module depends on</h4><ul><li>&lt;EPTF_MQTT_LGen_Definitions&gt;</li><li>&lt;EPTF_MQTT_LocalTransport_Definitions&gt;</li><li>&lt;EPTF_COAP_LGen_Definitions&gt;</li><li>&lt;EPTF_COAP_LocalTransport_Definitions&gt;</li><li>&lt;EPTF_LwM2M_LGen_Definitions&gt;</li><li>&lt;EPTF_LwM2M_CoapApplibTransport_Definitions&gt;</li><li>&lt;EPTF_LwM2M_Object_Definitions&gt;</li><li>&lt;EPTF_HTTP_Definitions&gt;</li><li>&lt;EPTF_HTTP_Transport_Definitions&gt;</li><li>&lt;EPTF_CLL_LGenBase_Definitions&gt;</li><li>&lt;EPTF_CLL_LGenBase_ConfigDefinitions&gt;</li><li>&lt;EPTF_CLL_ExecCtrl_Definitions&gt;</li></ul><h4 class=CHeading>Component Diagram</h4><img src="../images/IOT_App_Definitions.components.jpg"><h4 class=CHeading>Related Types</h4><ul><li><a href="IOT_App_Definitions-ttcn.html#IOT_App_CT" class=LType id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">IOT_App_CT</a></li><li><a href="#IOT_LGen_CT" class=LType id=link6 onMouseOver="ShowTip(event, 'tt3', 'link6')" onMouseOut="HideTip('tt3')">IOT_LGen_CT</a></li><li>&lt;EPTF_ExecCtrl_CT&gt;</li></ul><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#IOT_LGen_Definitions" >IOT_LGen_Definitions</a></td><td class=SDescription>This module contains the definitions for an IoT load generator component</td></tr><tr class="SModuleParameter SMarked"><td class=SEntry><a href="#tsp_IOT_LGen_FSMs" >tsp_IOT_LGen_FSMs</a></td><td class=SDescription>FSM declarations that can be instantiated for the traffic cases</td></tr><tr class="SConstant"><td class=SEntry><a href="#c_IOT_entityType" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">c_IOT_entityType</a></td><td class=SDescription>Constant for the simulated IoT entity type</td></tr><tr class="SConstant SMarked"><td class=SEntry><a href="#c_IOT_behaviorType" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">c_IOT_behaviorType</a></td><td class=SDescription>Constant for the simulated IoT behavior type</td></tr><tr class="SType"><td class=SEntry><a href="#IOT_LGen_CT" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">IOT_LGen_CT</a></td><td class=SDescription>IoT load generator component</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>
<div class="CModuleParameter"><div class=CTopic><h3 class=CTitle><a name="tsp_IOT_LGen_FSMs"></a>tsp_IOT_LGen_FSMs</h3><div class=CBody><h4 class=CHeading>Purpose</h4><p>FSM declarations that can be instantiated for the traffic cases</p><h4 class=CHeading>Type</h4><p>&lt;EPTF_LGenBase_FsmTableDeclaratorList&gt;</p></div></div></div>
<div class="CConstant"><div class=CTopic><h3 class=CTitle><a name="c_IOT_entityType"></a>c_IOT_entityType</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">const charstring c_IOT_entityType := &quot;IOT_Entity&quot;</td></tr></table></blockquote><h4 class=CHeading>Purpose</h4><p>Constant for the simulated IoT entity type</p></div></div></div>
<div class="CConstant"><div class=CTopic><h3 class=CTitle><a name="c_IOT_behaviorType"></a>c_IOT_behaviorType</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">const charstring c_IOT_behaviorType := &quot;IOT_Behavior&quot;</td></tr></table></blockquote><h4 class=CHeading>Purpose</h4><p>Constant for the simulated IoT behavior type</p></div></div></div>
<div class="CType"><div class=CTopic><h3 class=CTitle><a name="IOT_LGen_CT"></a>IOT_LGen_CT</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">type component IOT_LGen_CT</td></tr></table></blockquote><h4 class=CHeading>Purpose</h4><p>IoT load generator component</p><h4 class=CHeading>Class</h4><p>(see EPTF_COAP_LGen_Definitions.EPTF_COAP_LGen_CT.jpg)</p><h4 class=CHeading>Extensions</h4><ul><li>&lt;EPTF_LGenBase_CT&gt;</li><li>&lt;EPTF_ExecCtrlClient_CT&gt;</li><li>&lt;EPTF_MQTT_LGen_CT&gt;</li><li>&lt;EPTF_MQTT_LocalTransport_CT&gt;</li><li>&lt;EPTF_COAP_LGen_CT&gt;</li><li>&lt;EPTF_COAP_LocalTransport_CT&gt;</li><li>&lt;EPTF_LwM2M_LGen_CT&gt;</li><li>&lt;EPTF_LwM2M_CoapApplibTransport_CT&gt;</li><li>&lt;EPTF_HTTP_LGen_CT&gt;</li><li>&lt;EPTF_HTTP_LocalTransport_CT&gt;</li><li>&lt;InfluxDB_CT&gt;</li></ul><h4 class=CHeading>Variables</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>v_IOT_LGen_name</td><td class=CDLDescription><b>charstring</b> - name of the current load generator instance</td></tr><tr><td class=CDLEntry>v_IOT_LGen_idx</td><td class=CDLDescription><b>integer</b> - unique index of the current load generator instance</td></tr><tr><td class=CDLEntry>v_IOT_bIdx</td><td class=CDLDescription><b>integer</b> - id of the IOT behavior defined by RIoT</td></tr><tr><td class=CDLEntry>v_IOT_LGen_loggingMaskId</td><td class=CDLDescription><b>integer</b> - id for RioT logging functions</td></tr></table><h4 class=CHeading>Instance databases</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>v_IOT_LGen_DataSamples_DB</td><td class=CDLDescription>&lt;LwM2M_DataSamples_DB&gt; - Storing data samples for LwM2M smart objects</td></tr></table><h4 class=CHeading>Events, TestSteps</h4><p><a href="IOT_LGen_Steps-ttcn.html#IOT_LGen_Steps" class=LFile id=link7 onMouseOver="ShowTip(event, 'tt4', 'link7')" onMouseOut="HideTip('tt4')">IOT_LGen_Steps</a></p><h4 class=CHeading>Related Functions</h4><ul><li><a href="IOT_LGen_Functions-ttcn.html#f_IOT_LGen_init" class=LFunction id=link8 onMouseOver="ShowTip(event, 'tt6', 'link8')" onMouseOut="HideTip('tt6')">f_IOT_LGen_init</a> (in <b>charstring</b> pl_selfName, in <b>integer</b> p_idx, in &lt;EPTF_ExecCtrl_CT&gt; pl_ExecCtrlRef)</li><li><a href="IOT_LGen_Functions-ttcn.html#f_IOT_LGen_initSamples" class=LFunction id=link9 onMouseOver="ShowTip(event, 'tt7', 'link9')" onMouseOut="HideTip('tt7')">f_IOT_LGen_initSamples</a> (in <b>charstring</b> p_selfName)</li><li><a href="InfluxDB_Functions-ttcn.html#f_IOT_LGen_behavior" class=LFunction id=link10 onMouseOver="ShowTip(event, 'tt8', 'link10')" onMouseOut="HideTip('tt8')">f_IOT_LGen_behavior</a> (in <b>charstring</b> pl_selfName, in <b>integer</b> p_idx, in &lt;EPTF_ExecCtrl_CT&gt; pl_ExecCtrlRef)</li><li><a href="IOT_LGen_Functions-ttcn.html#f_IOT_LGen_Logging_VERBOSE" class=LFunction id=link11 onMouseOver="ShowTip(event, 'tt9', 'link11')" onMouseOut="HideTip('tt9')">f_IOT_LGen_Logging_VERBOSE</a> (in @lazy <b>charstring</b> pl_message)</li><li><a href="IOT_LGen_Functions-ttcn.html#f_IOT_LGen_Logging_DEBUG" class=LFunction id=link12 onMouseOver="ShowTip(event, 'tt10', 'link12')" onMouseOut="HideTip('tt10')">f_IOT_LGen_Logging_DEBUG</a> (in @lazy <b>charstring</b> pl_message)</li><li><a href="IOT_LGen_Functions-ttcn.html#f_IOT_LGen_Logging_WARNING" class=LFunction id=link13 onMouseOver="ShowTip(event, 'tt11', 'link13')" onMouseOut="HideTip('tt11')">f_IOT_LGen_Logging_WARNING</a> (in @lazy <b>charstring</b> pl_message)</li><li><a href="IOT_LGen_Functions-ttcn.html#f_IOT_LGen_Logging_ERROR" class=LFunction id=link14 onMouseOver="ShowTip(event, 'tt12', 'link14')" onMouseOut="HideTip('tt12')">f_IOT_LGen_Logging_ERROR</a> (in @lazy <b>charstring</b> pl_message)</li><li><a href="IOT_LGen_Functions-ttcn.html#f_IOT_COAP_LocalTransport_send" class=LFunction id=link15 onMouseOver="ShowTip(event, 'tt13', 'link15')" onMouseOut="HideTip('tt13')">f_IOT_COAP_LocalTransport_send</a> (in &lt;EPTF_COAP_PDU&gt; pl_msg)</li><li><a href="IOT_LGen_Functions-ttcn.html#f_IOT_COAP_LGen_receiveMessage" class=LFunction id=link16 onMouseOver="ShowTip(event, 'tt14', 'link16')" onMouseOut="HideTip('tt14')">f_IOT_COAP_LGen_receiveMessage</a> (in &lt;EPTF_COAP_PDU&gt; pl_message)</li><li>&lt;f_EPTF_COAP_PDU_to_Influx&gt; ()</li></ul></div></div></div>
</div><!--Content-->
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CConstant><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">const charstring c_IOT_entityType := &quot;IOT_Entity&quot;</td></tr></table></blockquote>Constant for the simulated IoT entity type</div></div><div class=CToolTip id="tt2"><div class=CConstant><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">const charstring c_IOT_behaviorType := &quot;IOT_Behavior&quot;</td></tr></table></blockquote>Constant for the simulated IoT behavior type</div></div><div class=CToolTip id="tt3"><div class=CType><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">type component IOT_LGen_CT</td></tr></table></blockquote>IoT load generator component</div></div><div class=CToolTip id="tt4"><div class=CFile>This module contains test step functions for an IoT load generator component</div></div><div class=CToolTip id="tt5"><div class=CType><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">type component IOT_App_CT extends EPTF_Base_CT, EPTF_DsRestAPI_CT</td></tr></table></blockquote>RIoT application&rsquo;s main component providing a REST API to the environment</div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "colspan=4>function f_IOT_LGen_init(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PTypePrefix prettyprint " nowrap>in&nbsp;</td><td class="PType prettyprint " nowrap>charstring&nbsp;</td><td class="PParameter prettyprint " nowrap width=100%>pl_selfName,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PTypePrefix prettyprint " nowrap>in&nbsp;</td><td class="PType prettyprint " nowrap>integer&nbsp;</td><td class="PParameter prettyprint " nowrap width=100%>p_idx,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PTypePrefix prettyprint " nowrap>in&nbsp;</td><td class="PType prettyprint " nowrap>EPTF_ExecCtrl_CT&nbsp;</td><td class="PParameter prettyprint " nowrap width=100%>pl_ExecCtrlRef</td></tr><tr><td class="PAfterParameters prettyprint "colspan=4>) runs on IOT_LGen_CT</td></tr></table></td></tr></table></blockquote>The main init function of the IOT_LGen_CT component type It initializes the integrated application libraries and defines its own c_IOT_behaviorType and test steps f_IOT_LGen_declareSteps The sample database of the smart objects are also filled in here by calling f_IOT_LGen_initSamples</div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "nowrap>function f_IOT_LGen_initSamples(</td><td class="PTypePrefix prettyprint " nowrap>in&nbsp;</td><td class="PType prettyprint " nowrap>charstring&nbsp;</td><td class="PParameter prettyprint " nowrap>p_selfName</td><td class="PAfterParameters prettyprint "nowrap>) runs on IOT_LGen_CT</td></tr></table></td></tr></table></blockquote>Initializes the <b>v_IOT_LGen_DataSamples_DB</b> database by loading a set of data samples</div></div><div class=CToolTip id="tt8"><div class=CFunction>The main initialization function for the InfluxDB_CT component type</div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "colspan=4>function f_IOT_LGen_Logging_VERBOSE(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PTypePrefix prettyprint " nowrap>in @lazy&nbsp;</td><td class="PType prettyprint " nowrap>charstring&nbsp;</td><td class="PParameter prettyprint " nowrap width=100%>pl_message</td></tr><tr><td class="PAfterParameters prettyprint "colspan=4>) runs on IOT_LGen_CT</td></tr></table></td></tr></table></blockquote>Logging functions for the VERBOSE log level</div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "colspan=4>function f_IOT_LGen_Logging_DEBUG(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PTypePrefix prettyprint " nowrap>in @lazy&nbsp;</td><td class="PType prettyprint " nowrap>charstring&nbsp;</td><td class="PParameter prettyprint " nowrap width=100%>pl_message</td></tr><tr><td class="PAfterParameters prettyprint "colspan=4>) runs on IOT_LGen_CT</td></tr></table></td></tr></table></blockquote>Logging functions for the DEBUG log level</div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "colspan=4>function f_IOT_LGen_Logging_WARNING(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PTypePrefix prettyprint " nowrap>in @lazy&nbsp;</td><td class="PType prettyprint " nowrap>charstring&nbsp;</td><td class="PParameter prettyprint " nowrap width=100%>pl_message</td></tr><tr><td class="PAfterParameters prettyprint "colspan=4>) runs on IOT_LGen_CT</td></tr></table></td></tr></table></blockquote>Logging functions for the WARNING log level</div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "colspan=4>function f_IOT_LGen_Logging_ERROR(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PTypePrefix prettyprint " nowrap>in @lazy&nbsp;</td><td class="PType prettyprint " nowrap>charstring&nbsp;</td><td class="PParameter prettyprint " nowrap width=100%>pl_message</td></tr><tr><td class="PAfterParameters prettyprint "colspan=4>) runs on IOT_LGen_CT</td></tr></table></td></tr></table></blockquote>Logging functions for the ERROR log level</div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "colspan=4>function f_IOT_COAP_LocalTransport_send(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PTypePrefix prettyprint " nowrap>in&nbsp;</td><td class="PType prettyprint " nowrap>EPTF_COAP_PDU&nbsp;</td><td class="PParameter prettyprint " nowrap width=100%>pl_msg</td></tr><tr><td class="PAfterParameters prettyprint "colspan=4>) runs on IOT_LGen_CT</td></tr></table></td></tr></table></blockquote>Wrapper of f_IOT_COAP_LocalTransport_send, used for catching outgoing COAP messages.</div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters prettyprint "colspan=4>function f_IOT_COAP_LGen_receiveMessage(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PTypePrefix prettyprint " nowrap>in&nbsp;</td><td class="PType prettyprint " nowrap>EPTF_COAP_PDU&nbsp;</td><td class="PParameter prettyprint " nowrap width=100%>pl_message</td></tr><tr><td class="PAfterParameters prettyprint "colspan=4>) runs on IOT_LGen_CT</td></tr></table></td></tr></table></blockquote>Wrapper of f_EPTF_COAP_LGen_receiveMessage, used for catching and incoming COAP messages.</div></div><!--END_ND_TOOLTIPS-->
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>