Class LocoIO

    • Constructor Detail

      • LocoIO

        public LocoIO()
        Create a new instance of LocoIO.
    • Method Detail

      • SENSOR_ADR

        public static int SENSOR_ADR​(int a1,
                                     int a2)
      • readCV

        public static LocoNetMessage readCV​(int locoIOAddress,
                                            int locoIOSubAddress,
                                            int cv)
        Compose a LocoNet message from the given ingredients for reading the value of one specific SV from a given LocoIO.
        Parameters:
        locoIOAddress - base address of the LocoIO board to read from
        locoIOSubAddress - subAddress of the LocoIO board
        cv - the SV index to query
        Returns:
        complete message to send
      • writeCV

        public static LocoNetMessage writeCV​(int locoIOAddress,
                                             int locoIOSubAddress,
                                             int cv,
                                             int data)
        Compose a LocoNet message from the given ingredients for reading the value of one specific SV from a given LocoIO.
        Parameters:
        locoIOAddress - base address of the LocoIO board to read from
        locoIOSubAddress - subAddress of the LocoIO board
        cv - the SV index to change
        data - the new value to store in the board's SV
        Returns:
        complete message to send
      • programLocoIOAddress

        public static void programLocoIOAddress​(int address,
                                                int subAddress,
                                                LnTrafficController ln)
        Compose and send a message out onto LocoNet changing the LocoIO hardware board address of all connected LocoIO boards.

        User is warned that this is a broadcast type operation.

        Parameters:
        address - the new base address of the LocoIO board to change
        subAddress - the new subAddress of the board
        ln - the TrafficController to use for sending the message
      • probeLocoIOs

        public static void probeLocoIOs​(LnTrafficController ln)
        Send out a probe of all connected LocoIO units on a given LocoNet connection.
        Parameters:
        ln - the TrafficController to use for sending the message