Package jmri

Interface AddressedProgrammerManager

    • Method Detail

      • getAddressedProgrammer

        @CheckForNull
        AddressedProgrammer getAddressedProgrammer​(boolean pLongAddress,
                                                   int pAddress)
        Gain access to a Addressed Mode Programmer without reservation.
        Parameters:
        pLongAddress - true if this is a long (14 bit) address, else false
        pAddress - specific decoder address to use
        Returns:
        null only if there isn't an Ops Mode Programmer in the system
      • reserveAddressedProgrammer

        @CheckForNull
        AddressedProgrammer reserveAddressedProgrammer​(boolean pLongAddress,
                                                       int pAddress)
        Gain access to a (the) Addressed Mode Programmer, in the process reserving it for yourself.
        Parameters:
        pLongAddress - true if this is a long (14 bit) address, else false
        pAddress - Specific decoder address to use
        Returns:
        null if the address is in use by a reserved programmer
      • isAddressedModePossible

        boolean isAddressedModePossible()
        Convenience method to check whether you'll be able to get an Addressed Mode programmer.
        Returns:
        false if there's no chance of getting one
      • isAddressedModePossible

        boolean isAddressedModePossible​(@Nonnull
                                        LocoAddress address)
        Convenience method to check whether you'll be able to get an Addressed Mode programmer for a specific address
        Parameters:
        address - the address to get a programmer for
        Returns:
        false if there's no chance of getting one
      • getDefaultModes

        @Nonnull
        java.util.List<ProgrammingModegetDefaultModes()
        Get the list of ProgrammingMode (generally) supported by Programmers provided by this Manager.

        Use this to enquire about modes before you're ready to request a specific programmer.

        If the order is significant, earlier modes are better.

        Returns:
        the programming modes or an empty list
      • getUserName

        @Nonnull
        java.lang.String getUserName()
        Provides the human-readable representation for including ProgrammerManagers directly in user interface controls, so it should return a user-provided name for this particular one.
        Returns:
        the name for the programmer
      • toString

        @Nonnull
        java.lang.String toString()
        Provides the human-readable representation for including ProgrammerManagers directly in user interface controls, so it should return a user-provided name for this particular one.
        Overrides:
        toString in class java.lang.Object
        Returns:
        the name for the programmer