Device QML Type

Device control APIs for halo LED, tone and volume. More...

Import Statement: import com.dolby.dcp.engine 1.0

Properties

Signals

Methods

Detailed Description

Property Documentation

[read-only] bleAdvertisingState : BleState

Parameter that indicates current advertising state of BLE module on the Dolby Conference Phone. This parameter can have one of the following values:

  • BleState.Idle : BLE module on the Dolby Conference Phone is idle.
  • BleState.Advertising : BLE module on the Dolby Conference Phone is advertising.

Example:

if (device.bleAdvertisingState == BleState.Advertising)
{
  device.stopBleAdvertisement();
}



Introduced in SDK version: 3

See also startBleAdvertisement() and stopBleAdvertisement().


[read-only] lastLogsUploadStatus : string

Indicates status of last logs upload request lastLogsUploadStatus can have one of the following values:

  • IN_PROGRESS - logs upload in progress
  • SUCCESS - logs uploaded successfully
  • FAILED - logs upload failed



Introduced in SDK version: 3

See also lastLogsUploadStatusChanged() and uploadLogs().


Signal Documentation

bleAdvertisingStateChanged(BleState state)

Notification indicating change in advertising state.

State can have one of the following values:

  • BleState.Idle : BLE module on the Dolby Conference Phone is idle.
  • BleState.Advertising : BLE module on the Dolby Conference Phone is advertising.



Introduced in SDK version: 3


bleError(BleError error)

Notification indicating error with advertising command.

Error can have one of the following values:

  • BleError.AdvertisementDataInvalid
  • BleError.AdvertisementEnableFailed
  • BleError.AdvertisementDisableFailed



Introduced in SDK version: 3


lastLogsUploadStatusChanged(string status)

Emitted when status for last logs upload request changes.

status can have one of the following values:

  • IN_PROGRESS - logs upload in progress
  • SUCCESS - logs uploaded successfully
  • FAILED - logs upload failed



Introduced in SDK version: 3

See also uploadLogs() and lastLogsUploadStatus.


Method Documentation

void playTone(ToneName toneName, int repeats, int repeatInterval)

Plays tone specified by toneName. Alerts can be replayed repeats times with pause of repeatInterval milliseconds.

Note: The app must wait at least 100 milliseconds between the two playTone() calls.

The toneName can have the following values:

  • ToneName.RING - Continuous ringing tone; must be stopped using stopTone().
  • ToneName.RINGBACK - Continuous ringback tone; must be stopped using stopTone().
  • ToneName.BUSY - Continuous busy tone; must be stopped using stopTone().
  • ToneName.CONFERENCE_JOIN - One-time playback tone that can be used when the phone joins the conference; repeats and repeatInterval are ignored.
  • ToneName.CONFERENCE_LEAVE - One-time playback tone that can be used when the phone leaves the conference; repeats and repeatInterval are ignored.
  • ToneName.KEYCLICK - One-time keyclick tone; repeats and repeatInterval are ignored.
  • ToneName.ALERT - One-time alert tone; can be repeated using repeats and repeatInterval.
  • ToneName.DTMF_0 - One-time DTMF 0 tone; repeats and repeatInterval are ignored.
  • ToneName.DTMF_1 - One-time DTMF 1 tone; repeats and repeatInterval are ignored.
  • ToneName.DTMF_2 - One-time DTMF 2 tone; repeats and repeatInterval are ignored.
  • ToneName.DTMF_3 - One-time DTMF 3 tone; repeats and repeatInterval are ignored.
  • ToneName.DTMF_4 - One-time DTMF 4 tone; repeats and repeatInterval are ignored.
  • ToneName.DTMF_5 - One-time DTMF 5 tone; repeats and repeatInterval are ignored.
  • ToneName.DTMF_6 - One-time DTMF 6 tone; repeats and repeatInterval are ignored.
  • ToneName.DTMF_7 - One-time DTMF 7 tone; repeats and repeatInterval are ignored.
  • ToneName.DTMF_8 - One-time DTMF 8 tone; repeats and repeatInterval are ignored.
  • ToneName.DTMF_9 - One-time DTMF 9 tone; repeats and repeatInterval are ignored.
  • ToneName.DTMF_STAR - One-time DTMF start(*) tone; repeats and repeatInterval are ignored.
  • ToneName.DTMF_POUND - One-time DTMF pound(#) tone; repeats and repeatInterval are ignored.

See also stopTone().


void setLedOff()

Turns off the halo LED if it is on.


void setLedOn(LedColor color, int onInterval, int offInterval)

Turns on the halo LED with color. You may specify an on time with onInterval and an off time with offInterval to create blink patterns. By default onInterval and offInterval are 0. Both onInterval and offInterval are in milliseconds.

The color can have one of the following values:

  • LedColor.RED
  • LedColor.GREEN
  • LedColor.BLUE

BleError startBleAdvertisement(string bleUuid, variant bleData, int bleAdvInterval)

Starts BLE (Bluetooth Low Energy) advertisement on the Dolby Conference Phone with the UUID and data provided by the application.

  • bleUuid is an application defined 2, 4, or 16 byte UUID represented as a string.
  • bleData is an application defined array of 8-bit integers. If app does not require this field, pass an empty array.
  • bleAdvInterval (optional) defines the BLE advertisement interval in milliseconds (default 100ms). Valid range is from 100ms to 5000ms in steps of 100ms.

Combined bleUuid and bleData cannot exceed 24 bytes. The BLE advertisement initiated from this API always carries Dolby's manufacturer ID (0x0309).

Refer to this link for more information on Bluetooth Low Energy Advertisement.

The function returns one of the following values:

  • BleError.Success : The request has been successfully accepted by the Dolby Conference Phone.
  • BleError.AdvertisementNotAllowed : Configuration parameter Dvms.Service.EnableBluetoothAdvertisement is set to false. Set parameter to true to use this feature.
  • BleError.UuidLengthInvalid : Length of the UUID parameter is invalid.
  • BleError.TotalLengthExceedsLimit : Total length of UUID plus data has exceeded the allowed limit (24 bytes).
  • BleError.ValueInvalid : Invalid data was provided to the API e.g. bleUuid = "18fg" , bleData = [0x0a, 0x18, 0x56, 0xFG]
  • BleError.BluetoothModuleNotInitialized : The BLE (Bluetooth Low Energy) module on the Dolby Conference Phone is not initialized.
  • BleError.AdvertisementIntervalInvalid : The advertisement interval in not within the allowed range.

Example:

// e.g. 2-byte UUID: "180d", 4-byte UUID: "bd65600d"
var err_code = device.startBleAdvertisement("bf4852bb-8293-487f-a74b-ca85dc562416", [0x0a, 0x18, 0x56, 0xFE]);
if (errCode != BleError.Success)
{
    // handle error here
}



Introduced in SDK version: 3

See also stopBleAdvertisement().


void stopBleAdvertisement()

Stops BLE (Bluetooth Low Energy) advertisement on the Dolby Conference Phone.



Introduced in SDK version: 3

See also startBleAdvertisement().


void stopTone()

Stops playing the current tone. The Dolby Conference Phone will silently ignore this request if no tone is being played.

See also playTone().


bool uploadLogs(url location, bool eventLogsOnly = false)

Upload Dolby Conference Phone logs to the URL specified in location. Set eventLogsOnly to true for uploading event logs only. The default value for eventLogsOnly is false and its an optional parameter. This method returns false when last request still in progress, true otherwise. Check lastLogsUploadStatus for final status of the request. Example:

// For full log upload
device.uploadLogs("http://mylogserver.net/dcplogs/logs20170330.tar.gz");
// For eventLogsOnly upload
device.uploadLogs("http://mylogserver.net/dcplogs/logs20170616.gz", true);

Note: Location URL must contain file name with following extensions:

  • .gz extension for eventLogsOnly upload
  • .tar.gz extension for full log upload



Introduced in SDK version: 3

Updated in SDK version: 4

See also lastLogsUploadStatus and lastLogsUploadStatusChanged().


void volumeDown()

Decreases the speech or ringer volume by a single step. Volume has 20 possible levels (1-20) with step size of 1. This API modifies the volume of the active audio stream. It changes the speech volume during an active call and the ringer volume while phone is not on a call.

To set a discrete volume value use Configuration::setSpeechVolume() and Configuration::setRingerVolume().


void volumeUp()

Increases the speech or ringer volume by a single step. Volume has 20 possible levels (1-20) with a step size of 1. This API modifies the volume of the active audio stream. It changes the speech volume during an active call and the ringer volume while phone is not on a call.

To set a discrete volume value use Configuration::setSpeechVolume() and Configuration::setRingerVolume().