org.bidib.wizard.simulation.events.PortConfigEvent Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bidibwizard-simulation Show documentation
Show all versions of bidibwizard-simulation Show documentation
jBiDiB BiDiB Wizard Simulation POM
package org.bidib.wizard.simulation.events;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.bidib.jbidibc.messages.enums.LcOutputType;
import org.bidib.wizard.model.ports.GenericPort;
public class PortConfigEvent {
private final String nodeAddr;
private final int portNumber;
private final LcOutputType signalledPortType;
private final GenericPort port;
private boolean enabled;
public PortConfigEvent(String nodeAddr, int portNumber, LcOutputType signalledPortType, final GenericPort port) {
this.nodeAddr = nodeAddr;
this.portNumber = portNumber;
this.signalledPortType = signalledPortType;
this.port = port;
}
/**
* @return the nodeAddr
*/
public String getNodeAddr() {
return nodeAddr;
}
/**
* @return the portNumber
*/
public int getPortNumber() {
return portNumber;
}
/**
* @return the signalled port type
*/
public LcOutputType getSignalledPortType() {
return signalledPortType;
}
/**
* @return the port instance
*/
public GenericPort getPort() {
return port;
}
/**
* @return the enabled
*/
public boolean isEnabled() {
return enabled;
}
/**
* @param enabled
* the enabled to set
*/
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
}