[FA_dev #1834459] function added to the generic Transport + return code

Change-Id: I024892e3669c1017458d5d8dfa657b1f0b06211d
Signed-off-by: József Gyürüsi <jozsef.gyurusi@ericsson.com>
diff --git a/src/Transport/EPTF_CLL_TransportIPL4_Functions.ttcn b/src/Transport/EPTF_CLL_TransportIPL4_Functions.ttcn
index b771475..e3a95a7 100644
--- a/src/Transport/EPTF_CLL_TransportIPL4_Functions.ttcn
+++ b/src/Transport/EPTF_CLL_TransportIPL4_Functions.ttcn
@@ -659,21 +659,27 @@
 //  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 c0c7802..5919648 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>

@@ -656,6 +657,45 @@
 }

 

 ///////////////////////////////////////////////////////////

+//  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

 // 

 //  Purpose: