Loading LibIot/LibIot_Functions.ttcn +4 −4 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ module LibIot_Functions { } import from LibIot_TestInterface { type TestCoordinator, TestDriver, TestMonitor, TestOracle, OracleClient; type TestCoordinator, EutTrigger, InterfaceMonitor, OracleServer, OracleClient; } Loading Loading @@ -50,7 +50,7 @@ module LibIot_Functions { * @desc evaluate the test verdict and sets it correspondingly * @param p_verdict the verdict received */ function f_setIOTVerdict(in IOTVerdict p_verdict) runs on TestOracle { function f_setIOTVerdict(in IOTVerdict p_verdict) runs on OracleServer { if (ischosen(p_verdict.e2e)) { setverdict(p_verdict.e2e); } else if (PX_CONFOMANCE_CHECK) { Loading @@ -62,7 +62,7 @@ module LibIot_Functions { * @desc listens continously on the port for receiving verdict * @param p_idx index of the port */ altstep a_receiveIOTVerdict() runs on TestOracle { altstep a_receiveIOTVerdict() runs on OracleServer { var IOTVerdict v_verdict; [] vPort.receive(IOTVerdict:?) -> value v_verdict { f_setIOTVerdict(v_verdict); Loading @@ -72,7 +72,7 @@ module LibIot_Functions { } group triggerFunctions { function f_sendTriggerCmd(in TriggerCommand p_cmd, in ParameterList p_params) runs on TestDriver { function f_sendTriggerCmd(in TriggerCommand p_cmd, in ParameterList p_params) runs on EutTrigger { var Status v_status; var charstring v_reason; Loading LibIot/LibIot_TestConfiguration.ttcn +22 −15 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ module LibIot_TestConfiguration { import from LibIot_TestInterface { type OracleClient, TestCoordinator, TestDriver, TestMonitor, TestOracle; type OracleClient, TestCoordinator, EutTrigger, InterfaceMonitor, OracleServer; } /** Loading @@ -18,7 +18,7 @@ module LibIot_TestConfiguration { * port of the test oracle and activates the default * @param p_monitor monitor component */ function f_cf_oracle_up(in OracleClient p_client) runs on TestOracle { function f_cf_oracle_up(in OracleClient p_client) runs on OracleServer { connect(self:vPort, p_client:vPort); } Loading @@ -27,7 +27,7 @@ module LibIot_TestConfiguration { * component * @param p_monitor monitor component */ function f_cf_oracle_down(in OracleClient p_client) runs on TestOracle { function f_cf_oracle_down(in OracleClient p_client) runs on OracleServer { disconnect(self:vPort, p_client:vPort); } Loading @@ -36,7 +36,7 @@ module LibIot_TestConfiguration { * @desc initialize trigger component ports * @param p_driver trigger component */ function f_cf_trigger_up(in TestDriver p_driver) runs on TestCoordinator { function f_cf_trigger_up(in EutTrigger p_driver) runs on TestCoordinator { // connect sync ports connect(p_driver:syncPort, self:syncPort); // connect TSI ports Loading @@ -50,7 +50,7 @@ module LibIot_TestConfiguration { * @desc uninitialize trigger component ports * @param p_driver trigger component */ function f_cf_trigger_down(in TestDriver p_driver) runs on TestCoordinator { function f_cf_trigger_down(in EutTrigger p_driver) runs on TestCoordinator { // disconnect sync ports disconnect(p_driver:syncPort, self:syncPort); // disconnect TSI ports Loading @@ -64,7 +64,7 @@ module LibIot_TestConfiguration { * port, maps to the TSI port and connects to the oracle * @param p_monitor monitor component */ function f_cf_monitor_up(in TestMonitor p_monitor) runs on TestCoordinator { function f_cf_monitor_up(in InterfaceMonitor p_monitor) runs on TestCoordinator { // connect sync ports connect(p_monitor:syncPort, self:syncPort); // mapp TSI port Loading @@ -78,7 +78,7 @@ module LibIot_TestConfiguration { * port, unmaps from the TSI port and disconnects from the oracle * @param p_monitor monitor component */ function f_cf_monitor_down(in TestMonitor p_monitor) runs on TestCoordinator { function f_cf_monitor_down(in InterfaceMonitor p_monitor) runs on TestCoordinator { // connect sync ports disconnect(p_monitor:syncPort, self:syncPort); // mapp TSI port Loading @@ -88,18 +88,25 @@ module LibIot_TestConfiguration { } /** * @desc creates a monitor component and store its name and id in * an array * @desc creates a monitor component * @param p_name name of the monitor component * @return the created monitor component */ function f_cf_create_monitor(in charstring p_name) runs on TestCoordinator return TestMonitor { var TestMonitor v_monitor := TestMonitor.create(p_name); var integer v_size := sizeof(vc_compIds); // set Id vc_compIds[v_size] := {p_name, v_size}; function f_cf_create_monitor(in charstring p_name) runs on TestCoordinator return InterfaceMonitor { var InterfaceMonitor v_monitor := InterfaceMonitor.create(p_name); return v_monitor; } /** * @desc creates a trigger component * @param p_name name of the trigger component * @return the created trigger component */ function f_cf_create_trigger(in charstring p_name) runs on TestCoordinator return EutTrigger { var EutTrigger v_trigger := EutTrigger.create(p_name); return v_trigger; } } No newline at end of file LibIot/LibIot_TestInterface.ttcn +8 −8 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ module LibIot_TestInterface { */ type component SystemInterface { port MonitorPort mPort; port DeviceControlPort dcPort; port EutConfigPort dcPort; port TriggerPort tPort; } Loading @@ -32,7 +32,7 @@ module LibIot_TestInterface { * of controlling the overall execution, manangement of testing phases, * test verdicts collection and synchronization. Used as MTC. */ type component TestCoordinator extends TestOracle { type component TestCoordinator extends OracleServer { var ComponentIdList vc_compIds; } Loading @@ -41,7 +41,7 @@ module LibIot_TestInterface { * collecting information to manage E2E and conformance verdicts. * Can be used as MTC. */ type component TestOracle extends ServerSyncComp { type component OracleServer extends ServerSyncComp { port VerdictPort vPort; } Loading @@ -54,14 +54,14 @@ module LibIot_TestInterface { * providing minitoring functionality of involved interfaces. Used as * PTC. */ type component TestMonitor extends OracleClient { type component InterfaceMonitor extends OracleClient { port MonitorPort mPort; } /** * @desc Stimulate the SUT. Used as PTC. */ type component TestDriver extends OracleClient { type component EutTrigger extends OracleClient { port TriggerPort tPort; } Loading @@ -69,8 +69,8 @@ module LibIot_TestInterface { /** * @desc Configures the SUT or interconnecting network. Used as PTC. */ type component DeviceControl extends OracleClient { port DeviceControlPort dcPort; type component EutConfiguration extends OracleClient { port EutConfigPort dcPort; } }// end group abstractTestComponents Loading @@ -84,7 +84,7 @@ module LibIot_TestInterface { in all; } type port DeviceControlPort procedure { type port EutConfigPort procedure { inout all; } Loading Loading
LibIot/LibIot_Functions.ttcn +4 −4 Original line number Diff line number Diff line Loading @@ -13,7 +13,7 @@ module LibIot_Functions { } import from LibIot_TestInterface { type TestCoordinator, TestDriver, TestMonitor, TestOracle, OracleClient; type TestCoordinator, EutTrigger, InterfaceMonitor, OracleServer, OracleClient; } Loading Loading @@ -50,7 +50,7 @@ module LibIot_Functions { * @desc evaluate the test verdict and sets it correspondingly * @param p_verdict the verdict received */ function f_setIOTVerdict(in IOTVerdict p_verdict) runs on TestOracle { function f_setIOTVerdict(in IOTVerdict p_verdict) runs on OracleServer { if (ischosen(p_verdict.e2e)) { setverdict(p_verdict.e2e); } else if (PX_CONFOMANCE_CHECK) { Loading @@ -62,7 +62,7 @@ module LibIot_Functions { * @desc listens continously on the port for receiving verdict * @param p_idx index of the port */ altstep a_receiveIOTVerdict() runs on TestOracle { altstep a_receiveIOTVerdict() runs on OracleServer { var IOTVerdict v_verdict; [] vPort.receive(IOTVerdict:?) -> value v_verdict { f_setIOTVerdict(v_verdict); Loading @@ -72,7 +72,7 @@ module LibIot_Functions { } group triggerFunctions { function f_sendTriggerCmd(in TriggerCommand p_cmd, in ParameterList p_params) runs on TestDriver { function f_sendTriggerCmd(in TriggerCommand p_cmd, in ParameterList p_params) runs on EutTrigger { var Status v_status; var charstring v_reason; Loading
LibIot/LibIot_TestConfiguration.ttcn +22 −15 Original line number Diff line number Diff line Loading @@ -10,7 +10,7 @@ module LibIot_TestConfiguration { import from LibIot_TestInterface { type OracleClient, TestCoordinator, TestDriver, TestMonitor, TestOracle; type OracleClient, TestCoordinator, EutTrigger, InterfaceMonitor, OracleServer; } /** Loading @@ -18,7 +18,7 @@ module LibIot_TestConfiguration { * port of the test oracle and activates the default * @param p_monitor monitor component */ function f_cf_oracle_up(in OracleClient p_client) runs on TestOracle { function f_cf_oracle_up(in OracleClient p_client) runs on OracleServer { connect(self:vPort, p_client:vPort); } Loading @@ -27,7 +27,7 @@ module LibIot_TestConfiguration { * component * @param p_monitor monitor component */ function f_cf_oracle_down(in OracleClient p_client) runs on TestOracle { function f_cf_oracle_down(in OracleClient p_client) runs on OracleServer { disconnect(self:vPort, p_client:vPort); } Loading @@ -36,7 +36,7 @@ module LibIot_TestConfiguration { * @desc initialize trigger component ports * @param p_driver trigger component */ function f_cf_trigger_up(in TestDriver p_driver) runs on TestCoordinator { function f_cf_trigger_up(in EutTrigger p_driver) runs on TestCoordinator { // connect sync ports connect(p_driver:syncPort, self:syncPort); // connect TSI ports Loading @@ -50,7 +50,7 @@ module LibIot_TestConfiguration { * @desc uninitialize trigger component ports * @param p_driver trigger component */ function f_cf_trigger_down(in TestDriver p_driver) runs on TestCoordinator { function f_cf_trigger_down(in EutTrigger p_driver) runs on TestCoordinator { // disconnect sync ports disconnect(p_driver:syncPort, self:syncPort); // disconnect TSI ports Loading @@ -64,7 +64,7 @@ module LibIot_TestConfiguration { * port, maps to the TSI port and connects to the oracle * @param p_monitor monitor component */ function f_cf_monitor_up(in TestMonitor p_monitor) runs on TestCoordinator { function f_cf_monitor_up(in InterfaceMonitor p_monitor) runs on TestCoordinator { // connect sync ports connect(p_monitor:syncPort, self:syncPort); // mapp TSI port Loading @@ -78,7 +78,7 @@ module LibIot_TestConfiguration { * port, unmaps from the TSI port and disconnects from the oracle * @param p_monitor monitor component */ function f_cf_monitor_down(in TestMonitor p_monitor) runs on TestCoordinator { function f_cf_monitor_down(in InterfaceMonitor p_monitor) runs on TestCoordinator { // connect sync ports disconnect(p_monitor:syncPort, self:syncPort); // mapp TSI port Loading @@ -88,18 +88,25 @@ module LibIot_TestConfiguration { } /** * @desc creates a monitor component and store its name and id in * an array * @desc creates a monitor component * @param p_name name of the monitor component * @return the created monitor component */ function f_cf_create_monitor(in charstring p_name) runs on TestCoordinator return TestMonitor { var TestMonitor v_monitor := TestMonitor.create(p_name); var integer v_size := sizeof(vc_compIds); // set Id vc_compIds[v_size] := {p_name, v_size}; function f_cf_create_monitor(in charstring p_name) runs on TestCoordinator return InterfaceMonitor { var InterfaceMonitor v_monitor := InterfaceMonitor.create(p_name); return v_monitor; } /** * @desc creates a trigger component * @param p_name name of the trigger component * @return the created trigger component */ function f_cf_create_trigger(in charstring p_name) runs on TestCoordinator return EutTrigger { var EutTrigger v_trigger := EutTrigger.create(p_name); return v_trigger; } } No newline at end of file
LibIot/LibIot_TestInterface.ttcn +8 −8 Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ module LibIot_TestInterface { */ type component SystemInterface { port MonitorPort mPort; port DeviceControlPort dcPort; port EutConfigPort dcPort; port TriggerPort tPort; } Loading @@ -32,7 +32,7 @@ module LibIot_TestInterface { * of controlling the overall execution, manangement of testing phases, * test verdicts collection and synchronization. Used as MTC. */ type component TestCoordinator extends TestOracle { type component TestCoordinator extends OracleServer { var ComponentIdList vc_compIds; } Loading @@ -41,7 +41,7 @@ module LibIot_TestInterface { * collecting information to manage E2E and conformance verdicts. * Can be used as MTC. */ type component TestOracle extends ServerSyncComp { type component OracleServer extends ServerSyncComp { port VerdictPort vPort; } Loading @@ -54,14 +54,14 @@ module LibIot_TestInterface { * providing minitoring functionality of involved interfaces. Used as * PTC. */ type component TestMonitor extends OracleClient { type component InterfaceMonitor extends OracleClient { port MonitorPort mPort; } /** * @desc Stimulate the SUT. Used as PTC. */ type component TestDriver extends OracleClient { type component EutTrigger extends OracleClient { port TriggerPort tPort; } Loading @@ -69,8 +69,8 @@ module LibIot_TestInterface { /** * @desc Configures the SUT or interconnecting network. Used as PTC. */ type component DeviceControl extends OracleClient { port DeviceControlPort dcPort; type component EutConfiguration extends OracleClient { port EutConfigPort dcPort; } }// end group abstractTestComponents Loading @@ -84,7 +84,7 @@ module LibIot_TestInterface { in all; } type port DeviceControlPort procedure { type port EutConfigPort procedure { inout all; } Loading