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

SubDevice.removeAction()

to remove Action of the subdevice

Syntax

Module.getSubDevice(name).removeAction(action)

input sample description
name "MySubDevice" type: string
the subdevice name in the iRidium project
action action type: Object
the action object
output
successful or not type: Boolean
successful


Example:

Module = B.getModule(ModuleID);
sub = Module.getSubDevice("MySubDevice");
channelName1 = "GRPS:myChannel" // full channel name for device "GPRS" and his channel "myChannel"
myAction = sub.addAction({  // create "send_number" action
            ActionType: "Simple",  
            Type: "send_number",   
            Param: SMSnumber, 
            ChannelName: channelName1,
            Name: "Send " + SMSnumber    
           });
SubDevice.removeAction(myAction);