Материал из Module developer
IR.EVENT_DESCRIPTOR_WRITE
the identifier of the event that the descriptor was rewritten
Syntax
IR.AddListener(IR.EVENT_DESCRIPTOR_WRITE, driver, function, [pointer]);
| input | sample | description |
| driver | IR.CreateDevice(IR.DEVICE_BLE_DEVICE) | type: object the reference to the driver |
| function | function() {} | type: function the unnamed function or reference to the function |
| pointer | - | type: object the pointer which serves the function (optional) |
| output |
| in_ServiceUuid | type: String the service identifier |
| in_CharacteristicUuid | type: String the identifier of the characteristic |
| in_uuid | type: String the descriptor identifier |
| in_status | 0 | type: Number 0 - successful (another code - error code) |
Example:
var device = IR.CreateDevice(IR.DEVICE_BLE_DEVICE); IR.AddListener(IR.EVENT_DESCRIPTOR_WRITE, device, function(in_ServiceUuid, in_CharacteristicUuid, in_uuid, in_status) { IR.Log(in_ServiceUuid + " " + in_CharacteristicUuid + " " + in_uuid + " " + in_status); })
