Class Command<Ret>

java.lang.Object
com.flir.thermalsdk.live.remote.Command<Ret>

public abstract class Command<Ret> extends Object
Represents a command on the remote camera. Executing a command will send requests to the camera.
  • Constructor Details

    • Command

      public Command()
  • Method Details

    • isAvailable

      @BackgroundThread public abstract boolean isAvailable()
      Check if this command is available. Some commands are only supported by some types of cameras. Use this method to check if this command is supported before reading/writing.

      Note: this method may throw a RuntimeException if communication with the remote camera fails or some other problem occurs.

    • execute

      public abstract void execute(OnReceived<Ret> onReceived, OnRemoteError onError)
      Executes the command asynchronously.
      Parameters:
      onReceived - Callback that is invoked if the command was successfully executed. It may contain a data returned from executed command.
      onError - Callback that is invoked if any error occurred during update.
    • executeSync

      @BackgroundThread public abstract Ret executeSync()
      Executes the command synchronously (blocking). It may contain a data returned from executed command.

      Note: this method may throw a RuntimeException if communication with the remote camera fails or some other problem occurs.

      Returns:
      It may contain a data returned from executed command, or a Void meaning the command is not returning any value.