| /////////////////////////////////////////////////////////////////////////////// |
| // // |
| // Copyright (c) 2000-2019 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_LGenBaseDemo_Functions |
| // |
| // Purpose: |
| // This module contains Main testcase |
| // |
| // Module Parameters: |
| // - |
| // |
| // Module depends on: |
| // |
| // Current Owner: |
| // ELSZSKU |
| // |
| // Last Review Date: |
| // 20 - - |
| // |
| // Detailed Comments: |
| // |
| /////////////////////////////////////////////////////////// |
| module EPTF_LGenBaseDemo_Functions |
| {
|
| import from EPTF_LGenBaseDemo_Definitions all |
| import from EPTF_LGenBaseDemo_CallerFunctions all |
| import from EPTF_LGenBaseDemo_CallerDefinitions all |
| import from EPTF_LGenBaseDemo_ResponderFunctions all |
| import from EPTF_LGenBaseDemo_ResponderDefinitions all |
| import from EPTF_CLL_Base_Functions all |
| |
| //Guard time |
| modulepar float tsp_maxExec := 60.0 |
| |
| //The test case of the demo |
| testcase tc_LGenBaseDemo_reg() |
| runs on LGenBaseDemo_CT{ |
| f_EPTF_Base_init_CT("Main") |
| //Create the responder first |
| v_LGenBaseDemo_responder := LGenBaseDemo_Responder_CT.create( "Responder" ) |
| //and start it. |
| v_LGenBaseDemo_responder.start( f_LGenBaseDemo_Responder_behavior("Responder", tsp_targetCPS, tsp_maxDelay)); |
| //Create the caller |
| v_LGenBaseDemo_caller := LGenBaseDemo_Caller_CT.create( "Caller" ) |
| //and start it |
| v_LGenBaseDemo_caller.start( f_LGenBaseDemo_Caller_behavior("Caller", v_LGenBaseDemo_responder)) |
| //Let them run... |
| timer t_guard |
| t_guard.start( tsp_maxExec ) |
| alt{ |
| [] any component.done {} |
| [] t_guard.timeout { setverdict(fail, log2str("Neither caller nor the responder component function is finished in ", tsp_maxExec, " seconds"))} |
| } |
| } |
| |
| } // end of module
|