All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cisco.trex.stateful.api.lowlevel.ASTFIpGen Maven / Gradle / Ivy

There is a newer version: 1.69
Show newest version
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;
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy