DeviceManager.cs 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. using System;
  2. using System.Collections.Generic;
  3. using System.IO;
  4. using Aitex.Core.Common;
  5. using Aitex.Core.RT.Device;
  6. using MECF.Framework.Common.Equipment;
  7. using CyberX8_RT.Devices;
  8. using CyberX8_RT.Devices.PUF;
  9. using CyberX8_RT.Devices.LinMot;
  10. using CyberX8_RT.Devices.Resistivity;
  11. using CyberX8_RT.Devices.Temperature;
  12. using CyberX8_RT.Devices.AXIS;
  13. using CyberX8_RT.Devices.Loader;
  14. using CyberX8_RT.Devices.TransPorter;
  15. using CyberX8_RT.Devices.PowerSupplier;
  16. using CyberX8_RT.Devices.Facilities;
  17. using CyberX8_RT.Devices.SRD;
  18. using MECF.Framework.Common.TwinCat;
  19. using MECF.Framework.Common.Beckhoff.IOAxis;
  20. using CyberX8_RT.Devices.Prewet;
  21. using MECF.Framework.Common.Device.LinMot;
  22. using CyberX8_RT.Devices.Safety;
  23. using CyberX8_RT.Modules.Dryer;
  24. using CyberX8_RT.Devices.Dryer;
  25. using CyberX8_RT.Devices.Rinse;
  26. using CyberX8_RT.Devices.SignalLight;
  27. using MECF.Framework.Common.ToolLayout;
  28. using CyberX8_RT.Devices.Reservoir;
  29. using CyberX8_RT.Devices.Metal;
  30. using CyberX8_RT.Devices.BarcodeReader;
  31. using MECF.Framework.RT.Core.Equipments;
  32. using System.Threading;
  33. using System.Reflection;
  34. using MECF.Framework.Common.Device.Galil;
  35. using static Mono.Security.X509.X520;
  36. using System.Windows.Media.Imaging;
  37. using CyberX8_RT.Devices.EFEM;
  38. namespace CyberX8_RT.Instances
  39. {
  40. public class DeviceEntity : DeviceEntityT<DeviceManager>
  41. {
  42. public DeviceEntity()
  43. {
  44. }
  45. }
  46. public class DeviceManager : DeviceManagerBase
  47. {
  48. #region 常量
  49. private const string STRATUS = "Stratus";
  50. #endregion
  51. /// <summary>
  52. /// 初始化
  53. /// </summary>
  54. /// <returns></returns>
  55. public override bool Initialize()
  56. {
  57. if(ModuleHelper.IsInstalled(ModuleName.PUF1))
  58. {
  59. InitPuf(ModuleName.PUF1);
  60. }
  61. PufDeviceTimer pufDeviceTimer = new PufDeviceTimer();
  62. AddCustomDevice(pufDeviceTimer);
  63. if (ModuleHelper.IsInstalled(ModuleName.Loader1))
  64. {
  65. InitLoader(ModuleName.Loader1);
  66. }
  67. if(ModuleHelper.IsInstalled(ModuleName.Transporter2))
  68. {
  69. InitLoaderTransporter(ModuleName.Transporter2);
  70. }
  71. if (ModuleHelper.IsInstalled(ModuleName.Transporter1))
  72. {
  73. InitProcessTransporter(ModuleName.Transporter1);
  74. }
  75. TransporterDeviceTimer transporterDeviceTimer = new TransporterDeviceTimer();
  76. AddCustomDevice(transporterDeviceTimer);
  77. if(ModuleHelper.IsInstalled(ModuleName.Prewet1))
  78. {
  79. InitializePrewet(ModuleName.Prewet1);
  80. }
  81. TotalSRDDevice totalSRDDevice = new TotalSRDDevice();
  82. AddCustomDevice(totalSRDDevice);
  83. if (ModuleHelper.IsInstalled(ModuleName.SRD1))
  84. {
  85. InitialSRD(ModuleName.SRD1);
  86. }
  87. if(ModuleHelper.IsInstalled(ModuleName.SRD2))
  88. {
  89. InitialSRD(ModuleName.SRD2);
  90. }
  91. SRDDeviceTimer srdDeviceTimer = new SRDDeviceTimer();
  92. AddCustomDevice(srdDeviceTimer);
  93. InitializeDryers();
  94. InitLinMotAxis();
  95. InitResisitivity();
  96. InitializeTemperature();
  97. InitializePowerSuppliers();
  98. InitializeRinses();
  99. InitializeMetals();
  100. InitializeReservoirs();
  101. InitBarcodeReader();
  102. SystemFacilities systemFacilities = new SystemFacilities();
  103. AddCustomModuleDevice(systemFacilities);
  104. SafetyDevice safetyDevice = new SafetyDevice();
  105. AddCustomDevice(safetyDevice);
  106. TotalReservoirDevice reservoirDevice = new TotalReservoirDevice();
  107. AddCustomDevice(reservoirDevice);
  108. AddCustomModuleDevice(new SunWaySignalTower("System", "SignalTower"));
  109. return true;
  110. }
  111. /// <summary>
  112. /// 初始化PF
  113. /// </summary>
  114. /// <param name="moduleName"></param>
  115. private void InitPuf(ModuleName moduleName)
  116. {
  117. GalilAxisConfig flipGalilAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(),"Flip");
  118. if (flipGalilAxis != null)
  119. {
  120. JetAxisBase pufFlipAxis = AxisManager.Instance.GetAxisInstance(flipGalilAxis.Type, moduleName.ToString(), "Flip");
  121. pufFlipAxis.InterLock = new PufFlipAxisInterLock(pufFlipAxis);
  122. AddCustomModuleDevice(pufFlipAxis);
  123. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), pufFlipAxis);
  124. }
  125. GalilAxisConfig rotationGalilAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(), "Rotation");
  126. if (rotationGalilAxis != null)
  127. {
  128. JetAxisBase rotationAxis = AxisManager.Instance.GetAxisInstance(rotationGalilAxis.Type, moduleName.ToString(), "Rotation");
  129. rotationAxis.InterLock = new PufRotationAxisInterLock(rotationAxis);
  130. AddCustomModuleDevice(rotationAxis);
  131. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), rotationAxis);
  132. }
  133. PufVacuum pufVacuum = new PufVacuum(moduleName.ToString());
  134. AddCustomModuleDevice(pufVacuum);
  135. PufDistanceSensor distanceSensor = new PufDistanceSensor(moduleName.ToString());
  136. AddCustomModuleDevice(distanceSensor);
  137. }
  138. /// <summary>
  139. /// 初始化Loader
  140. /// </summary>
  141. /// <param name="moduleName"></param>
  142. private void InitLoader(ModuleName moduleName)
  143. {
  144. GalilAxisConfig shuttleAGalilAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(),"ShuttleA");
  145. if (shuttleAGalilAxis != null)
  146. {
  147. JetAxisBase shuttleAAxis = AxisManager.Instance.GetAxisInstance(shuttleAGalilAxis.Type, moduleName.ToString(), "ShuttleA");
  148. AddCustomModuleDevice(shuttleAAxis);
  149. shuttleAAxis.InterLock = new LoaderShuttleAxisInterLock(shuttleAAxis);
  150. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), shuttleAAxis);
  151. }
  152. GalilAxisConfig shuttleBBeckhoffAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(),"ShuttleB");
  153. if (shuttleBBeckhoffAxis != null)
  154. {
  155. JetAxisBase shuttleBAxis = AxisManager.Instance.GetAxisInstance(shuttleBBeckhoffAxis.Type, moduleName.ToString(), "ShuttleB");
  156. AddCustomModuleDevice(shuttleBAxis);
  157. shuttleBAxis.InterLock = new LoaderShuttleAxisInterLock(shuttleBAxis);
  158. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), shuttleBAxis);
  159. }
  160. GalilAxisConfig tiltABeckhoffAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(), "TiltA");
  161. if (tiltABeckhoffAxis != null)
  162. {
  163. JetAxisBase tiltAAxis = AxisManager.Instance.GetAxisInstance(tiltABeckhoffAxis.Type, moduleName.ToString(), "TiltA");
  164. AddCustomModuleDevice(tiltAAxis);
  165. tiltAAxis.InterLock = new LoaderTiltAxisInterLock(tiltAAxis);
  166. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), tiltAAxis);
  167. }
  168. GalilAxisConfig tiltBBeckhoffAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(), "TiltB");
  169. if (tiltBBeckhoffAxis != null)
  170. {
  171. JetAxisBase tiltBAxis = AxisManager.Instance.GetAxisInstance(tiltBBeckhoffAxis.Type, moduleName.ToString(), "TiltB");
  172. AddCustomModuleDevice(tiltBAxis);
  173. tiltBAxis.InterLock = new LoaderTiltAxisInterLock(tiltBAxis);
  174. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), tiltBAxis);
  175. }
  176. GalilAxisConfig crsABeckhoffAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(), "LSA");
  177. if (crsABeckhoffAxis != null)
  178. {
  179. JetAxisBase crsAAxis = AxisManager.Instance.GetAxisInstance(crsABeckhoffAxis.Type, moduleName.ToString(), "LSA");
  180. AddCustomModuleDevice(crsAAxis);
  181. crsAAxis.InterLock = new LoaderCRSAxisInterLock(crsAAxis);
  182. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), crsAAxis);
  183. }
  184. GalilAxisConfig crsBBeckhoffAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(), "LSB");
  185. if (crsBBeckhoffAxis != null)
  186. {
  187. JetAxisBase crsBAxis = AxisManager.Instance.GetAxisInstance(crsBBeckhoffAxis.Type, moduleName.ToString(), "LSB");
  188. AddCustomModuleDevice(crsBAxis);
  189. crsBAxis.InterLock = new LoaderCRSAxisInterLock(crsBAxis);
  190. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), crsBAxis);
  191. }
  192. GalilAxisConfig rotationBeckhoffAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(), "Rotation");
  193. if (rotationBeckhoffAxis != null)
  194. {
  195. JetAxisBase rotationAxis = AxisManager.Instance.GetAxisInstance(rotationBeckhoffAxis.Type, moduleName.ToString(), "Rotation");
  196. AddCustomModuleDevice(rotationAxis);
  197. rotationAxis.InterLock = new LoaderRotationAxisInterLock(rotationAxis);
  198. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), rotationAxis);
  199. }
  200. LoaderSideDevice loaderSideA=new LoaderSideDevice(moduleName.ToString(),"SideA");
  201. AddCustomModuleDevice(loaderSideA);
  202. LoaderSideDevice loaderSideB = new LoaderSideDevice(moduleName.ToString(), "SideB");
  203. AddCustomModuleDevice(loaderSideB);
  204. LoaderCommonDevice loaderCommon=new LoaderCommonDevice(moduleName.ToString());
  205. AddCustomModuleDevice(loaderCommon);
  206. LoaderDeviceTimer loaderDevice=new LoaderDeviceTimer(moduleName.ToString());
  207. AddCustomDevice(loaderDevice);
  208. }
  209. /// <summary>
  210. /// 初始化 Loader Transporter
  211. /// </summary>
  212. /// <param name="moduleName"></param>
  213. private void InitLoaderTransporter(ModuleName moduleName)
  214. {
  215. GalilAxisConfig gantryGalilAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(), "Gantry");
  216. if (gantryGalilAxis != null)
  217. {
  218. JetAxisBase gantryAxis = AxisManager.Instance.GetAxisInstance(gantryGalilAxis.Type, moduleName.ToString(), "Gantry");
  219. AddCustomModuleDevice(gantryAxis);
  220. gantryAxis.InterLock = new LoaderTransPorterGantryAxisInterLock(gantryAxis);
  221. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), gantryAxis);
  222. }
  223. GalilAxisConfig elevatorGalilAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(), "Elevator");
  224. if (elevatorGalilAxis != null)
  225. {
  226. JetAxisBase elevatorAxis = AxisManager.Instance.GetAxisInstance(elevatorGalilAxis.Type, moduleName.ToString(), "Elevator");
  227. elevatorAxis.IsForwardSensorLimit = true;
  228. AddCustomModuleDevice(elevatorAxis);
  229. elevatorAxis.InterLock = new LoaderTransPorterElevatorAxisInterLock(elevatorAxis);
  230. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), elevatorAxis);
  231. }
  232. TransporterCommon transporterCommon = new TransporterCommon(moduleName.ToString());
  233. AddCustomModuleDevice(transporterCommon);
  234. }
  235. /// <summary>
  236. /// 初始化Process Transporter
  237. /// </summary>
  238. /// <param name="moduleName"></param>
  239. private void InitProcessTransporter(ModuleName moduleName)
  240. {
  241. GalilAxisConfig gantryGalilAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(), "Gantry");
  242. if (gantryGalilAxis != null)
  243. {
  244. JetAxisBase gantryAxis = AxisManager.Instance.GetAxisInstance(gantryGalilAxis.Type, moduleName.ToString(), "Gantry");
  245. AddCustomModuleDevice(gantryAxis);
  246. gantryAxis.InterLock = new ProcessTransporterGantryAxisInterLock(gantryAxis);
  247. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), gantryAxis);
  248. }
  249. GalilAxisConfig elevatorGalilAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(), "Elevator");
  250. if (elevatorGalilAxis != null)
  251. {
  252. JetAxisBase elevatorAxis = AxisManager.Instance.GetAxisInstance(elevatorGalilAxis.Type, moduleName.ToString(), "Elevator");
  253. elevatorAxis.IsForwardSensorLimit = true;
  254. AddCustomModuleDevice(elevatorAxis);
  255. elevatorAxis.InterLock = new ProcessTransporterElevatorAxisInterLock(elevatorAxis);
  256. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), elevatorAxis);
  257. }
  258. TransporterCommon transporterCommon = new TransporterCommon(moduleName.ToString());
  259. AddCustomModuleDevice(transporterCommon);
  260. }
  261. /// <summary>
  262. /// 初始化SRD
  263. /// </summary>
  264. /// <param name="moduleName"></param>
  265. private void InitialSRD(ModuleName moduleName)
  266. {
  267. //GalilAxisConfig armBeckhoffAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(), "Arm"); ;
  268. //if (armBeckhoffAxis != null)
  269. //{
  270. // JetAxisBase armAxis = AxisManager.Instance.GetAxisInstance(armBeckhoffAxis.Type, moduleName.ToString(), "Arm");
  271. // AddCustomModuleDevice(armAxis);
  272. // armAxis.InterLock = new SrdArmAxisInterLock(armAxis);
  273. // AxisManager.Instance.AddModuleAxis(moduleName.ToString(), armAxis);
  274. //}
  275. GalilAxisConfig rotationBeckhoffAxis = GalilControllerCfgManager.Instance.GetGalilAxisConfig(moduleName.ToString(), "Rotation");
  276. if (rotationBeckhoffAxis != null)
  277. {
  278. JetAxisBase rotationAxis = AxisManager.Instance.GetAxisInstance(rotationBeckhoffAxis.Type, moduleName.ToString(), "Rotation");
  279. AddCustomModuleDevice(rotationAxis);
  280. rotationAxis.InterLock = new SrdRotationAxisInterLock(rotationAxis);
  281. AxisManager.Instance.AddModuleAxis(moduleName.ToString(), rotationAxis);
  282. }
  283. SrdCommonDevice srdCommon = new SrdCommonDevice(moduleName.ToString());
  284. AddCustomModuleDevice(srdCommon);
  285. }
  286. /// <summary>
  287. /// 初即时化Prewet
  288. /// </summary>
  289. /// <param name="moduleName"></param>
  290. private void InitializePrewet(ModuleName moduleName)
  291. {
  292. PrewetDevice prewet = new PrewetDevice(moduleName.ToString());
  293. AddCustomDevice(prewet);
  294. }
  295. /// <summary>
  296. /// 初始化Dryers
  297. /// </summary>
  298. private void InitializeDryers()
  299. {
  300. foreach(string item in DryerItemManager.Instance.InstalledModules)
  301. {
  302. DryerDevice dryerDevice = new DryerDevice(item);
  303. AddCustomDevice(dryerDevice);
  304. }
  305. }
  306. /// <summary>
  307. /// 初始化LinMotAxis
  308. /// </summary>
  309. private void InitLinMotAxis()
  310. {
  311. foreach(string item in LinmotItemManager.Instance.InstalledModules)
  312. {
  313. LinmotItem linmotItem=LinmotItemManager.Instance.GetLinmotItem(item);
  314. for(int i = 0;i< linmotItem.Count; i++)
  315. {
  316. LinMotAxis linMotAxis = new LinMotAxis($"{item}-{i + 1}");
  317. linMotAxis.LastSwitchOff = linmotItem.ResetSwitchOff == 1;
  318. AddCustomDevice(linMotAxis);
  319. }
  320. }
  321. LinmotDeviceTimer linmotDeviceTimer = new LinmotDeviceTimer();
  322. AddCustomDevice(linmotDeviceTimer);
  323. }
  324. /// <summary>
  325. /// 初始化水阻计
  326. /// </summary>
  327. private void InitResisitivity()
  328. {
  329. foreach(string item in ResistivityProbeItemManager.Instance.InstalledModules)
  330. {
  331. ResistivityProbeItem resistivityItem = ResistivityProbeItemManager.Instance.GetResistivityProbeItem(item);
  332. for(int i=0;i<resistivityItem.Count;i++)
  333. {
  334. ResistivityController resistivityController = new ResistivityController($"{item}-{i + 1}");
  335. AddCustomDevice(resistivityController);
  336. }
  337. }
  338. }
  339. /// <summary>
  340. /// 初始化读码器
  341. /// </summary>
  342. private void InitBarcodeReader()
  343. {
  344. foreach (string item in BarcodeReaderItemManager.Instance.InstalledModules)
  345. {
  346. BarcodeReaderItem barcodeReaderItem = BarcodeReaderItemManager.Instance.GetBarcodeReaderItem(item);
  347. for (int i = 0; i < barcodeReaderItem.Count; i++)
  348. {
  349. BarcodeReaderController barcodeReaderController = new BarcodeReaderController($"{item}");
  350. AddCustomDevice(barcodeReaderController);
  351. }
  352. }
  353. }
  354. /// <summary>
  355. /// 初始化温度计
  356. /// </summary>
  357. private void InitializeTemperature()
  358. {
  359. foreach (string item in TemperatureItemManager.Instance.InstalledModules)
  360. {
  361. TemperatureItem temperatureItem = TemperatureItemManager.Instance.GetTemperatureItem(item);
  362. for (int i = 0; i < temperatureItem.Count; i++)
  363. {
  364. TemperatureController tempController = new TemperatureController($"{item}-{i + 1}");
  365. AddCustomDevice(tempController);
  366. }
  367. }
  368. }
  369. /// <summary>
  370. /// 初始化PowerSupplier
  371. /// </summary>
  372. private void InitializePowerSuppliers()
  373. {
  374. foreach(string item in PowerSupplierItemManager.Instance.InstalledModules)
  375. {
  376. PowerSupplierItem powerSupplierItem=PowerSupplierItemManager.Instance.GetPowerSupplierItem(item);
  377. for (int i = 0; i < powerSupplierItem.Count; i++)
  378. {
  379. CellPowerSupplier cellPowerSupplier = new CellPowerSupplier($"{item}-{i + 1}");
  380. AddCustomDevice(cellPowerSupplier);
  381. }
  382. }
  383. foreach(string item in CmmPowerItemManager.Instance.InstalledModules)
  384. {
  385. CmmPowerItem powerSupplierItem = CmmPowerItemManager.Instance.GetCmmPowerSupplierItem(item);
  386. for (int i = 0; i < powerSupplierItem.Count; i++)
  387. {
  388. CellPowerSupplier cellPowerSupplier = new CellPowerSupplier($"{item}-{i + 1}");
  389. AddCustomDevice(cellPowerSupplier);
  390. }
  391. }
  392. }
  393. /// <summary>
  394. /// 初始化Rinse集合
  395. /// </summary>
  396. private void InitializeRinses()
  397. {
  398. foreach(string item in RinseItemManager.Instance.InstalledModules)
  399. {
  400. RinseDevice rinseDevice=new RinseDevice(item);
  401. AddCustomDevice(rinseDevice);
  402. }
  403. }
  404. /// <summary>
  405. /// 初始化Reservoirs
  406. /// </summary>
  407. private void InitializeReservoirs()
  408. {
  409. foreach(string item in ReservoirItemManager.Instance.InstalledModules)
  410. {
  411. ReservoirItem reservoirItem = ReservoirItemManager.Instance.GetReservoirItem(item);
  412. if (reservoirItem.SubType == STRATUS)
  413. {
  414. StandardHotReservoirDevice reservoirDevice = new StandardHotReservoirDevice(item);
  415. AddCustomDevice(reservoirDevice);
  416. }
  417. else
  418. {
  419. CompactMembranReservoirDevice reservoirDevice = new CompactMembranReservoirDevice(item);
  420. AddCustomDevice(reservoirDevice);
  421. }
  422. }
  423. }
  424. /// <summary>
  425. /// 初始化Metals
  426. /// </summary>
  427. private void InitializeMetals()
  428. {
  429. foreach(string item in MetalItemManager.Instance.InstalledModules)
  430. {
  431. MetalItem metalItem = MetalItemManager.Instance.GetMetalItem(item);
  432. if (metalItem.SubType == STRATUS)
  433. {
  434. StandardHotMetalDevice metalDevice = new StandardHotMetalDevice(item);
  435. AddCustomDevice(metalDevice);
  436. }
  437. else
  438. {
  439. CompactMembranMetalDevice metalDevice = new CompactMembranMetalDevice(item);
  440. AddCustomDevice(metalDevice);
  441. }
  442. }
  443. }
  444. private bool Invoke(string arg1, object[] args)
  445. {
  446. string name = (string)args[0];
  447. string func = (string)args[1];
  448. object[] param = new object[args.Length - 2];
  449. for (int i = 2; i < args.Length; i++)
  450. param[i - 2] = args[i].ToString();
  451. DEVICE.Do(string.Format("{0}.{1}", name, func), 0, true, param);
  452. return true;
  453. }
  454. }
  455. }