Interface XNetPortController

    • Method Detail

      • status

        boolean status()
        Check that this object is ready to operate. This is a question of configuration, not transient hardware status.
        Specified by:
        status in interface PortAdapter
        Returns:
        true if OK, at least as far as known
      • okToSend

        boolean okToSend()
        Can the port accept additional characters?

        This might go false for short intervals, but it might also stick off if something goes wrong.

        Returns:
        true if OK to send, else false.
      • setOutputBufferEmpty

        void setOutputBufferEmpty​(boolean s)
        We need a way to say if the output buffer is empty or not.
        Parameters:
        s - true to set buffer empty, else false.
      • hasTimeSlot

        boolean hasTimeSlot()
        Indicate the command station is currently providing a timeslot to this port controller.
        Returns:
        true if the command station is currently providing a timeslot.
      • setTimeSlot

        void setTimeSlot​(boolean timeslot)
        Set a variable indicating whether or not the command station is providing a timeslot.

        This method should be called with the paramter set to false if a "Command Station No Longer Providing a timeslot for communications" (01 05 04) is received.

        This method should be called with the parameter set to true if a "Command Station is providing a timeslot for communications again." (01 07 06) is received.

        Parameters:
        timeslot - true if a timeslot is being sent, false otherwise.