Class LnIPLImplementation

  • All Implemented Interfaces:
    java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, LocoNetListener

    public class LnIPLImplementation
    extends javax.swing.JComponent
    implements LocoNetListener
    Implements a class to handle message creation and message interpretation of LocoNet messages associated with IPL. IPL is a mechanism which allows identification and firmware programming of some types of Digitrax hardware.
    See Also:
    Serialized Form
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  LnIPLImplementation.DeviceTypes  
      • Nested classes/interfaces inherited from class javax.swing.JComponent

        javax.swing.JComponent.AccessibleJComponent
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) LnIPLImplementation thisone  
      • Fields inherited from class javax.swing.JComponent

        listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
      • Fields inherited from class java.awt.Component

        accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
      • Fields inherited from interface java.awt.image.ImageObserver

        ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
    • Constructor Summary

      Constructors 
      Constructor Description
      LnIPLImplementation​(LocoNetSystemConnectionMemo lnMemo)
      Constructor for LnIPMImplementation for a given LocoNetSystemConnectionMemo as provided by the instantiating method.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void connect​(LnTrafficController t)
      Connect this instance's LocoNetListener to the LocoNet Traffic Controller.
      static LocoNetMessage createIplDcs51QueryPacket()
      Create a LocoNet packet which queries DCS51 devices for IPL identification information.
      static LocoNetMessage createIplDcs52QueryPacket()
      Create a LocoNet packet which queries DCS52 devices for IPL identification information.
      static LocoNetMessage createIplDt402QueryPacket()
      Create a LocoNet packet which queries DT402x throttles for IPL identification information.
      static LocoNetMessage createIplPr3QueryPacket()
      Create a LocoNet packet which queries PR3 devices for IPL identification information.
      static LocoNetMessage createIplSpecificHostQueryPacket​(java.lang.Integer hostMfr, java.lang.Integer hostDevice)
      Create a LocoNet packet which queries IPL devices by specific host manufacturer and specific host device type.
      static LocoNetMessage createIplSpecificSlaveQueryPacket​(java.lang.Integer slaveMfr, java.lang.Integer slaveDevice)
      Create a LocoNet packet which queries IPL devices by specific slave manufacturer and specific slave device type.
      static LocoNetMessage createIplSpecificSlaveQueryPacket​(java.lang.Integer hostMfr, java.lang.Integer hostDevice, java.lang.Integer slaveMfr, java.lang.Integer slaveDevice)
      Create a LocoNet packet which queries IPL devices by specific host manufacturer, specific host device type, specific slave manufacturer and specific slave device type.
      static LocoNetMessage createIplUr92QueryPacket()
      Create a LocoNet packet which queries UR92 devices for IPL identification information.
      static LocoNetMessage createIplUt4QueryPacket()
      Create a LocoNet packet which queries (some) UT4 throttles for IPL identification information.
      static LocoNetMessage createQueryAllIplDevicesPacket()
      Create a LocoNet packet which queries UR92(s) for Duplex group identification information.
      void dispose()
      Break connection with the LnTrafficController and stop timers.
      static java.lang.String extractInterpretedIplHostDevice​(LocoNetMessage m)
      Extract the IPL Host manufacturer and Device information from m and return the interpreted information as a String.
      static java.lang.String extractInterpretedIplSlaveDevice​(LocoNetMessage m)
      Extract the IPL Slave manufacturer and Device information from m.
      static java.lang.Integer extractIplIdentityHostDevice​(LocoNetMessage m)
      Get the host device number from an IPL Identity report message.
      static java.lang.String extractIplIdentityHostFrimwareRev​(LocoNetMessage m)
      Get the host firmware revision number from an IPL Identity report message.
      static java.lang.Integer extractIplIdentityHostFrimwareRevNum​(LocoNetMessage m)
      Get the host firmware revision number from an IPL Identity report message.
      static java.lang.Integer extractIplIdentityHostManufacturer​(LocoNetMessage m)
      Get the IPL host manufacturer number from an IPL Identity report message.
      static java.lang.Long extractIplIdentityHostSerialNumber​(LocoNetMessage m)
      Get the host serial number from an IPL Identity report message.
      static java.lang.Integer extractIplIdentitySlaveDevice​(LocoNetMessage m)
      Get the slave device number from an IPL Identity report message.
      static java.lang.String extractIplIdentitySlaveFrimwareRev​(LocoNetMessage m)
      Get the slave firmware revision number from an IPL Identity report message.
      static java.lang.Integer extractIplIdentitySlaveFrimwareRevNum​(LocoNetMessage m)
      Get the Slave firmware revision number from an IPL Identity report message.
      static java.lang.Integer extractIplIdentitySlaveManufacturer​(LocoNetMessage m)
      Get the slave manufacturer number from an IPL Identity report message.
      static java.lang.Long extractIplIdentitySlaveSerialNumber​(LocoNetMessage m)
      Get the slave serial number from an IPL Identity report message.
      static java.lang.String getDeviceName​(int manuf, int device, int slaveManuf, int slave)  
      static java.lang.String getManufacturer​(int manuf)
      provides string representation for an IPL manufacturer number
      static java.lang.String interpretHostManufacturerDevice​(java.lang.Integer hostMfr, java.lang.Integer hostDevice)
      Interpret IPL Identity Host Manufacturer and Host Device number as a string.
      static java.lang.String interpretHostManufacturerDevice​(java.lang.Integer hostMfr, java.lang.Integer hostDevice, java.lang.Integer slaveMfr, java.lang.Integer slaveDevice)
      Interpret IPL Identity Host Manufacturer and Host Device number as a string.
      static java.lang.String interpretSlaveManufacturerDevice​(java.lang.Integer slaveMfr, java.lang.Integer slaveDevice)
      Interpret IPL Identity Slave Manufacturer and Slave Device number as a string.
      static boolean isIplBxp88IdentityReportMessage​(LocoNetMessage m)  
      static boolean isIplDcs210IdentityReportMessage​(LocoNetMessage m)  
      static boolean isIplDcs210PlusIdentityReportMessage​(LocoNetMessage m)  
      static boolean isIplDcs240IdentityReportMessage​(LocoNetMessage m)  
      static boolean isIplDcs240PlusIdentityReportMessage​(LocoNetMessage m)  
      static boolean isIplDcs51IdentityReportMessage​(LocoNetMessage m)
      Check message m to determine if it contains a DSC51 IPL Identity Report message.
      static boolean isIplDcs52IdentityReportMessage​(LocoNetMessage m)
      Check message m to determine if it contains a DSC52 IPL Identity Report message.
      static boolean isIplDt402DIdentityReportMessage​(LocoNetMessage m)  
      static boolean isIplDt402IdentityReportMessage​(LocoNetMessage m)
      Check message m to determine if it contains a DT402 IPL Identity Report message.
      static boolean isIplDt500DIdentityReportMessage​(LocoNetMessage m)  
      static boolean isIplDt500IdentityReportMessage​(LocoNetMessage m)
      Check message m to determine if it contains a DT500 IPL Identity Report message.
      static boolean isIplIdentityQueryMessage​(LocoNetMessage m)
      Checks message m to determine if it contains a IPL Identity Report message.
      static boolean isIplIdentityReportMessage​(LocoNetMessage m)
      Checks message m to determine if it contains a IPL Identity Report message.
      static boolean isIplLnwiIdentityReportMessage​(LocoNetMessage m)  
      static boolean isIplPr3IdentityReportMessage​(LocoNetMessage m)
      Check message m to determine if it contains a PR3 IPL Identity Report message.
      static boolean isIplPr4IdentityReportMessage​(LocoNetMessage m)  
      boolean isIplQueryTimerRunning()  
      static boolean isIplSpecificIdentityReportMessage​(LocoNetMessage m, java.lang.Integer hostMfr, java.lang.Integer hostDevice)
      Check message m to determine if it contains an IPL Identity Report message for a specific host manufacturer and specific host device type.
      static boolean isIplUr92IdentityReportMessage​(LocoNetMessage m)
      Check message m to determine if it contains a UR92 IPL Identity Report message.
      static boolean isIplUr93IdentityReportMessage​(LocoNetMessage m)
      Check message m to determine if it contains a UR93 IPL Identity Report message.
      static boolean isIplUt4DIdentityReportMessage​(LocoNetMessage m)  
      static boolean isIplUt4IdentityReportMessage​(LocoNetMessage m)
      Check message m to determine if it contains a UT4 IPL Identity Report message.
      static boolean isValidMfgDevice​(int mfg, int deviceType)  
      void message​(LocoNetMessage m)
      Process all incoming LocoNet messages to look for IPL operations.
      void sendIplQueryAllDevices()  
      • Methods inherited from class javax.swing.JComponent

        addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUI, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
      • Methods inherited from class java.awt.Container

        add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
      • Methods inherited from class java.awt.Component

        action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • LnIPLImplementation

        public LnIPLImplementation​(LocoNetSystemConnectionMemo lnMemo)
        Constructor for LnIPMImplementation for a given LocoNetSystemConnectionMemo as provided by the instantiating method.
        Parameters:
        lnMemo - LocoNetSystemConnectionMemo for the LocoNet communication interface
    • Method Detail

      • createQueryAllIplDevicesPacket

        public static final LocoNetMessage createQueryAllIplDevicesPacket()
        Create a LocoNet packet which queries UR92(s) for Duplex group identification information. The invoking method is responsible for sending the message to LocoNet.
        Returns:
        a LocoNetMessage containing the packet required to query UR92 device Duplex Group Identity information
      • createIplSpecificHostQueryPacket

        public static final LocoNetMessage createIplSpecificHostQueryPacket​(java.lang.Integer hostMfr,
                                                                            java.lang.Integer hostDevice)
        Create a LocoNet packet which queries IPL devices by specific host manufacturer and specific host device type. The invoking method is responsible for sending the message to LocoNet.

        Note: Different devices may only respond to IPL Identity requests if the host manufacturer and host type are defined. Others devices will respond when host manufacturer and host type are left as zero.

        Parameters:
        hostMfr - the host manufacturer number
        hostDevice - the host device type number
        Returns:
        a LocoNetMessage containing the packet required to request IPL identity information from devices of the specified host manufacturer and host device type.
      • createIplSpecificSlaveQueryPacket

        public static final LocoNetMessage createIplSpecificSlaveQueryPacket​(java.lang.Integer slaveMfr,
                                                                             java.lang.Integer slaveDevice)
        Create a LocoNet packet which queries IPL devices by specific slave manufacturer and specific slave device type. The invoking method is responsible for sending the message to LocoNet.

        Note: Some devices have no "slave" device and may not respond to this message. Other devices may only respond if both manufacturer and device type information is specified for both host and slave.

        Parameters:
        slaveMfr - the slave manufacturer number
        slaveDevice - the slave device type number
        Returns:
        a LocoNetMessage containing the packet required to request IPL identity information from devices of the specified slave manufacturer and slave device type.
      • createIplSpecificSlaveQueryPacket

        public static final LocoNetMessage createIplSpecificSlaveQueryPacket​(java.lang.Integer hostMfr,
                                                                             java.lang.Integer hostDevice,
                                                                             java.lang.Integer slaveMfr,
                                                                             java.lang.Integer slaveDevice)
        Create a LocoNet packet which queries IPL devices by specific host manufacturer, specific host device type, specific slave manufacturer and specific slave device type. The invoking method is responsible for sending the message to LocoNet.

        Note: Different devices respond differently depending on whether host and/or slave manufacturer and/or device type information are provided.

        Parameters:
        hostMfr - the host manufacturer number
        hostDevice - the host device type number
        slaveMfr - the slave manufacturer number
        slaveDevice - the slave device type number
        Returns:
        a LocoNetMessage containing the packet required to request IPL identity information from devices of the specified host and slave manufacturers and host and slave device types.
      • createIplUr92QueryPacket

        public static final LocoNetMessage createIplUr92QueryPacket()
        Create a LocoNet packet which queries UR92 devices for IPL identification information. The invoking method is responsible for sending the message to LocoNet.
        Returns:
        a LocoNetMessage containing the packet required to query UR92 devices for IPL identification information
      • createIplDt402QueryPacket

        public static final LocoNetMessage createIplDt402QueryPacket()
        Create a LocoNet packet which queries DT402x throttles for IPL identification information. The invoking method is responsible for sending the message to LocoNet.
        Returns:
        a LocoNetMessage containing the packet required to query DT402x devices for IPL identification information
      • createIplUt4QueryPacket

        public static final LocoNetMessage createIplUt4QueryPacket()
        Create a LocoNet packet which queries (some) UT4 throttles for IPL identification information. The invoking method is responsible for sending the message to LocoNet.

        Note that UT4 and UT4R devices may not respond to this query. UT4D devices may respond to this query.

        Returns:
        a LocoNetMessage containing the packet required to query (some) UT4 devices for IPL identification information
      • createIplDcs51QueryPacket

        public static final LocoNetMessage createIplDcs51QueryPacket()
        Create a LocoNet packet which queries DCS51 devices for IPL identification information. The invoking method is responsible for sending the message to LocoNet.
        Returns:
        a LocoNetMessage containing the packet required to query DCS51 devices for IPL identification information
      • createIplDcs52QueryPacket

        public static final LocoNetMessage createIplDcs52QueryPacket()
        Create a LocoNet packet which queries DCS52 devices for IPL identification information. The invoking method is responsible for sending the message to LocoNet.
        Returns:
        a LocoNetMessage containing the packet required to query DCS52 devices for IPL identification information
      • createIplPr3QueryPacket

        public static final LocoNetMessage createIplPr3QueryPacket()
        Create a LocoNet packet which queries PR3 devices for IPL identification information. The invoking method is responsible for sending the message to LocoNet.
        Returns:
        a LocoNetMessage containing the packet required to query PR3 devices for IPL identification information
      • isIplIdentityQueryMessage

        public static final boolean isIplIdentityQueryMessage​(LocoNetMessage m)
        Checks message m to determine if it contains a IPL Identity Report message.
        Parameters:
        m - LocoNetMessage to be checked for an IPL Identity Query message
        Returns:
        true if message is report of IPL Identity
      • isIplIdentityReportMessage

        public static final boolean isIplIdentityReportMessage​(LocoNetMessage m)
        Checks message m to determine if it contains a IPL Identity Report message.
        Parameters:
        m - LocoNet message to check for an IPL Identity Report
        Returns:
        true if message is report of IPL Identity
      • isIplSpecificIdentityReportMessage

        public static final boolean isIplSpecificIdentityReportMessage​(LocoNetMessage m,
                                                                       java.lang.Integer hostMfr,
                                                                       java.lang.Integer hostDevice)
        Check message m to determine if it contains an IPL Identity Report message for a specific host manufacturer and specific host device type.
        Parameters:
        m - message to analyse
        hostMfr - the host manufacturer number
        hostDevice - the host device type number
        Returns:
        true if message is report of UR92 IPL Identity
      • isIplUr92IdentityReportMessage

        public static final boolean isIplUr92IdentityReportMessage​(LocoNetMessage m)
        Check message m to determine if it contains a UR92 IPL Identity Report message.
        Parameters:
        m - message to analyse
        Returns:
        true if message is report of UR92 IPL Identity
      • isIplDt402IdentityReportMessage

        public static final boolean isIplDt402IdentityReportMessage​(LocoNetMessage m)
        Check message m to determine if it contains a DT402 IPL Identity Report message.
        Parameters:
        m - message to analyse
        Returns:
        true if message is report of DT402 IPL Identity
      • isIplUt4IdentityReportMessage

        public static final boolean isIplUt4IdentityReportMessage​(LocoNetMessage m)
        Check message m to determine if it contains a UT4 IPL Identity Report message.
        Parameters:
        m - message to analyse
        Returns:
        true if message is report of UT4 IPL Identity
      • isIplDcs51IdentityReportMessage

        public static final boolean isIplDcs51IdentityReportMessage​(LocoNetMessage m)
        Check message m to determine if it contains a DSC51 IPL Identity Report message.
        Parameters:
        m - message to analyse
        Returns:
        true if message is report of DCS51 IPL Identity
      • isIplDcs52IdentityReportMessage

        public static final boolean isIplDcs52IdentityReportMessage​(LocoNetMessage m)
        Check message m to determine if it contains a DSC52 IPL Identity Report message.
        Parameters:
        m - message to analyse
        Returns:
        true if message is report of DCS52 IPL Identity
      • isIplUr93IdentityReportMessage

        public static final boolean isIplUr93IdentityReportMessage​(LocoNetMessage m)
        Check message m to determine if it contains a UR93 IPL Identity Report message.
        Parameters:
        m - message to analyse
        Returns:
        true if message is report of UR92 IPL Identity
      • isIplPr3IdentityReportMessage

        public static final boolean isIplPr3IdentityReportMessage​(LocoNetMessage m)
        Check message m to determine if it contains a PR3 IPL Identity Report message.
        Parameters:
        m - message to analyse
        Returns:
        true if message is report of PR3 IPL Identity
      • isIplDt500IdentityReportMessage

        public static final boolean isIplDt500IdentityReportMessage​(LocoNetMessage m)
        Check message m to determine if it contains a DT500 IPL Identity Report message.
        Parameters:
        m - message to analyse
        Returns:
        true if message is report of DT500 IPL Identity
      • extractInterpretedIplHostDevice

        public static final java.lang.String extractInterpretedIplHostDevice​(LocoNetMessage m)
        Extract the IPL Host manufacturer and Device information from m and return the interpreted information as a String.
        Parameters:
        m - LocoNet Message containg the IPL Identity report
        Returns:
        String containing the interpreted IPL Host Manufacturer and Device. If m is not a valid IPL Identity report, returns null.
      • extractInterpretedIplSlaveDevice

        public static final java.lang.String extractInterpretedIplSlaveDevice​(LocoNetMessage m)
        Extract the IPL Slave manufacturer and Device information from m.
        Parameters:
        m - IPL Identity message
        Returns:
        String containing the interpreted IPL Slave Manufacturer and Device. If m is not a valid IPL Identity report, returns null.
      • extractIplIdentityHostManufacturer

        public static final java.lang.Integer extractIplIdentityHostManufacturer​(LocoNetMessage m)
        Get the IPL host manufacturer number from an IPL Identity report message.

        The invoking method should ensure that message m is an IPL Identity message before invoking this method.

        Parameters:
        m - IPL Identity message
        Returns:
        Integer containing the IPL host manufacturer number
      • extractIplIdentityHostDevice

        public static final java.lang.Integer extractIplIdentityHostDevice​(LocoNetMessage m)
        Get the host device number from an IPL Identity report message.

        The invoking method should ensure that message m is is an IPL Identity message before invoking this method.

        Parameters:
        m - IPL Identity message
        Returns:
        Integer containing the IPL device number
      • extractIplIdentitySlaveManufacturer

        public static final java.lang.Integer extractIplIdentitySlaveManufacturer​(LocoNetMessage m)
        Get the slave manufacturer number from an IPL Identity report message.

        The invoking method should ensure that message m is is an IPL Identity message before invoking this method.

        NOTE: Not all IPL-capable devices implement a slave manufacturer number.

        Parameters:
        m - IPL Identity message
        Returns:
        Integer containing the IPL slave manufacturer number
      • extractIplIdentitySlaveDevice

        public static final java.lang.Integer extractIplIdentitySlaveDevice​(LocoNetMessage m)
        Get the slave device number from an IPL Identity report message.

        The invoking method should ensure that message m is is an IPL Identity message before invoking this method.

        NOTE: Not all IPL-capable devices implement a slave device number.

        Parameters:
        m - IPL Identity message
        Returns:
        Integer containing the IPL slave device number
      • extractIplIdentityHostFrimwareRev

        public static final java.lang.String extractIplIdentityHostFrimwareRev​(LocoNetMessage m)
        Get the host firmware revision number from an IPL Identity report message.

        The invoking method should ensure that message m is is an IPL Identity message before invoking this method.

        NOTE: Not all IPL-capable devices implement a host firmware revision number.

        Parameters:
        m - IPL Identity message
        Returns:
        String containing the IPL host firmware revision in the format x.y
      • extractIplIdentityHostFrimwareRevNum

        public static final java.lang.Integer extractIplIdentityHostFrimwareRevNum​(LocoNetMessage m)
        Get the host firmware revision number from an IPL Identity report message.

        The invoking method should ensure that message m is is an IPL Identity message before invoking this method..

        NOTE: Not all IPL-capable devices implement a host firmware revision number.

        Parameters:
        m - IPL Identity message
        Returns:
        Integer containing the IPL host firmware revision
      • extractIplIdentitySlaveFrimwareRevNum

        public static final java.lang.Integer extractIplIdentitySlaveFrimwareRevNum​(LocoNetMessage m)
        Get the Slave firmware revision number from an IPL Identity report message.

        The invoking method should ensure that message m is is an IPL Identity message before invoking this method..

        NOTE: Not all IPL-capable devices implement a Slave firmware revision number.

        Parameters:
        m - IPL Identity message
        Returns:
        Integer containing the IPL Slave firmware revision
      • extractIplIdentitySlaveFrimwareRev

        public static final java.lang.String extractIplIdentitySlaveFrimwareRev​(LocoNetMessage m)
        Get the slave firmware revision number from an IPL Identity report message.

        The invoking method should ensure that message m is is an IPL Identity message before invoking this method..

        NOTE: Not all IPL-capable devices implement a slave firmware revision number.

        Parameters:
        m - IPL Identity message
        Returns:
        String containing the IPL slave firmware revision in the format x.y
      • extractIplIdentityHostSerialNumber

        public static final java.lang.Long extractIplIdentityHostSerialNumber​(LocoNetMessage m)
        Get the host serial number from an IPL Identity report message.

        The invoking method should ensure that message m is is an IPL Identity message before invoking this method..

        NOTE: Not all IPL-capable devices implement a host serial number.

        Parameters:
        m - IPL Identity message
        Returns:
        Long containing the IPL host serial number
      • extractIplIdentitySlaveSerialNumber

        public static final java.lang.Long extractIplIdentitySlaveSerialNumber​(LocoNetMessage m)
        Get the slave serial number from an IPL Identity report message.

        The invoking method should ensure that message m is is an IPL Identity message before invoking this method.

        NOTE: Not all IPL-capable devices implement a slave serial number.

        Parameters:
        m - IPL Identity message
        Returns:
        Long containing the IPL slave serial number
      • interpretHostManufacturerDevice

        public static final java.lang.String interpretHostManufacturerDevice​(java.lang.Integer hostMfr,
                                                                             java.lang.Integer hostDevice,
                                                                             java.lang.Integer slaveMfr,
                                                                             java.lang.Integer slaveDevice)
        Interpret IPL Identity Host Manufacturer and Host Device number as a string.

        NOTE: Some IPL-capable devices cannot be completely determined based solely on Host Manufacturer number and Host Device number.

        NOTE: Some members of a device family do not support IPL. An interpreted IPL Host Manufacturer number and Host Device number might imply that all members do support IPL. As an example, UT4 and UT4R devices do not appear to support IPL, while UT4D appears to support IPL. This method will return "Digitrax UT4(x)" in response to appropriate Host Manufacturer number and appropriate Host Device number.

        Parameters:
        hostMfr - host manufacturer number
        hostDevice - host device number
        slaveMfr - slave manufacturer number
        slaveDevice - slave device number
        Returns:
        String containing Manufacturer name and Device model.
      • interpretHostManufacturerDevice

        public static final java.lang.String interpretHostManufacturerDevice​(java.lang.Integer hostMfr,
                                                                             java.lang.Integer hostDevice)
        Interpret IPL Identity Host Manufacturer and Host Device number as a string.

        NOTE: Some IPL-capable devices cannot be completely determined based solely on Host Manufacturer number and Host Device number.

        NOTE: Some members of a device family do not support IPL. An interpreted IPL Host Manufacturer number and Host Device number might imply that all members do support IPL. As an example, UT4 and UT4R devices do not appear to support IPL, while UT4D appears to support IPL. This method will return "Digitrax UT4(x)" in response to appropriate Host Manufacturer number and appropriate Host Device number.

        Parameters:
        hostMfr - host manufacturer number
        hostDevice - host device number
        Returns:
        String containing Manufacturer name and Device model.
      • interpretSlaveManufacturerDevice

        public static final java.lang.String interpretSlaveManufacturerDevice​(java.lang.Integer slaveMfr,
                                                                              java.lang.Integer slaveDevice)
        Interpret IPL Identity Slave Manufacturer and Slave Device number as a string.

        NOTE: Some IPL-capable devices may not be completely determined based solely on Slave Manufacturer number and Slave Device number.

        Parameters:
        slaveMfr - slave manufacturer number
        slaveDevice - slave device number
        Returns:
        String containing Slave Manufacturer name and Device model.
      • connect

        public void connect​(LnTrafficController t)
        Connect this instance's LocoNetListener to the LocoNet Traffic Controller.
        Parameters:
        t - a LocoNet Traffic Controller
      • dispose

        public void dispose()
        Break connection with the LnTrafficController and stop timers.
      • message

        public void message​(LocoNetMessage m)
        Process all incoming LocoNet messages to look for IPL operations. Ignores all other LocoNet messages.
        Specified by:
        message in interface LocoNetListener
        Parameters:
        m - incoming LocoNet message to be examined
      • isValidMfgDevice

        public static boolean isValidMfgDevice​(int mfg,
                                               int deviceType)
      • getManufacturer

        @CheckForNull
        public static java.lang.String getManufacturer​(int manuf)
        provides string representation for an IPL manufacturer number
        Parameters:
        manuf - IPL device manufacturer code number
        Returns:
        manufacturer name, or null if no known manufacturer name
      • getDeviceName

        @CheckForNull
        public static java.lang.String getDeviceName​(int manuf,
                                                     int device,
                                                     int slaveManuf,
                                                     int slave)