From 65e77173faf62590654c125aa79516f10209230e Mon Sep 17 00:00:00 2001 From: berge Date: Thu, 1 Jul 2010 13:09:10 +0000 Subject: [PATCH] Changed component names Added cfCamDown() function --- ttcn/CAM/LibItsCam_Functions.ttcn | 35 ++++++++++++++++++++++------ ttcn/DENM/LibItsDenm_Functions.ttcn | 36 +++++++++++++++++++++++++++++ ttcn/LibIts_Interface.ttcn | 8 +++---- ttcn/LibIts_TestSystem.ttcn | 7 ++++++ 4 files changed, 75 insertions(+), 11 deletions(-) diff --git a/ttcn/CAM/LibItsCam_Functions.ttcn b/ttcn/CAM/LibItsCam_Functions.ttcn index f0243d13..8c91281a 100644 --- a/ttcn/CAM/LibItsCam_Functions.ttcn +++ b/ttcn/CAM/LibItsCam_Functions.ttcn @@ -2,7 +2,7 @@ * @author ETSI / STF405 * @version $URL$ * $Id$ - * @desc Module containing functions for CAM + * @desc Module containing common functions for ITS * */ module LibItsCam_Functions { @@ -10,19 +10,40 @@ module LibItsCam_Functions { // LibIts import from LibIts_TestSystem all; import from LibIts_Interface all; - + /** - * @desc Create Facility component and connects CAM port + * @desc Create Facility component and map CAM port * @param p_camPtc returned Facility component variable */ - function f_cfCamUp(out ItsFa p_camPtc) { + function f_cfCamUp(out PtcFa p_ptcCam) { // Create Facility component - p_camPtc := ItsFa.create("CAM Tester"); + p_ptcCam := PtcFa.create("CAM Tester"); // map ports - map(p_camPtc:camPort, system:camPort); + map(p_ptcCam:camPort, system:camPort); + + } // end f_cfCamUp + + /** + * @desc Wait for component to finish and unmap CAM ports + * @param p_camPtc Facility component variable + */ + function f_cfCamDown(in PtcFa p_ptcCam) runs on ItsMtc { + + tc_guard.start; + alt { + [] p_ptcCam.done { + tc_guard.stop; + } + + [] tc_guard.timeout { + log("*** f_cfCamDown: ERROR: Timeout while waiting for component ***"); + setverdict(inconc); + } + } + unmap(p_ptcCam:camPort); - } + } // end f_cfCamDown } // end LibItsCam_Functions \ No newline at end of file diff --git a/ttcn/DENM/LibItsDenm_Functions.ttcn b/ttcn/DENM/LibItsDenm_Functions.ttcn index cc3e2538..b1d02912 100644 --- a/ttcn/DENM/LibItsDenm_Functions.ttcn +++ b/ttcn/DENM/LibItsDenm_Functions.ttcn @@ -7,6 +7,42 @@ */ module LibItsDenm_Functions { + // LibIts + import from LibIts_TestSystem all; + import from LibIts_Interface all; + + /** + * @desc Create Facility component and connects DENM port + * @param p_ptcDenm returned Facility component variable + */ + function f_cfDenmUp(out PtcFa p_ptcDenm) { + + // Create Facility component + p_ptcDenm := PtcFa.create("DENM Tester"); + + // map ports + map(p_ptcDenm:denmPort, system:denmPort); + + } + + /** + * @desc Wait for component to finish and unmap DENM ports + * @param p_camPtc Facility component variable + */ + function f_cfDenmDown(in PtcFa p_ptcDenm) runs on ItsMtc { + tc_guard.start; + alt { + [] p_ptcDenm.done { + tc_guard.stop; + } + + [] tc_guard.timeout { + log("*** f_cfCamDown: ERROR: Timeout while waiting for component ***"); + setverdict(inconc); + } + } + unmap(p_ptcDenm:camPort); + } // end f_cfDenmDown } // end LibItsDenm_Functions \ No newline at end of file diff --git a/ttcn/LibIts_Interface.ttcn b/ttcn/LibIts_Interface.ttcn index a3fd297d..692fbe2e 100644 --- a/ttcn/LibIts_Interface.ttcn +++ b/ttcn/LibIts_Interface.ttcn @@ -18,7 +18,7 @@ module LibIts_Interface { /** * @desc Test component for ITS Access layer */ - type component ItsAc { + type component PtcAc { // AC1 ports port MacM5Port macM5Port; @@ -30,7 +30,7 @@ module LibIts_Interface { /** * @desc Test component for ITS Facility layer */ - type component ItsFa { + type component PtcFa { // FA1 ports port CamPort camPort; @@ -49,7 +49,7 @@ module LibIts_Interface { /** * @desc Test component for ITS Management layer */ - type component ItsMgt { + type component PtcMgt { // MGT1 ports port IiscPort iiscPort; @@ -58,7 +58,7 @@ module LibIts_Interface { /** * @desc Test component for ITS Network and Transport layer */ - type component ItsNt { + type component PtcNt { // NT1 ports port BtpPort btpPort; diff --git a/ttcn/LibIts_TestSystem.ttcn b/ttcn/LibIts_TestSystem.ttcn index 59b998d1..a8661cbf 100644 --- a/ttcn/LibIts_TestSystem.ttcn +++ b/ttcn/LibIts_TestSystem.ttcn @@ -10,6 +10,9 @@ module LibIts_TestSystem { // LibITS import from LibIts_Interface all; + // LibCommon + import from LibCommon_Time {modulepar all}; + group portDefinitions { /** @@ -35,9 +38,13 @@ module LibIts_TestSystem { */ type component ItsMtc { + // ports port UpperTesterPort utPort; port AdapterControlPort acPort; + // timers + timer tc_guard := PX_TDONE; + } // end ItsMtc /** -- GitLab