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

SubDevice.removeEvent()

to remove Event of the subdevice

Syntax

Module.getSubDevice(name).removeEvent(event)

input sample description
name "MySubDevice" type: string
the subdevice name in the iRidium project
event event type: Object
the Event object
output

successful or not


Example:

Module = B.getModule(ModuleID);
sub = Module.getSubDevice("MySubDevice");
channelName1 = "GRPS:myChannel" // full channel name for device "GPRS" and his channel "myChannel"
myEvent = sub.addEvent({  // create "send_number" event
            eventType: "Simple",  
            Type: "send_number",   
            Param: SMSnumber, 
            ChannelName: channelName1,
            Name: "Send " + SMSnumber,
            Compare: "eq"
           });
SubDevice.removeEvent(myEvent);