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

org.bidib.wizard.simulation.events.PortConfigEvent Maven / Gradle / Ivy

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy