com.cisco.trex.stateful.api.lowlevel.ASTFIpGen Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of trex-java-sdk Show documentation
Show all versions of trex-java-sdk Show documentation
Java client SDK provides an implementation for TRex RPC APIs
package com.cisco.trex.stateful.api.lowlevel;
import com.google.gson.JsonObject;
/** Java implementation for TRex python sdk ASTFIpGen class */
public class ASTFIpGen {
private JsonObject fields = new JsonObject();
/**
* construct
*
* @param distClient
* @param distServer
* @param ipGenGlobal
*/
public ASTFIpGen(
ASTFIpGenDist distClient, ASTFIpGenDist distServer, ASTFIpGenGlobal ipGenGlobal) {
this.fields.add("dist_client", distClient.toJson());
distClient.setDirection("c");
distClient.setIpOffset(ipGenGlobal.getIpOffset());
this.fields.add("dist_server", distServer.toJson());
distServer.setDirection("s");
distServer.setIpOffset(ipGenGlobal.getIpOffset());
}
/**
* to json format
*
* @return JsonObject
*/
public JsonObject toJson() {
return fields;
}
}