12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- package classes.holonControlUnit.messages;
- import java.util.ArrayList;
- public class MergeMsg {
-
- public enum Type {
- REQ, ACK, ACK_II
- }
- private Type type;
- private float power;
- private float netThroughput;
- private ArrayList<Float> predictedPowerUsage;
- private String requester;
- private int timeStep;
- private StateMsg state;
- private ArrayList<String> redirectedBy;
- private boolean allowOccupiedPath;
- public MergeMsg(Type type, float power, float netThroughput, ArrayList<Float> predictedPowerUsage, String requester,
- int timeStep, StateMsg state, ArrayList<String> redirectedBy, boolean allowOccupiedPath) {
- super();
- this.type = type;
- this.power = power;
- this.netThroughput = netThroughput;
- this.predictedPowerUsage = predictedPowerUsage;
- this.requester = requester;
- this.timeStep = timeStep;
- this.state = state;
- this.redirectedBy = redirectedBy;
- this.allowOccupiedPath = allowOccupiedPath;
- }
- @Override
- public String toString() {
- return "MergeMsg [type=" + type + ", power=" + power + ", netThroughput=" + netThroughput
- + ", predictedPowerUsage=" + predictedPowerUsage + ", requester=" + requester + ", timeStep=" + timeStep
- + ", state=" + state + ", redirectedBy=" + redirectedBy + ", allowOccupiedPath=" + allowOccupiedPath
- + "]";
- }
- public Type getType() {
- return type;
- }
-
- public float getPower() {
- return power;
- }
-
- public ArrayList<Float> getPredictedPowerUsage() {
- return predictedPowerUsage;
- }
- public String getRequester() {
- return requester;
- }
- public int getTimeStep() {
- return timeStep;
- }
- public float getNetThroughput() {
- return netThroughput;
- }
- public StateMsg getState() {
- return state;
- }
- public ArrayList<String> getRedirectedBy() {
- return redirectedBy;
- }
- public boolean isAllowOccupiedPath() {
- return allowOccupiedPath;
- }
-
- }
|