Package com.flir.thermalsdk.live


package com.flir.thermalsdk.live
Allows to discover FLIR cameras available in the vicinity. This discovery will only find FLIR cameras. T&M devices (i.e. Meterlinks) will not be found using this functionality

The discovery is performed over any supported physical interfaces: USB, NETWORK ( WIFI / LAN / ETC). Discovery results in creating information about each supported FLIR Camera. Based on this information, it is possible to create a class representing a FLIR camera and connect to it.

The main class providing control over discovery process is DiscoveryFactory. Here User can start discovery over specific physical interface(s).

The discovery procedure is set up in 3 easy steps:

  1. obtain the DiscoveryFactory instance,
  2. set DiscoveryEventListener for it to receive notification about discovery events
  3. start it for a subset of physical interfaces defined by CommunicationInterface.
Remember the discovery should be finished, before closing the application or when you no longer need it.

All discovery events are passed through DiscoveryEventListener. It is called whenever a new supported FLIR camera is found or lost, or discovery process has finished due to it's limitations. when the OS stops a scan the DiscoveryEventListener.onDiscoveryFinished(CommunicationInterface) is called, this callback in NOT invoked when a client calls DiscoveryFactory.stop(), the the client will immediately be able to call start() after stop() without waiting for any callback.

Whenever new FLIR camera is found DiscoveryEventListener.onCameraFound(com.flir.thermalsdk.live.discovery.DiscoveredCamera) is called. Based on the Identity provided it is possible to create an object representing this camera.

A simple example showing how to manage discovery process and camera is shown below:

  public class MyDiscovery implements DiscoveryEventListener {

      public void startDiscovery() {
          DiscoveryFactory.getInstance().scan(this, CommunicationInterface.USB);
      }

      public void stopDiscovery() {
          DiscoveryFactory.getInstance().stop();
      }

      public void onCameraFound(DiscoveredCamera discoveredCamera) {
          // called for every Camera found
      }

      public void onCameraLost(Identity identity) {
          //Camera was lost from scanning
      }

      public void onDiscoveryError(CommunicationInterface communicationInterface, ErrorCode error) {
          // communicationInterface is the communication interface where the error occurred,
          the client might scan on several interfaces.
      }

      public void onDiscoveryFinished(CommunicationInterface communicationInterface) {
          // invoked if the OS is shutting down the scan (will NOT be called if the user calls "stop()"
      }
  }