Search in sources :

Example 1 with TrafficProfile

use of com.exalttech.trex.util.TrafficProfile in project trex-stateless-gui by cisco-system-traffic-generator.

the class RPCMethods method assignTrafficProfile.

/**
     *
     * @param portID
     * @param profileList
     * @return true in case of success
     * @throws java.lang.Exception
     */
public StreamValidation assignTrafficProfile(int portID, Profile[] profileList) throws Exception {
    String handler = (String) connectionHandler.get(portID);
    stopTraffic(portID);
    removeAllStreams(portID);
    LogsController.getInstance().appendText(LogType.INFO, "Assigning Traffic Profile on Port " + portID);
    TrafficProfile trexTrafficProfile = new TrafficProfile();
    Profile[] updatedProfileList;
    updatedProfileList = trexTrafficProfile.prepareTrafficProfile(profileList, portID, handler);
    serverConnectionManager.sendAddStreamRequest(updatedProfileList);
    return validateStream(portID);
}
Also used : TrafficProfile(com.exalttech.trex.util.TrafficProfile) Profile(com.exalttech.trex.remote.models.profiles.Profile) TrafficProfile(com.exalttech.trex.util.TrafficProfile)

Example 2 with TrafficProfile

use of com.exalttech.trex.util.TrafficProfile in project trex-stateless-gui by cisco-system-traffic-generator.

the class PacketBuilderHomeController method initialize.

@Override
public void initialize(URL url, ResourceBundle rb) {
    trafficProfile = new TrafficProfile();
    packetHex = new PacketHex(hexPane);
    nextStreamBtn.setGraphic(new ImageView(new Image("/icons/next_stream.png")));
    prevStreamBtn.setGraphic(new ImageView(new Image("/icons/prev_stream.png")));
    packetInfo = new PacketInfo();
    parser = new PacketParser();
}
Also used : PacketParser(com.exalttech.trex.ui.views.streams.viewer.PacketParser) TrafficProfile(com.exalttech.trex.util.TrafficProfile) PacketInfo(com.exalttech.trex.ui.models.PacketInfo) PacketHex(com.exalttech.trex.ui.views.streams.viewer.PacketHex) ImageView(javafx.scene.image.ImageView) Image(javafx.scene.image.Image)

Aggregations

TrafficProfile (com.exalttech.trex.util.TrafficProfile)2 Profile (com.exalttech.trex.remote.models.profiles.Profile)1 PacketInfo (com.exalttech.trex.ui.models.PacketInfo)1 PacketHex (com.exalttech.trex.ui.views.streams.viewer.PacketHex)1 PacketParser (com.exalttech.trex.ui.views.streams.viewer.PacketParser)1 Image (javafx.scene.image.Image)1 ImageView (javafx.scene.image.ImageView)1