From a1c7f90f93ac5396c409fa3d980eaed3881d89f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zsef=20Gy=C3=BCr=C3=BCsi?= <jozsef.gyurusi@ericsson.com> Date: Fri, 14 Feb 2020 10:46:44 +0100 Subject: [PATCH] [FA_dev #1834459] function added to the generic Transport + return code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I024892e3669c1017458d5d8dfa657b1f0b06211d Signed-off-by: József Gyürüsi <jozsef.gyurusi@ericsson.com> --- .../EPTF_CLL_TransportIPL4_Functions.ttcn | 14 +++++-- .../EPTF_CLL_Transport_Functions.ttcn | 40 +++++++++++++++++++ 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/src/Transport/EPTF_CLL_TransportIPL4_Functions.ttcn b/src/Transport/EPTF_CLL_TransportIPL4_Functions.ttcn index b7714753..e3a95a72 100644 --- a/src/Transport/EPTF_CLL_TransportIPL4_Functions.ttcn +++ b/src/Transport/EPTF_CLL_TransportIPL4_Functions.ttcn @@ -659,21 +659,27 @@ return integer // Parameters: // param_name - *in* - *charstring* - parameter name to set // param_value - *in* - *charstring* - parameter value to set +// pl_result - *out* - <Result> - result // // Return Value: -// <Result> - the result of the operation +// *integer* - error code: -1 if errorCode is present in the pl_result, else 0 // // Errors: // - None /////////////////////////////////////////////////////////// public function f_EPTF_Transport_port_settings( in charstring param_name, - in charstring param_value + in charstring param_value, + out Result pl_result ) runs on EPTF_TransportIPL4_CT -return Result +return integer { - return f_IPL4_port_settings(IPL4_PCO, param_name, param_value); + pl_result := f_IPL4_port_settings(IPL4_PCO, param_name, param_value); + if (ispresent(pl_result.errorCode)) { + return -1; + } + return 0; } /////////////////////////////////////////////////////////// diff --git a/src/Transport/EPTF_CLL_Transport_Functions.ttcn b/src/Transport/EPTF_CLL_Transport_Functions.ttcn index c0c78023..5919648e 100644 --- a/src/Transport/EPTF_CLL_Transport_Functions.ttcn +++ b/src/Transport/EPTF_CLL_Transport_Functions.ttcn @@ -53,6 +53,7 @@ // <f_EPTF_Transport_connect> // <f_EPTF_Transport_listen> // <f_EPTF_Transport_setOpt> +// <f_EPTF_Transport_port_settings> // <f_EPTF_Transport_close> // <f_EPTF_Transport_send> // <f_EPTF_Transport_getLocalAddress> @@ -655,6 +656,45 @@ return integer return vl_errorCode; } +/////////////////////////////////////////////////////////// +// Function: f_EPTF_Transport_port_settings +// +// Purpose: +// Function to set the port settings of the underlying test port +// +// Parameters: +// pl_transportType - *in* - <EPTF_Transport_TransportType> - Testport type +// param_name - *in* - <charstring> - parameter +// param_value - *in* <charstring> - value +// pl_result - *out* - <Result> - result +// +// Return Value: +// *integer* - 0 if OK, or -1 on error +// +// Errors: +// - invalid LGenType +/////////////////////////////////////////////////////////// +public function f_EPTF_Transport_port_settings( + in EPTF_Transport_TransportType pl_transportType, + in charstring pl_param_name, + in charstring pl_param_value, + out Socket_API_Definitions.Result pl_result +) +runs on EPTF_Transport_CT +return integer +{ + var integer vl_errorCode := -1; + select( pl_transportType ){ + case ( IPL4 ){ + vl_errorCode := EPTF_CLL_TransportIPL4_Functions.f_EPTF_Transport_port_settings(pl_param_name, pl_param_value, pl_result); + } + case else{ + f_EPTF_Transport_testportTypeError(%definitionId,pl_transportType); + } + } + return vl_errorCode; +} + /////////////////////////////////////////////////////////// // Function: f_EPTF_Transport_close // -- GitLab