Материал из Module developer
Перейти к: навигация, поиск

Device.GetServices

to get the device services

Syntax

IR.CreateDevice(IR.DEVICE_BLE_DEVICE).GetServices()

input sample description
ID IR.DEVICE_BLE_DEVICE type: Number
the identifier of the BLE scanner
output
Array of objects type: Array
the array of services (service - object)


Example:

var device = IR.CreateDevice(IR.DEVICE_BLE_DEVICE);
device.GetServices();

The fields of the service object (the OPTIONAL marker means you are not required to fill in the field, TO_DELETE - the field can be deleted later as it is almost useless):

  • Uuid: (String) - The service identifier
  • Value: (Array) - OPTIONAL, TO_DELETE The service value, mostly empty