public Experior.Dematic.Base.EuroPallet CreateEuroPallet(BasePalletData baseData) { ATCPalletData palletData = baseData as ATCPalletData; //return CreateEuroPallet(baseData.Length, baseData.Width, baseData.Length, baseData.Weight, baseData.colour.ToString(), baseData.Height > 0.145f ? PalletStatus.Loaded : PalletStatus.Empty); return(CreateEuroPallet(this.Name, palletData.TUIdent, palletData.TUType, palletData.source, palletData.destination, "OK", palletData.Height, palletData.Width, palletData.Length, palletData.Weight, palletData.colour, palletData.Height > 0.145f ? PalletStatus.Loaded : PalletStatus.Empty)); }
/// <summary> /// Creates the ATC Pallet Data that the load will hold from the telegram /// </summary> public ATCPalletData CreateATCPalletData(string[] telegramFields, string index = "") { ATCPalletData palletData = new ATCPalletData(); float length, width, height, weight; float.TryParse(telegramFields.GetFieldValue(TelegramFields.length, index), out length); float.TryParse(telegramFields.GetFieldValue(TelegramFields.width, index), out width); float.TryParse(telegramFields.GetFieldValue(TelegramFields.height, index), out height); float.TryParse(telegramFields.GetFieldValue(TelegramFields.weight, index), out weight); palletData.Length = length / 1000; palletData.Width = width / 1000; palletData.Height = height / 1000; palletData.Weight = weight; palletData.colour = LoadColor(telegramFields.GetFieldValue(TelegramFields.color, index)); palletData.TUIdent = telegramFields.GetFieldValue(TelegramFields.tuIdent, index); palletData.TUType = telegramFields.GetFieldValue(TelegramFields.tuType, index); palletData.mts = telegramFields.GetFieldValue(TelegramFields.mts); palletData.presetStateCode = telegramFields.GetFieldValue(TelegramFields.presetStateCode, index); palletData.source = telegramFields.GetFieldValue(TelegramFields.source, index); palletData.destination = telegramFields.GetFieldValue(TelegramFields.destination, index); return(palletData); }