Class Property<T>

java.lang.Object
com.flir.thermalsdk.live.remote.Property<T>
Type Parameters:
T - Type of the property.

public class Property<T> extends Object
Represents a property on the remote camera. Operating on the property will send requests to the camera.
  • Method Details

    • isAvailable

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

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

    • get

      public void get(OnReceived<T> onReceived, OnRemoteError onError)
      Gets a property value asynchronously.
      Parameters:
      onReceived - Callback that is invoked with the remote value if it was successfully fetched.
      onError - Callback that is invoked if any error occurred during update.
    • getSync

      @BackgroundThread public T getSync()
      Gets a property value synchronously (blocking).

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

      Returns:
      The remote value on success, or throws an exception on failure.
    • set

      public void set(T value, OnCompletion onCompletion, OnRemoteError onError)
      Sets a property value asynchronously.

      Note: this may throw UnsupportedOperationException if the operation is not supported (i.e. when trying to set read-only properties).

      Parameters:
      value - The new value to set.
      onCompletion - Callback that is invoked if the value was successfully updated.
      onError - Callback that is invoked if any error occurred during update.
    • setSync

      @BackgroundThread public ErrorCode setSync(T value)
      Sets a property value synchronously (blocking).

      Note: this may throw UnsupportedOperationException if the operation is not supported (i.e. when trying to set read-only properties).

      Parameters:
      value - The new value to set.
      Returns:
      Returns null if operation succeeded, otherwise returns an error code, indicating that the operation failed.
    • subscribe

      @BackgroundThread public ErrorCode subscribe(OnReceived<T> onReceived)
      Listen for when the Property changes. This method is blocking until subscription is set up or an error is returned.

      Note: this may throw UnsupportedOperationException if the operation is not supported (i.e. when a property is not subscribable).

      Parameters:
      onReceived - Callback to receive the new value when this property has been updated. It's called on a background thread.
      Returns:
      Returns null if operation succeeded, otherwise returns an error code, indicating that the operation failed.
    • unsubscribe

      @BackgroundThread public void unsubscribe()
      Revoke subscription. This method is blocking.

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

      Note: this may throw UnsupportedOperationException if the operation is not supported (i.e. when a property is not subscribable).