com.github.sdnwiselab.sdnwise.controller.ControllerBus Maven / Gradle / Ivy
/*
* Copyright (C) 2015 Seb
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
package com.github.sdnwiselab.sdnwise.controller;
import com.github.sdnwiselab.sdnwise.adapter.Adapter;
import com.github.sdnwiselab.sdnwise.util.NodeAddress;
import java.util.LinkedList;
/**
*
* @author Seb
*/
public class ControllerBus extends ControllerStatic{
public ControllerBus(ControllerId id, Adapter lower, NetworkGraph networkGraph) {
super(id, lower, networkGraph);
computeRules();
}
@Override
public final void computeRules(){
LinkedList path = new LinkedList<>();
path.add(new NodeAddress("0.0"));
path.add(new NodeAddress("0.4"));
path.add(new NodeAddress("0.5"));
results.put(new NodeAddress("0.5"), path);
path = new LinkedList<>();
path.add(new NodeAddress("0.0"));
path.add(new NodeAddress("0.4"));
results.put(new NodeAddress("0.4"), path);
}
}