File

src/interfaces/iDeviceManager.ts

Description

Interface used for performing actions on the camera.

Index

Properties
Methods

Methods

closeConnection
closeConnection()

Closes the communication channels with the camera in use.

Returns : Promise<any>

Returns a promise which resolves for successful connnection close or rejects otherwise.

eraseErrorLog
eraseErrorLog(timeout: number)

Performs an erase action on the camera log.

Parameters :
Name Type Optional Description
timeout number No

Timeout argument given in milliseconds to interrupt the process in case it takes longer than expected.

Returns : Promise<void>
getDetector
getDetector(opts: DetectorOpts)

Returns a new instance of the Detector class.

Parameters :
Name Type Optional Description
opts DetectorOpts No

Detector options

Returns : IDetector

Returns a new instance of the Detector class.

getDiagnostics
getDiagnostics()

Reads data from camera and returns diagnostics information

Returns : Promise<Array<DiagnosticsMessage>>

an array of DiagnosticsMessages

getErrorLog
getErrorLog(timeout: number)

Retrieves the camera log.

Parameters :
Name Type Optional Description
timeout number No

Timeout argument given in milliseconds to interrupt the process in case it takes longer than expected.

Returns : Promise<any>

A UTF8 string representation of the camera log.

getInfo
getInfo()

Retrieves camera information such as name, serial number, software version etc.

Returns : Promise<any>

A JSON representation of the camera information.

getPowerUsage
getPowerUsage()

Reads out the power consumtion on the camera.

Returns : Promise<any>

An object containing different power consumtion parameters.

getState
getState()

Reads out the current autozoom state on the camera (currently supported only on Huddly IQ)

Returns : Promise<any>

A JSON representation of the camera state such as is genius framing enabled.

getTemperature
getTemperature()

Reads out the internal and external temperature on the camera.

Returns : Promise<any>

An object containing the internal and external temperature values.

getUpgrader
getUpgrader()

Get an IDeviceUpgrader object for the given device manager which can be used to perform camera upgrades.

Returns a promise with an instance of IDeviceUpgrader interface used for upgrading the camera.

initialize
initialize()

Class initialization function.

Returns : Promise<void>
reboot
reboot(mode?: string)

Reboots the camera into a specific mode.

Parameters :
Name Type Optional Description
mode string Yes

The desired mode used by the camera after rebooting.

Returns : Promise<void>
upgrade
upgrade(opts: UpgradeOpts)

Convenience function for performing camera upgrade.

Parameters :
Name Type Optional Description
opts UpgradeOpts No

Camera upgrade options

Returns : Promise<any>

Returns a promise which resolves for a successful upgrade or rejects otherwise.

Properties

api
api: Api
Type : Api

Utility class used to perform different actions on the device.

logger
logger: any
Type : any

Utility class used to log messages (used for debugging purposes). Required class/object methods are "info", "warn" and "error" with each method having a string parameter that describes the log message!

transport
transport: ITransport
Type : ITransport

The transport implementation used to communicate with the device.

uvcControlInterface
uvcControlInterface: any
Type : any

Device interface that is used to perform standard UVC-XU control actions on the device such as Zoom, Pan, Tilt, Brightness etc.

import ITransport from './iTransport';
import Api from './../components/api';
import IDeviceUpgrader from './IDeviceUpgrader';
import IDetector from './IDetector';
import UpgradeOpts from './IUpgradeOpts';
import DetectorOpts from './IDetectorOpts';
import { DiagnosticsMessage } from '../components/diagnosticsMessage';

/**
 * Interface used for performing actions on the camera.
 *
 * @export
 * @interface IDeviceManager
 */
export default interface IDeviceManager {
  /**
   * The transport implementation used to communicate with the device.
   *
   * @type {ITransport}
   * @memberof IDeviceManager
   */
  transport: ITransport;

  /**
   * Utility class used to perform different actions on the device.
   *
   * @type {Api}
   * @memberof IDeviceManager
   */
  api: Api;

  /**
   * Device interface that is used to perform standard UVC-XU control actions on
   * the device such as Zoom, Pan, Tilt, Brightness etc.
   *
   * @type {*}
   * @memberof IDeviceManager
   */
  uvcControlInterface: any;

  /**
   * Utility class used to log messages (used for debugging purposes). Required
   * class/object methods are "info", "warn" and "error" with each method
   * having a string parameter that describes the log message!
   *
   * @type {any}
   * @memberof IDeviceManager
   */
  logger: any;

  /**
   * Class initialization function.
   *
   * @returns {Promise<void>}
   * @memberof IDeviceManager
   */
  initialize(): Promise<void>;

  /**
   * Closes the communication channels with the camera in use.
   *
   * @returns {Promise<any>} Returns a promise which resolves for
   * successful connnection close or rejects otherwise.
   * @memberof IDeviceManager
   */
  closeConnection(): Promise<any>;

  /**
   * Retrieves camera information such as name, serial number, software version etc.
   *
   * @returns {Promise<any>} A JSON representation of the camera information.
   * @memberof IDeviceManager
   */
  getInfo(): Promise<any>;

  /**
   * Retrieves the camera log.
   *
   * @param {number} timeout Timeout argument given in milliseconds to interrupt the process
   * in case it takes longer than expected.
   * @returns {Promise<any>} A UTF8 string representation of the camera log.
   * @memberof IDeviceManager
   */
  getErrorLog(timeout: number): Promise<any>;

  /**
   * Performs an erase action on the camera log.
   *
   * @param {number} timeout Timeout argument given in milliseconds to interrupt the process
   * in case it takes longer than expected.
   * @returns {Promise<void>}
   * @memberof IDeviceManager
   */
  eraseErrorLog(timeout: number): Promise<void>;

  /**
   * Reboots the camera into a specific mode.
   *
   * @param {string} [mode] The desired mode used by the camera  after rebooting.
   * @returns {Promise<void>}
   * @memberof IDeviceManager
   */
  reboot(mode?: string): Promise<void>;

  /**
   * Get an `IDeviceUpgrader` object for the given device manager which can
   * be used to perform camera upgrades.
   *
   * @returns {Promise<IDeviceUpgrader>} Returns a promise with an instance of `IDeviceUpgrader` interface used for upgrading the camera.
   * @memberof HuddlySdk
   */
  getUpgrader(): Promise<IDeviceUpgrader>;

  /**
   * Convenience function for performing camera upgrade.
   *
   * @param {UpgradeOpts} opts Camera upgrade options
   * @returns {Promise <any>} Returns a promise which resolves for a
   * successful upgrade or rejects otherwise.
   * @memberof IDeviceManager
   */
  upgrade(opts: UpgradeOpts): Promise<any>;

  /**
   * Returns a new instance of the Detector class.
   * @param {DetectorOpts} opts Detector options
   * @returns {IDetector} Returns a new instance of the Detector class.
   * @memberof HuddlySdk
   */
  getDetector(opts: DetectorOpts): IDetector;

  /**
   * Reads data from camera and returns diagnostics information
   *
   * @returns an array of DiagnosticsMessages
   */
  getDiagnostics(): Promise<Array<DiagnosticsMessage>>;

  /**
   * Reads out the current autozoom state on the camera (currently supported only on Huddly IQ)
   *
   * @returns {Promise<any>} A JSON representation of the camera state such as is genius framing enabled.
   * @memberof IDeviceManager
   */
  getState(): Promise<any>;

  /**
   * Reads out the power consumtion on the camera.
   *
   * @returns {Promise<any>} An object containing different power consumtion parameters.
   * @memberof IDeviceManager
   */
  getPowerUsage(): Promise<any>;

  /**
   * Reads out the internal and external temperature on the camera.
   *
   * @returns {Promise<any>} An object containing the internal and external temperature values.
   * @memberof IDeviceManager
   */
  getTemperature(): Promise<any>;
}

result-matching ""

    No results matching ""