blob: b64563849e2c48d19a6e9ebd6958999caa95f43d [file] [log] [blame]
///////////////////////////////////////////////////////////////////////////////
// //
// Copyright (c) 2000-2018 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 //
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
// Module: EPTF_LGenBasePerformTest_MemMTCFunctions
//
// Purpose:
// This module provides functions for testing LGenBase
//
// Module depends on:
// -
//
// Current Owner:
// Laszlo Skumat (ELSZSKU)
//
// Last Review Date:
// 2008-09-11
//
// Detailed Comments:
// Provide functions to test LGenBase
//
//
///////////////////////////////////////////////////////////////
module EPTF_LGenBasePerformTest_MemMTCFunctions
{
import from EPTF_LGenBasePerformTest_MemMTCDefinitions all
import from EPTF_LGenBasePerformTest_MemMessages all
import from EPTF_CLL_Base_Functions all;
import from EPTF_LGenBasePerformTest_MTCFunctions all
#ifdef R3
import from EPTF_CLL_LGenBase_ConfigDefinitions all;
import from EPTF_CLL_Common_Definitions all
#endif
#ifdef R2
import from EPTF_CLL_LGenBase_Definitions all;
import from EPTF_CLL_Definitions all
#endif
function f_EPTF_LGenBasePerformTest_sendControlMessage (
in MeasureControl_MgmtMsg pl_msg,
in EPTF_LGenBasePerformanceTest_handleAction_FT pl_handleStarted := null,
in EPTF_IntegerList pl_startedParams := {},
in EPTF_LGenBasePerformanceTest_handleAction_FT pl_handleFinished := null,
in EPTF_IntegerList pl_finishedParams := {})
runs on EPTF_LGenBasePerformTest_MemMTC_CT
{
//log(%definitionId,pl_msg)
v_controlPort.send( pl_msg );
timer t_wait := tsp_wait;
t_wait.start;
var MeasureControl_MgmtMsg vl_msg
alt{
[] v_controlPort.receive(t_pID) -> value vl_msg{
v_mtc_lgenPID := vl_msg.v_MeasureControl_pID.pID
repeat
}
[] v_controlPort.receive(t_measureControlStarted)-> value vl_msg {
if(null != pl_handleStarted){
pl_handleStarted.apply( pl_startedParams, vl_msg.v_MeasureControl_started.startTime )
}
repeat
}
[] v_controlPort.receive(t_measureControlFinished)-> value vl_msg {
if(null != pl_handleFinished){
pl_handleFinished.apply( pl_finishedParams, vl_msg.v_MeasureControl_finished.finishTime )
}
}
[] t_wait.timeout {
log("Control message timed out!")
f_EPTF_Base_stopAll()
}
}
}
function f_LGenBasePerformTest_handleControlStarted (in EPTF_IntegerList pl_Params)
runs on EPTF_LGenBasePerformTest_MemMTC_CT
{
log("Control msg started")
log(f_EPTF_LGenBasePerformanceTest_getMemUsage(v_mtc_lgenPID))
log(f_EPTF_LGenBasePerformanceTest_getCPUsage(v_mtc_lgenPID))
}
function f_LGenBasePerformTest_handleControlFinished (in EPTF_IntegerList pl_Params)
runs on EPTF_LGenBasePerformTest_MemMTC_CT
{
log("Control msg finished")
log(f_EPTF_LGenBasePerformanceTest_getMemUsage(v_mtc_lgenPID))
log(f_EPTF_LGenBasePerformanceTest_getCPUsage(v_mtc_lgenPID))
}
} // end of module