@@ -563,7 +563,7 @@ public TRexClientResult<GlobalConfig> getGlobalConfig(int portIdx) {
563563 * Change global configuration parameter
564564 *
565565 * @param name parameter name
566- * @param value parameter value in data types of dboule , boolean depending on the parameter type
566+ * @param value parameter value in data types of double , boolean depending on the parameter type
567567 * @return StubResult
568568 */
569569 public TRexClientResult <StubResult > setGlobalConfig (String name , Object value ) {
@@ -572,6 +572,19 @@ public TRexClientResult<StubResult> setGlobalConfig(String name, Object value) {
572572 return callMethod ("set_global_cfg" , payload , StubResult .class );
573573 }
574574
575+ /**
576+ * Change single or multiple global configuration parameter(s)
577+ *
578+ * @param parameters a map contains parameter name and value pairs, parameter value is in data types of double,
579+ * boolean depending on the parameter type.
580+ * @return StubResult
581+ */
582+ public TRexClientResult <StubResult > setGlobalConfig (Map <String , Object > parameters ) {
583+ Map <String , Object > payload = new HashMap <>();
584+ parameters .forEach ((key , value ) -> payload .put (key , value ));
585+ return callMethod ("set_global_cfg" , payload , StubResult .class );
586+ }
587+
575588 protected Map <String , Object > createPayload (int portIndex ) {
576589 Map <String , Object > payload = new HashMap <>();
577590 payload .put (PORT_ID , portIndex );
0 commit comments