Class LightPortPanelController

  • All Implemented Interfaces:
    org.bidib.wizard.api.model.listener.CvDefinitionListener, org.bidib.wizard.api.script.Scripting, org.bidib.wizard.common.script.switching.PortScripting

    public class LightPortPanelController
    extends Object
    implements org.bidib.wizard.api.model.listener.CvDefinitionListener, org.bidib.wizard.common.script.switching.PortScripting
    • Constructor Detail

      • LightPortPanelController

        public LightPortPanelController​(MainModel mainModel)
    • Method Detail

      • addTestToggleTask

        public void addTestToggleTask​(org.bidib.wizard.api.model.NodeInterface node,
                                      org.bidib.wizard.model.ports.Port<?> port)
      • stopTestToggleTask

        public void stopTestToggleTask​(org.bidib.wizard.api.model.NodeInterface node,
                                       org.bidib.wizard.model.ports.Port<?> port)
      • sendPortStatusAction

        public void sendPortStatusAction​(org.bidib.wizard.api.model.SwitchingNodeInterface node,
                                         int port,
                                         org.bidib.wizard.model.status.BidibStatus portStatus)
        Specified by:
        sendPortStatusAction in interface org.bidib.wizard.common.script.switching.PortScripting
      • sendPortValueAction

        public void sendPortValueAction​(org.bidib.wizard.api.model.SwitchingNodeInterface node,
                                        int port,
                                        int portValue)
        Specified by:
        sendPortValueAction in interface org.bidib.wizard.common.script.switching.PortScripting
      • insertPorts

        public void insertPorts​(int selectedRow,
                                LightPortTableModel lightPortTableModel)
        Insert light ports at the selected row.
        Parameters:
        selectedRow - the selected row
        lightPortTableModel - the model
      • addCvDefinitionRequestListener

        public void addCvDefinitionRequestListener​(org.bidib.wizard.api.model.listener.CvDefinitionRequestListener l)
      • findAllPortsInRange

        public static <T extends org.bidib.wizard.model.ports.Port<?>> Set<T> findAllPortsInRange​(List<T> ports,
                                                                                                  int portNum,
                                                                                                  Integer portNumUpperBound)
        Find all ports greater than the provided port number in reverse order.
        Parameters:
        ports - the ports
        portNum - the port number
        portNumUpperBound - the port number that is used as upper limit (exclusive)
        Returns:
        the set of ports in reverse order
      • testValidRange

        protected Integer testValidRange​(org.bidib.wizard.model.ports.LightPort firstPort,
                                         int portsCount,
                                         Integer channelBStartNumber)
      • cvDefinitionValuesChanged

        public void cvDefinitionValuesChanged​(boolean read,
                                              List<String> changedNames)
        Specified by:
        cvDefinitionValuesChanged in interface org.bidib.wizard.api.model.listener.CvDefinitionListener
      • cvDefinitionChanged

        public void cvDefinitionChanged()
        Specified by:
        cvDefinitionChanged in interface org.bidib.wizard.api.model.listener.CvDefinitionListener
      • labelsChangedEvent

        @EventListener(org.bidib.wizard.common.labels.LabelsChangedEvent.class)
        public void labelsChangedEvent​(org.bidib.wizard.common.labels.LabelsChangedEvent labelsChangedEvent)