Files
imsInterface/interface/asm/dotnet/Oib3xMapper/generated_src/com.itac.oib.monitoring.contracts.data/GantryStateMapper.cs
2025-06-06 09:15:13 +02:00

112 lines
5.1 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 23.11.2018 08:09:33
using System;
using System.Collections.Generic;
using com.itac.oib.monitoring.contracts.data;
namespace com.itac.oib.monitoring.contracts.data
{
// source: assembly 3.2.0.152
// source: assembly ASM.AS.OIB.Monitoring.Proxy
public class GantryStateMapper
{
// 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.GantryState get(GantryState itacGantryState)
{
if (itacGantryState == null) { return null; }
Asm.As.Oib.Monitoring.Proxy.Business.Objects.GantryState asmGantryState = new Asm.As.Oib.Monitoring.Proxy.Business.Objects.GantryState();
mapItac2Asm(asmGantryState, itacGantryState);
return asmGantryState;
}
public static void mapItac2Asm(Asm.As.Oib.Monitoring.Proxy.Business.Objects.GantryState asmGantryState, GantryState itacGantryState)
{
// complex property State, isArray:False, isGeneric:False
asmGantryState.State = com.itac.oib.monitoring.contracts.data.GantryEventTypeMapper.get( itacGantryState.State);
asmGantryState.GantryNumber = itacGantryState.GantryNumber;
asmGantryState.ProcessingArea = itacGantryState.ProcessingArea;
asmGantryState.ErrorReason = itacGantryState.ErrorReason;
asmGantryState.BoardNumber = itacGantryState.BoardNumber;
asmGantryState.StationTime = itacGantryState.StationTime;
}
// maps iTAC namespace conform array to ASM namespace array
public static Asm.As.Oib.Monitoring.Proxy.Business.Objects.GantryState[] get(GantryState[] itacGantryState)
{
if (itacGantryState == null) { return null; }
Asm.As.Oib.Monitoring.Proxy.Business.Objects.GantryState[] asmGantryState = new Asm.As.Oib.Monitoring.Proxy.Business.Objects.GantryState[itacGantryState.Length];
for (int i = 0; i < itacGantryState.Length; i++)
{
// to itac array
asmGantryState[i] = GantryStateMapper.get(itacGantryState[i]);
}
return asmGantryState;
}
// maps iTAC namespace conform array to ASM namespace list
public static List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.GantryState> getList(GantryState[] asmGantryState)
{
if (asmGantryState == null) { return null; }
List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.GantryState> itacGantryState = new List<Asm.As.Oib.Monitoring.Proxy.Business.Objects.GantryState>();
for (int i = 0; i < asmGantryState.Length; i++)
{
itacGantryState.Add(GantryStateMapper.get(asmGantryState[i]));
}
return itacGantryState;
}
// map type from ASM namespace to iTAC namespace
public static GantryState get(Asm.As.Oib.Monitoring.Proxy.Business.Objects.GantryState asmGantryState)
{
if (asmGantryState == null) { return null; }
GantryState itacGantryState = new GantryState();
mapAsm2Itac(asmGantryState, itacGantryState);
return itacGantryState;
}
public static void mapAsm2Itac(Asm.As.Oib.Monitoring.Proxy.Business.Objects.GantryState asmGantryState, GantryState itacGantryState)
{
itacGantryState.State = com.itac.oib.monitoring.contracts.data.GantryEventTypeMapper.get(asmGantryState.State);
// complex asm property State
itacGantryState.GantryNumber = asmGantryState.GantryNumber;
itacGantryState.ProcessingArea = asmGantryState.ProcessingArea;
itacGantryState.ErrorReason = asmGantryState.ErrorReason;
itacGantryState.BoardNumber = asmGantryState.BoardNumber;
itacGantryState.StationTime = asmGantryState.StationTime;
}
// maps ASM namespace conform list to iTAC namespace array
public static GantryState[] getArray(IList<Asm.As.Oib.Monitoring.Proxy.Business.Objects.GantryState> asmGantryState)
{
if (asmGantryState == null) { return null; }
GantryState[] itacGantryState = new GantryState[asmGantryState.Count];
for (int i = 0; i < asmGantryState.Count; i++)
{
itacGantryState[i] = GantryStateMapper.get(asmGantryState[i]);
}
return itacGantryState;
}
// maps ASM namespace conform array to iTAC namespace array
public static GantryState[] getArray(Asm.As.Oib.Monitoring.Proxy.Business.Objects.GantryState[] asmGantryState)
{
if (asmGantryState == null) { return null; }
GantryState[] itacGantryState = new GantryState[asmGantryState.Length];
for (int i = 0; i < asmGantryState.Length; i++)
{
itacGantryState[i] = GantryStateMapper.get(asmGantryState[i]);
}
return itacGantryState;
}
}
}