/* * Copyright (c) 2018 iTAC Software AG, Germany. All Rights Reserved. * * This software is protected by copyright. Under no circumstances may any part of this file in any form be copied, * printed, edited or otherwise distributed, be stored in a retrieval system, or be translated into another language * without the written permission of iTAC Software AG. */ // created 23.11.2018 08:08:14 // skip property Dictionary`2, property in exclude list // skip property StationTopologyConfiguration[], property in exclude list // skip property Double, property in exclude list // skip property Double, property in exclude list // skip property DictionaryProxy`2, property in exclude list // skip property HardwareConfiguration, declared in Station // skip property ListProxy`1, property in exclude list // skip property SWPlatform, declared in Station // skip property ArrayList, property in exclude list // skip property StationTopologyConfiguration, declared in Station // skip property StationType, declared in Station // skip property Int32, property in exclude list // skip property StaticVisionSystem, declared in Station // skip property VisionSystemType, declared in Station // skip property ArrayList, property in exclude list // skip property String, property in exclude list // skip property ArrayList, property in exclude list using System; using System.Collections.Generic; using com.itac.oib.siplacepro.contracts.types; namespace com.itac.oib.siplacepro.contracts.data { // source: assembly 3.2.0.152 // source: assembly ASM.AS.OIB.SIPLACEPro.Proxy public class StationMapper { // used for itac->asm: True // used for asm->itac: True // maps iTAC namespace conform type to ASM namespace type public static Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Station get(Station itacStation) { if (itacStation == null) { return null; } Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Station asmStation = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Station(Asm.As.Oib.SiplacePro.Proxy.Business.Types.ResourceIDs.AttachableheadtypeCp_20); mapItac2Asm(asmStation, itacStation); return asmStation; } public static void mapItac2Asm(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Station asmStation, Station itacStation) { // skip property Dictionary`2, property in exclude list // skip property StationTopologyConfiguration[], property in exclude list asmStation.CanScanComponentBarcodes = itacStation.CanScanComponentBarcodes; asmStation.HasPCBBarcodeReadingSystem = itacStation.HasPCBBarcodeReadingSystem; // skip property Double, property in exclude list // skip property Double, property in exclude list asmStation.OffsetZ = itacStation.OffsetZ; // complex property SkipPCB, isArray:False, isGeneric:False asmStation.SkipPCB = com.itac.oib.siplacepro.contracts.types.SkipBoardWithUnknownBarcodeMapper.get( itacStation.SkipPCB); asmStation.IPName = itacStation.IPName; asmStation.IPAddress = itacStation.IPAddress; asmStation.FixedConveyorRailDefaultDistanceOffset = itacStation.FixedConveyorRailDefaultDistanceOffset; asmStation.Allow407TraceSOKO = itacStation.Allow407TraceSOKO; // skip property DictionaryProxy`2, property in exclude list asmStation.MaxNumberOfPlacementsPerGantry = itacStation.MaxNumberOfPlacementsPerGantry; asmStation.TraceabilitySystem = itacStation.TraceabilitySystem; // skip property HardwareConfiguration, declared in Station asmStation.EnableAlternativeComponents = itacStation.EnableAlternativeComponents; // skip property ListProxy`1, property in exclude list // skip property SWPlatform, declared in Station asmStation.SoftwareVersion = itacStation.SoftwareVersion; // skip property ArrayList, property in exclude list // skip property StationTopologyConfiguration, declared in Station asmStation.IPAddressString = itacStation.IPAddressString; // skip readonly property IsOptionalRev12NozzleChangerPerPocket // skip readonly property IsAlwaysRev12NozzleChangerPerPocket // skip readonly property IsLongBoardOptionSupported // skip readonly property IsAlternativeComponentsOptionSupported asmStation.AllowPerPocketRev12NozzleChanger = itacStation.AllowPerPocketRev12NozzleChanger; asmStation.WhisperDownTheLine = itacStation.WhisperDownTheLine; // skip readonly property SupportsWisperingDownTheLine // skip readonly property SupportsPCBBarcode // skip property StationType, declared in Station // skip property Int32, property in exclude list // skip property StaticVisionSystem, declared in Station // skip property VisionSystemType, declared in Station // skip property ArrayList, property in exclude list // skip property String, property in exclude list // skip property ArrayList, property in exclude list asmStation.HardwareVersion = itacStation.HardwareVersion; // skip readonly property NumericalSoftwareVersion // skip readonly property Name // skip readonly property FullPath } // maps iTAC namespace conform array to ASM namespace array public static Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Station[] get(Station[] itacStation) { if (itacStation == null) { return null; } Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Station[] asmStation = new Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Station[itacStation.Length]; for (int i = 0; i < itacStation.Length; i++) { // to itac array asmStation[i] = StationMapper.get(itacStation[i]); } return asmStation; } // maps iTAC namespace conform array to ASM namespace list public static List getList(Station[] asmStation) { if (asmStation == null) { return null; } List itacStation = new List(); for (int i = 0; i < asmStation.Length; i++) { itacStation.Add(StationMapper.get(asmStation[i])); } return itacStation; } // map type from ASM namespace to iTAC namespace public static Station get(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Station asmStation) { if (asmStation == null) { return null; } Station itacStation = new Station(); mapAsm2Itac(asmStation, itacStation); return itacStation; } public static void mapAsm2Itac(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Station asmStation, Station itacStation) { // skip property Dictionary`2, property in exclude list // skip property StationTopologyConfiguration[], property in exclude list itacStation.CanScanComponentBarcodes = asmStation.CanScanComponentBarcodes; itacStation.HasPCBBarcodeReadingSystem = asmStation.HasPCBBarcodeReadingSystem; // skip property Double, property in exclude list // skip property Double, property in exclude list itacStation.OffsetZ = asmStation.OffsetZ; itacStation.SkipPCB = com.itac.oib.siplacepro.contracts.types.SkipBoardWithUnknownBarcodeMapper.get(asmStation.SkipPCB); // complex asm property SkipPCB itacStation.IPName = asmStation.IPName; itacStation.IPAddress = asmStation.IPAddress; itacStation.FixedConveyorRailDefaultDistanceOffset = asmStation.FixedConveyorRailDefaultDistanceOffset; itacStation.Allow407TraceSOKO = asmStation.Allow407TraceSOKO; // skip property DictionaryProxy`2, property in exclude list itacStation.MaxNumberOfPlacementsPerGantry = asmStation.MaxNumberOfPlacementsPerGantry; itacStation.TraceabilitySystem = asmStation.TraceabilitySystem; // skip property HardwareConfiguration, declared in Station itacStation.EnableAlternativeComponents = asmStation.EnableAlternativeComponents; // skip property ListProxy`1, property in exclude list // skip property SWPlatform, declared in Station itacStation.SoftwareVersion = asmStation.SoftwareVersion; // skip property ArrayList, property in exclude list // skip property StationTopologyConfiguration, declared in Station itacStation.IPAddressString = asmStation.IPAddressString; itacStation.IsOptionalRev12NozzleChangerPerPocket = asmStation.IsOptionalRev12NozzleChangerPerPocket; itacStation.IsAlwaysRev12NozzleChangerPerPocket = asmStation.IsAlwaysRev12NozzleChangerPerPocket; itacStation.IsLongBoardOptionSupported = asmStation.IsLongBoardOptionSupported; itacStation.IsAlternativeComponentsOptionSupported = asmStation.IsAlternativeComponentsOptionSupported; itacStation.AllowPerPocketRev12NozzleChanger = asmStation.AllowPerPocketRev12NozzleChanger; itacStation.WhisperDownTheLine = asmStation.WhisperDownTheLine; itacStation.SupportsWisperingDownTheLine = asmStation.SupportsWisperingDownTheLine; itacStation.SupportsPCBBarcode = asmStation.SupportsPCBBarcode; // skip property StationType, declared in Station // skip property Int32, property in exclude list // skip property StaticVisionSystem, declared in Station // skip property VisionSystemType, declared in Station // skip property ArrayList, property in exclude list // skip property String, property in exclude list // skip property ArrayList, property in exclude list itacStation.HardwareVersion = asmStation.HardwareVersion; itacStation.NumericalSoftwareVersion = asmStation.NumericalSoftwareVersion; itacStation.Name = asmStation.Name; itacStation.FullPath = asmStation.FullPath; } // maps ASM namespace conform list to iTAC namespace array public static Station[] getArray(IList asmStation) { if (asmStation == null) { return null; } Station[] itacStation = new Station[asmStation.Count]; for (int i = 0; i < asmStation.Count; i++) { itacStation[i] = StationMapper.get(asmStation[i]); } return itacStation; } // maps ASM namespace conform array to iTAC namespace array public static Station[] getArray(Asm.As.Oib.SiplacePro.Proxy.Business.Objects.Station[] asmStation) { if (asmStation == null) { return null; } Station[] itacStation = new Station[asmStation.Length]; for (int i = 0; i < asmStation.Length; i++) { itacStation[i] = StationMapper.get(asmStation[i]); } return itacStation; } } }