Материал из Module developer
Device.Set()
to execute the command of the native driver by sending the value to it. It works only for native drivers. The command can be activated by its index (the sequence number in the tree, beginning with zero) or name. If the command is not set up in the project tree, it cannot be executed.
Syntax
Module.GetDevice(driver).Set(command, value)
| input | sample | description |
| driver | "Driver 1" | type: string the driver name in the iRidium project |
| command | "Channel 1" | type: string, number the ID or name of the driver command |
| value | 100 | type: string, number the number or string to be transferred to the command to send to equipment |
| output |
| successful or not | type: Boolean successful |
Example:
//KNX. 0 - first Commands in project Tree; 100 - value to send, "Dimming" - command name Module.GetDevice("KNX Router (KNXnet/IP)").Set(0, 100); Module.GetDevice("KNX Router (KNXnet/IP)").Set("Dimming", 100); //Global Cahe. "Command 1" - name of command on GC output, "" - empty data Module.GetDevice("Global Cache").Set("Command 1", "") //HDL. "HDL-BUS Pro Network (UDP)" - name of network //"Dimmer" - name of Device in Network, "Channel 1" - name of Channel, 100 - value to send Module.GetDevice("HDL-BUS Pro Network (UDP)").Set("Dimmer:Channel 1", 100); //Domintell. "Domintell Network (UDP)" - name of network //"DDIM01" - name of Device in Network, "Channel 1" - name of Channel, 100 - value to send Module.GetDevice("Domintell Network (UDP)").Set("DDIM01:Channel 1", 100);
