Class DeviceState


  • public abstract class DeviceState
    extends Object
    Device state information.
    • Constructor Detail

      • DeviceState

        public DeviceState()
    • Method Detail

      • getConnectionState

        @NonNull
        public abstract DeviceState.ConnectionState getConnectionState()
        Gets the device connection state.
        Returns:
        drone connection state
      • getConnectionStateCause

        @NonNull
        public abstract DeviceState.ConnectionStateCause getConnectionStateCause()
        Gets the reason why device is in the current state.
        Returns:
        current connection state cause
      • getConnectors

        @NonNull
        public abstract DeviceConnector[] getConnectors()
        Gets the list of available connectors for this device.
        Returns:
        the device connectors
      • getActiveConnector

        @Nullable
        public abstract DeviceConnector getActiveConnector()
        Gets the currently active connector.

        This is the connector using which the current device connection has been established.

        Returns:
        the currently active connector, or null if the device is not currently connected
      • canBeForgotten

        public abstract boolean canBeForgotten()
        Tells whether the device can be forgotten.

        A device may be forgotten if it has been connected once using the local connector or if any of is available connectors is a remote control.
        In that last case, the device will also be forgotten by the remote control device in question.

        Returns:
        true if the device can be forgotten, otherwise false
      • canBeDisconnected

        public abstract boolean canBeDisconnected()
        Tells whether the device can be disconnected.

        A device may be disconnected if it is currently connected through the local connector.
        Devices currently connected through remote controls CANNOT be disconnected (instead, the remote control itself has to be disconnected, or another device must be connected using that remote control).

        Returns:
        true if the device can be disconnected, otherwise false
      • canBeConnected

        public abstract boolean canBeConnected()
        Tells whether the device can be connected.

        A device may be connected as long as it is currently disconnected and has available device connectors through which to connect.

        Returns:
        true if the device can be connected, otherwise false