Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DeviceImpl

Hierarchy

  • DeviceImpl

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

Properties

_eventEmitter

_eventEmitter: _EventEmitter

connectionId

connectionId: number

deviceId

deviceId: number

deviceName

deviceName: string

devicePath

devicePath: string

deviceconnection

deviceconnection: DeviceConnectionType

dongleName

dongleName: string

errStatus

errStatus: ErrorStatus

isDongle

isDongle: boolean

isInFirmwareUpdateMode

isInFirmwareUpdateMode: boolean

isInUpgradeProgress

isInUpgradeProgress: boolean

parentDeviceId

parentDeviceId: number

parentInstanceId

parentInstanceId: string

productId

productId: number

serialNumber

serialNumber: string

variant

variant: string

vendorId

vendorId: number

Methods

IsYlHidStdHidSupportedAsync

  • IsYlHidStdHidSupportedAsync(): Promise<boolean>
  • Returns Promise<boolean>

RegEvent

  • Add event handler for btnPress device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843*

    Parameters

    Returns this

  • Add event handler for busyLightChange device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for downloadFirmwareProgress device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for onBTParingListChange device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for onGNPBtnEvent device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for onBatteryStatusUpdate device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for remoteMmi events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for onDevLogEvent device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for one of the different device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843*

    Parameters

    Returns this

  • Add event handler for one of the different device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843*

    Parameters

    Returns this

UnregEvent

  • Add event handler for btnPress device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843*

    Parameters

    Returns this

  • Add event handler for busyLightChange device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for downloadFirmwareProgress device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for onBTParingListChange device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for onGNPBtnEvent device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for onBatteryStatusUpdate device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for remoteMmi events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for onDevLogEvent device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843

    Parameters

    Returns this

  • Add event handler for one of the different device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843*

    Parameters

    Returns this

  • Add event handler for one of the different device events. Please make sure your callback arguments matches the event type or you will get a misleading typescript error. See also 30843*

    Parameters

    Returns this

answerCallAsync

  • answerCallAsync(cid: number): Promise<void>
  • Parameters

    • cid: number

    Returns Promise<void>

cameraAddPresetAsync

  • cameraAddPresetAsync(pathPic: string): Promise<void>
  • Parameters

    • pathPic: string

    Returns Promise<void>

cameraApplyPresetAsync

  • cameraApplyPresetAsync(presetIndex: number): Promise<void>
  • Parameters

    • presetIndex: number

    Returns Promise<void>

cameraDelAllPresetAsync

  • cameraDelAllPresetAsync(): Promise<void>
  • Returns Promise<void>

cameraDelPresetAsync

  • cameraDelPresetAsync(presetIndex: number): Promise<void>
  • Parameters

    • presetIndex: number

    Returns Promise<void>

cameraDirectionCtrlAsync

cameraGetAllPresetAsync

  • cameraGetAllPresetAsync(): Promise<Array<{ pathPic: string; presetIndex: number }>>
  • Returns Promise<Array<{ pathPic: string; presetIndex: number }>>

cameraGetSamrtTrackingOptAsync

cameraGetSmartTrackingOptInfoAsync

cameraIsFaceDetectionEnableAsync

  • cameraIsFaceDetectionEnableAsync(): Promise<boolean>
  • Returns Promise<boolean>

cameraIsInIdleAsync

  • cameraIsInIdleAsync(): Promise<boolean>
  • Returns Promise<boolean>

cameraIsReadyAsync

  • cameraIsReadyAsync(): Promise<boolean>
  • Returns Promise<boolean>

cameraPTZResetAsync

  • cameraPTZResetAsync(): Promise<void>
  • Returns Promise<void>

cameraSetFaceDetectionAsync

  • cameraSetFaceDetectionAsync(enable: boolean): Promise<void>
  • Parameters

    • enable: boolean

    Returns Promise<void>

cameraSetSmartTrackingOptAsync

cameraUpdatePresetAsync

  • cameraUpdatePresetAsync(presetIndex: number, pathPic: string): Promise<void>
  • Parameters

    • presetIndex: number
    • pathPic: string

    Returns Promise<void>

cameraZoomCtrlAsync

  • Parameters

    Returns Promise<void>

cancelFirmwareDownloadAsync

  • cancelFirmwareDownloadAsync(): Promise<void>
  • Cancels the firmware download (Async).

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

changeAudioModeAsync

  • changeAudioModeAsync(mode: AudioModes): Promise<void>
  • Parameters

    Returns Promise<void>

checkForFirmwareUpdateAsync

  • checkForFirmwareUpdateAsync(): Promise<boolean>
  • Check if Firmware update available for device.

    Returns Promise<boolean>

    • Resolve boolean if successful otherwise Reject with error.
    • true - if a new firmware update is available (existing firmware not up to date), false otherwise (existing firmware up to date).

clearPairedDeviceAsync

  • clearPairedDeviceAsync(deviceName: string, deviceBTAddr: string, isConnected: boolean): Promise<void>
  • Clear a device from paired device list.

    Parameters

    • deviceName: string

      name of device to be connected.

    • deviceBTAddr: string

      BTAddress of device to be connected.

    • isConnected: boolean

      current status of device to be connected.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

clearPairingListAsync

  • clearPairingListAsync(): Promise<void>
  • Clear list of paired BT devices from BT adapter.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

connectBTDeviceAsync

  • connectBTDeviceAsync(): Promise<void>
  • Connect/Reconnect Bluetooth device to the Yealink Bluetooth adapter. Ensure the Bluetooth device is switched on and within range.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

connectNewDeviceAsync

  • connectNewDeviceAsync(deviceName: string, deviceBTAddr: string, isConnected: boolean): Promise<void>
  • Connect a new device.

    Parameters

    • deviceName: string

      name of device to be connected.

    • deviceBTAddr: string

      BTAddress of device to be connected.

    • isConnected: boolean

      current status of device to be connected.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

connectPairedDeviceAsync

  • connectPairedDeviceAsync(deviceName: string, deviceBTAddr: string, isConnected: boolean): Promise<void>
  • Connect a device which was already paired.

    Parameters

    • deviceName: string

      name of device to be connected.

    • deviceBTAddr: string

      BTAddress of device to be connected.

    • isConnected: boolean

      current status of device to be connected.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.
    • Note : After device connection, getPairingListAsync api has to be called to get updated connection status.

disconnectBTDeviceAsync

  • disconnectBTDeviceAsync(): Promise<void>
  • Disconnect Bluetooth device from Bluetooth adapter.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

disconnectPairedDeviceAsync

  • disconnectPairedDeviceAsync(deviceName: string, deviceBTAddr: string, isConnected: boolean): Promise<void>
  • Disconnect a paired device.

    Parameters

    • deviceName: string

      name of device to be disconnected.

    • deviceBTAddr: string

      BTAddress of device to be disconnected.

    • isConnected: boolean

      current status of device to be disconnected.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.
    • Note : After device disconnection, getPairingListAsync api has to be called to get updated connection status.

downloadFirmwareAsync

  • downloadFirmwareAsync(version: string): Promise<void>
  • Downloads the specified firmware version file.

    Parameters

    • version: string

      Version for which file download needs to be initiated.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

enterDialCallAsync

  • enterDialCallAsync(cid: number): Promise<void>
  • Parameters

    • cid: number

    Returns Promise<void>

exportDevLogAsync

  • exportDevLogAsync(path: string): Promise<void>
  • Parameters

    • path: string

    Returns Promise<void>

factoryResetAsync

  • factoryResetAsync(): Promise<void>
  • Returns Promise<void>

getAutoConnectingAsync

  • getAutoConnectingAsync(): Promise<boolean>
  • Get Auto pairing mode enable or disable.

    Returns Promise<boolean>

    • Resolve boolean if successful otherwise Reject with error.
    • true if auto pairing mode is enabled, false otherwise.

getBatteryStatusAsync

  • getBatteryStatusAsync(): Promise<{ isBatteryLow?: undefined | false | true; isCharging?: undefined | false | true; levelInPercent?: undefined | number }>
  • Returns Promise<{ isBatteryLow?: undefined | false | true; isCharging?: undefined | false | true; levelInPercent?: undefined | number }>

getBusylightStatusAsync

getConnectedBTDeviceNameAsync

  • getConnectedBTDeviceNameAsync(): Promise<string>
  • Get name of connected BT device with BT Adapter(Async).

    Returns Promise<string>

    • Resolve deviceName string if successful otherwise Reject with error.

getDeviceImagePathAsync

  • getDeviceImagePathAsync(): Promise<string>
  • Returns Promise<string>

getDeviceInfo

getEqualizerModeAsync

getFirmwareFilePathAsync

  • getFirmwareFilePathAsync(version: string): Promise<string>
  • Get the file path of the downloaded file.

    Parameters

    • version: string

      Version for which the path is required.

    Returns Promise<string>

    • Resolve firmware file path string if successful otherwise Reject with error.
    • Note: Call downloadFirmwareAsync first to ensure that data is current

getFirmwareVersionAsync

  • getFirmwareVersionAsync(): Promise<string>
  • Get firmware version of the device.

    Returns Promise<string>

    • Resolve version string if successful otherwise Reject with error.

getHidWorkingStateAsync

getLatestFirmwareInformationAsync

  • getLatestFirmwareInformationAsync(): Promise<FirmwareInfo>
  • Gets details of the latest firmware present in cloud.

    Returns Promise<FirmwareInfo>

    • Resolve firminfo object if successful otherwise Reject with error.

getPairingListAsync

  • getPairingListAsync(): Promise<Array<{ deviceBTAddr: string; deviceName: string; isConnected: boolean }>>
  • Gets the list of devices which are paired previously.

    Returns Promise<Array<{ deviceBTAddr: string; deviceName: string; isConnected: boolean }>>

    • Resolve pairList array if successful otherwise Reject with error.

getRegionVersionAsync

  • getRegionVersionAsync(): Promise<string>
  • Returns Promise<string>

getRemoteMmiFocusAsync

  • Gets the focus of the remote MMI specified. Once a remote MMI has focus, the normal functionality of the MMI (button/LED) is suppressed until #releaseRemoteMmiFocusAsync is called. If only the LED output MMI functionality is required, action can be specified as MMI_ACTION_NONE.

    Parameters

    • type: RemoteMmiType

      Type of remote MMI to get focus of.

    • input: RemoteMmiInput

      Action to get focus of, acts as a filter/mask for the actions on the RemoteMmiCallback callback

    • priority: RemoteMmiPriority

      Priority of focus.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

getRemoteMmiTypesAsync

getSearchDeviceListAsync

  • getSearchDeviceListAsync(): Promise<Array<{ deviceBTAddr: string; deviceName: string; isConnected: boolean }>>
  • Gets the list of new devices which are available to pair & connect.

    Returns Promise<Array<{ deviceBTAddr: string; deviceName: string; isConnected: boolean }>>

    • Resolve pairList array if successful otherwise Reject with error.
    • Note: isConnected, flag in Pairing List Object, will always be false as device does not give connection status for the found device.

getSettingAsync

  • Gets the unique setting identified by a GUID of a device.

    Parameters

    • guid: string

      the unique setting identifier.

    Returns Promise<DeviceSettings>

    • Resolve setting array if successful otherwise Reject with error.

getSettingsAsync

  • Gets the complete settings details (all groups and its settings) for a device.

    Returns Promise<DeviceSettings>

    • Resolve setting array if successful otherwise Reject with error.

getSupportedFeaturesAsync

getWizardModeAsync

  • Returns Promise<WizardModes>

hasDectInDockedAsync

  • hasDectInDockedAsync(): Promise<boolean>
  • Returns Promise<boolean>

holdCallAsync

  • holdCallAsync(cid: number, contact: ContactInfo): Promise<void>
  • Parameters

    Returns Promise<void>

incomingCallAsync

  • incomingCallAsync(cid: number, contact: ContactInfo): Promise<void>
  • Parameters

    Returns Promise<void>

isAudioModeSupportedAsync

  • isAudioModeSupportedAsync(): Promise<boolean>
  • Returns Promise<boolean>

isBusylightSupportedAsync

  • isBusylightSupportedAsync(): Promise<boolean>
  • Returns Promise<boolean>

isEqualizerSupportedAsync

  • isEqualizerSupportedAsync(): Promise<boolean>
  • Returns Promise<boolean>

isFeatureSupportedAsync

  • isFeatureSupportedAsync(feature: DeviceFeature): Promise<boolean>
  • Parameters

    Returns Promise<boolean>

isHoldSupportedAsync

  • isHoldSupportedAsync(): Promise<boolean>
  • Returns Promise<boolean>

isMuteSupportedAsync

  • isMuteSupportedAsync(): Promise<boolean>
  • Returns Promise<boolean>

isOffHookSupportedAsync

  • isOffHookSupportedAsync(): Promise<boolean>
  • Returns Promise<boolean>

isOnlineSupportedAsync

  • isOnlineSupportedAsync(): Promise<boolean>
  • Returns Promise<boolean>

isPairingListSupportedAsync

  • isPairingListSupportedAsync(): Promise<boolean>
  • Checks if pairing list is supported by the device.

    Returns Promise<boolean>

    • Resolve boolean if successful otherwise Reject with error.
    • Returns true if pairing list is supported, false if device does not support pairing list.

isRemoteMmiInFocusaAsync

  • isRemoteMmiInFocusaAsync(type: RemoteMmiType): Promise<boolean>
  • Gets the status of the remote MMI focus.

    Parameters

    Returns Promise<boolean>

    returns true if in focus, false if not.

isRingSupportedAsync

  • isRingSupportedAsync(): Promise<boolean>
  • Returns Promise<boolean>

isSetDateTimeSupportedAsync

  • isSetDateTimeSupportedAsync(): Promise<boolean>
  • Returns Promise<boolean>

isStdHidEventsFromYealinkDevicesAsync

  • isStdHidEventsFromYealinkDevicesAsync(): Promise<boolean>
  • Returns Promise<boolean>

isUploadRingtoneSupportedAsync

  • isUploadRingtoneSupportedAsync(): Promise<boolean>
  • Returns Promise<boolean>

isWizardModeSupportedAsync

  • isWizardModeSupportedAsync(): Promise<boolean>
  • Returns Promise<boolean>

muteCallAsync

  • muteCallAsync(cid: number): Promise<void>
  • Parameters

    • cid: number

    Returns Promise<void>

outgoingCallAsync

  • outgoingCallAsync(cid: number, contact: ContactInfo): Promise<void>
  • Parameters

    Returns Promise<void>

playRingtoneAsync

  • playRingtoneAsync(type: number): Promise<void>
  • Parameters

    • type: number

    Returns Promise<void>

rebootDeviceAsync

  • rebootDeviceAsync(): Promise<void>
  • Returns Promise<void>

releaseRemoteMmiFocusAsync

  • Releases the focus of the remote MMI specified. Note that focus on all actions are removed.

    Parameters

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

resumeCallAsync

  • resumeCallAsync(cid: number): Promise<void>
  • Parameters

    • cid: number

    Returns Promise<void>

ringBackCallAsync

  • ringBackCallAsync(cid: number): Promise<void>
  • Parameters

    • cid: number

    Returns Promise<void>

scanNewDevicesAsync

  • scanNewDevicesAsync(): Promise<void>
  • Search for available Bluetooth devices which are switched on, within range and ready to connect.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

setAutoConnectingAsync

  • setAutoConnectingAsync(value: boolean): Promise<void>
  • When Bluetooth adapter is plugged into the PC it will attempt to connect with the last connected Bluetooth device. If it cannot connect, it will automatically search for new Bluetooth devices to connect to.

    Parameters

    • value: boolean

      enable or disable for auto pairing.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

setBTDiscoverableAsync

  • setBTDiscoverableAsync(): Promise<void>
  • Set the bluetooth device in pairing mode.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

setBusylightStatusAsync

  • Parameters

    Returns Promise<void>

setContactInfoListAsync

  • Parameters

    Returns Promise<void>

setCurrentTalkContactAsync

  • setCurrentTalkContactAsync(contact: ContactInfo): Promise<void>
  • Parameters

    Returns Promise<void>

setDateTimeAsync

  • setDateTimeAsync(dataTime: DateTime): Promise<void>
  • Parameters

    Returns Promise<void>

setEqualizerModeAsync

  • Parameters

    Returns Promise<void>

setHidWorkingStateAsync

  • setHidWorkingStateAsync(hidWorkState: HidWorkState): Promise<void>
  • Parameters

    Returns Promise<void>

setHoldAsync

  • setHoldAsync(enable: boolean): Promise<void>
  • Parameters

    • enable: boolean

    Returns Promise<void>

setMuteAsync

  • setMuteAsync(enable: boolean): Promise<void>
  • Parameters

    • enable: boolean

    Returns Promise<void>

setOffHookAsync

  • setOffHookAsync(enable: boolean): Promise<void>
  • Parameters

    • enable: boolean

    Returns Promise<void>

setOnline

  • setOnline(enable: boolean): Promise<void>
  • Parameters

    • enable: boolean

    Returns Promise<void>

setRemoteMmiActionAsync

  • Sets an output action on the remote MMI. Note that getRemoteMmiFocusAsync must be called once for the enumRemoteMmiType in question prior to setting the output action, else YealinkError is returned.

    Parameters

    Returns Promise<void>

    returns true if in focus, false if not.

setRingAsync

  • setRingAsync(enable: boolean): Promise<void>
  • Parameters

    • enable: boolean

    Returns Promise<void>

setSettingsAsync

  • Sets all the settings( including all groups and its settings) for a device.

    Parameters

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error, reboot etc.

    Nb. Currently this method returns an error with code=24 if rebooting as bi-result. TODO: Change signature to return reboot information normally instead.

setStdHidEventsFromYealinkDevicesAsync

  • setStdHidEventsFromYealinkDevicesAsync(enable: boolean): Promise<void>
  • Parameters

    • enable: boolean

    Returns Promise<void>

setWizardModeAsync

  • Parameters

    Returns Promise<void>

startExportAudioAsync

  • startExportAudioAsync(path: string): Promise<void>
  • Parameters

    • path: string

    Returns Promise<void>

stopBTScanAsync

  • stopBTScanAsync(): Promise<void>
  • Stop search for available Bluetooth devices.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

stopExportAudioAsync

  • stopExportAudioAsync(): Promise<void>
  • Returns Promise<void>

terminateCallAsync

  • terminateCallAsync(cid: number): Promise<void>
  • Parameters

    • cid: number

    Returns Promise<void>

unmuteCallAsync

  • unmuteCallAsync(cid: number): Promise<void>
  • Parameters

    • cid: number

    Returns Promise<void>

updateContactAsync

  • updateContactAsync(cid: number, contact: ContactInfo): Promise<void>
  • Parameters

    Returns Promise<void>

updateFirmwareAsync

  • updateFirmwareAsync(fwPath: string): Promise<void>
  • Upgrades / Updates the firmware for the target device with specified version.

    Parameters

    • fwPath: string

      firmware file path.

    Returns Promise<void>

    • Resolve void if successful otherwise Reject with error.

uploadDevLogToCloudAsync

  • uploadDevLogToCloudAsync(): Promise<void>
  • Returns Promise<void>

uploadRingtoneAsync

  • uploadRingtoneAsync(path: string): Promise<void>
  • Parameters

    • path: string

    Returns Promise<void>

Generated using TypeDoc