112 lines
4.6 KiB
C#
112 lines
4.6 KiB
C#
/*
|
|
* 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 31.10.2018 08:16:46
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using com.itac.oib.monitoring.contracts.data;
|
|
|
|
namespace com.itac.oib.monitoring.contracts.data
|
|
{
|
|
// source: assembly 5.1.0.84
|
|
// source: assembly ASM.AS.OIB.Monitoring.Proxy
|
|
public class RecipeAddOnMapper
|
|
{
|
|
// used for itac->asm: True
|
|
// used for asm->itac: True
|
|
|
|
// maps iTAC namespace conform type to ASM namespace type
|
|
public static Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn get(RecipeAddOn asmRecipeAddOn)
|
|
{
|
|
if (asmRecipeAddOn == null) { return null; }
|
|
Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn itacRecipeAddOn = new Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn();
|
|
mapItac2Asm(itacRecipeAddOn, asmRecipeAddOn);
|
|
return itacRecipeAddOn;
|
|
}
|
|
|
|
public static void mapItac2Asm(Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn itacRecipeAddOn, RecipeAddOn asmRecipeAddOn)
|
|
{
|
|
itacRecipeAddOn.ProcessingArea = asmRecipeAddOn.ProcessingArea;
|
|
// complex property PlacementMode, isArray:False, isGeneric:False
|
|
itacRecipeAddOn.PlacementMode = com.itac.oib.monitoring.contracts.data.ProcessingModeTypeMapper.get( asmRecipeAddOn.PlacementMode);
|
|
itacRecipeAddOn.BuildTime = asmRecipeAddOn.BuildTime;
|
|
itacRecipeAddOn.StationTactTime = asmRecipeAddOn.StationTactTime;
|
|
itacRecipeAddOn.ParallelProcessingFactor = asmRecipeAddOn.ParallelProcessingFactor;
|
|
itacRecipeAddOn.SteppingActive = asmRecipeAddOn.SteppingActive;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace array
|
|
public static Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn[] get(RecipeAddOn[] asmRecipeAddOn)
|
|
{
|
|
if (asmRecipeAddOn == null) { return null; }
|
|
Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn[] itacRecipeAddOn = new Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn[asmRecipeAddOn.Length];
|
|
for (int i = 0; i < asmRecipeAddOn.Length; i++)
|
|
{
|
|
// to itac array
|
|
itacRecipeAddOn[i] = RecipeAddOnMapper.get(asmRecipeAddOn[i]);
|
|
}
|
|
return itacRecipeAddOn;
|
|
}
|
|
|
|
// maps iTAC namespace conform array to ASM namespace list
|
|
public static List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn> getList(RecipeAddOn[] asmRecipeAddOn)
|
|
{
|
|
if (asmRecipeAddOn == null) { return null; }
|
|
List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn> itacRecipeAddOn = new List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn>();
|
|
for (int i = 0; i < asmRecipeAddOn.Length; i++)
|
|
{
|
|
itacRecipeAddOn.Add(RecipeAddOnMapper.get(asmRecipeAddOn[i]));
|
|
}
|
|
return itacRecipeAddOn;
|
|
}
|
|
|
|
// map type from ASM namespace to iTAC namespace
|
|
public static RecipeAddOn get(Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn asmRecipeAddOn)
|
|
{
|
|
if (asmRecipeAddOn == null) { return null; }
|
|
RecipeAddOn itacRecipeAddOn = new RecipeAddOn();
|
|
mapAsm2Itac(asmRecipeAddOn, itacRecipeAddOn);
|
|
return itacRecipeAddOn;
|
|
}
|
|
|
|
public static void mapAsm2Itac(Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn asmRecipeAddOn, RecipeAddOn itacRecipeAddOn)
|
|
{
|
|
itacRecipeAddOn.ProcessingArea = asmRecipeAddOn.ProcessingArea;
|
|
itacRecipeAddOn.PlacementMode = com.itac.oib.monitoring.contracts.data.ProcessingModeTypeMapper.get(asmRecipeAddOn.PlacementMode);
|
|
// complex asm property PlacementMode
|
|
itacRecipeAddOn.BuildTime = asmRecipeAddOn.BuildTime;
|
|
itacRecipeAddOn.StationTactTime = asmRecipeAddOn.StationTactTime;
|
|
itacRecipeAddOn.ParallelProcessingFactor = asmRecipeAddOn.ParallelProcessingFactor;
|
|
itacRecipeAddOn.SteppingActive = asmRecipeAddOn.SteppingActive;
|
|
}
|
|
|
|
// maps ASM namespace conform list to iTAC namespace array
|
|
public static RecipeAddOn[] getArray(IList<Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn> asmRecipeAddOn)
|
|
{
|
|
if (asmRecipeAddOn == null) { return null; }
|
|
RecipeAddOn[] itacRecipeAddOn = new RecipeAddOn[asmRecipeAddOn.Count];
|
|
for (int i = 0; i < asmRecipeAddOn.Count; i++)
|
|
{
|
|
itacRecipeAddOn[i] = RecipeAddOnMapper.get(asmRecipeAddOn[i]);
|
|
}
|
|
return itacRecipeAddOn;
|
|
}
|
|
|
|
// maps ASM namespace conform array to iTAC namespace array
|
|
public static RecipeAddOn[] getArray(Asm.As.Oib.Monitoring.Proxy.Business.Objects.RecipeAddOn[] asmRecipeAddOn)
|
|
{
|
|
if (asmRecipeAddOn == null) { return null; }
|
|
RecipeAddOn[] itacRecipeAddOn = new RecipeAddOn[asmRecipeAddOn.Length];
|
|
for (int i = 0; i < asmRecipeAddOn.Length; i++)
|
|
{
|
|
itacRecipeAddOn[i] = RecipeAddOnMapper.get(asmRecipeAddOn[i]);
|
|
}
|
|
return itacRecipeAddOn;
|
|
}
|
|
}
|
|
}
|