Материал из Module developer
Example of full program code:
IR.AddListener(IR.EVENT_MODULE_START, 0, function(moduleID, busID) {
// Receiving the module copy // moduleID - the unique module identifier // Assigning the variable module var module = B.getModule(moduleID); // Form the subnet name and assign it to the variable netWorkName var netWorkName = "HDL-BUS Pro Network (UDP)" + busID; // Take the existing device and assign it to the variable device var device = IR.GetDevice(netWorkName); // Receiving the subnet address var subnetID = module.FromSubnetID; // Receiving the device number var deviceID = module.FromDeviceID; // Form the device name var deviceName = "HDL-MC48IPDMX.231"; // Form the channel name var statusOnStartName = 'deviceName + ":" + "statusOnStart" + moduleID'; // The separator used in commands var separator = 0x0; // The table of HDL command codes
