public static BoxrobotTransferLocation ToBoxrobotTransferLocation(this EnumMacDeviceId instance) { var idRange = instance.GetDrawerRange(); var drawerLocationRange = BoxrobotTransferLocation.Dontcare.GetDrawerRange(); var diff = instance - idRange.StartID; var rtnV = drawerLocationRange.Start + diff; return(rtnV); }
/// <summary>取得 Drawer Assembly intance</summary> /// <param name="instance"></param> /// <param name="key"></param> /// <param name="autoConnect"></param> /// <returns></returns> public static IMacHalDrawer GetDrawer(this MacHalContext instance, EnumMacDeviceId key, bool autoConnect = false) { var cabinet = instance.HalDevices[key.ToString()] as MacHalCabinet; var drawer = cabinet.MacHalDrawer; if (autoConnect) { drawer.HalConnect(); } return(drawer); }
public MacEnumDeviceDrawerRange() { StartID = EnumMacDeviceId.cabinet_drawer_01_01; EndID = EnumMacDeviceId.cabinet_drawer_07_05; }
public static MacEnumDeviceDrawerRange GetDrawerRange(this EnumMacDeviceId instance) { return(new MacEnumDeviceDrawerRange()); }
public void SetHalDevice(EnumMacDeviceId key, MacHalBase hal) { this.SetHalDevice(key, hal); }
public bool IsContainDevice(EnumMacDeviceId key) { return(this.IsContainDevice(key.ToString())); }
public MacHalBase GetHalDeviceOrDefault(EnumMacDeviceId key) { return(this.GetHalDeviceOrDefault(key.ToString())); }
public MacHalBase this[EnumMacDeviceId key] { get { return(this.GetHalDevice(key)); } set { this.SetHalDevice(key, value); } }