using System.IO; using System.Reflection.PortableExecutable; using System.Xml; using System.Xml.Serialization; using InfineonHMI.Common; namespace InfineonHMI.Model; public class ReceipeDto { public ReceipeDto() { ReceipeObject = new ReceipeObject(); } public ReceipeObject ReceipeObject { get; set; } public void Write(string filename) { L4ItXmlSerializer.SerializeObject(ReceipeObject, filename); } public void Read(string filename) { ReceipeObject = L4ItXmlSerializer.DeSerializeObject(filename); } } public class ReceipeObject { public MachineParameters MachineParameters { get; set; } public ProductParameters ProductParameters { get; set; } public ReceipeHotplate ReceipeHotplate { get; set; } public ReceipeCoolplate ReceipeCoolplate { get; set; } public ReceipeEtcher ReceipeEtcher { get; set; } public ReceipeHighvoltageTester ReceipeHvTester { get; set; } public FlowReceipeModel FlowreceipeModel { get; set; } public ReceipeObject() { MachineParameters = new MachineParameters(); ProductParameters = new ProductParameters(); ReceipeHotplate = new ReceipeHotplate(); ReceipeCoolplate = new ReceipeCoolplate(); ReceipeEtcher = new ReceipeEtcher(); ReceipeHvTester = new ReceipeHighvoltageTester(); FlowreceipeModel = new FlowReceipeModel(); } } public class MachineParameters { public List TrayPositions { get; set; } public int CameraPrograms { get; set; } public int Chucks { get; set; } public int Gripper { get; set; } /// /// Erlaubten Strahlparameter Abweichungen /// public float PermissibleBeamParameterDeviations { get; set; } public MachineParameters() { TrayPositions = new List(); } } public class ProductParameters { public float Diameter { get; set; } public float Thickness { get; set; } public float TimeIntervallBeamCheck { get; set; } } public class ReceipeHotplate { public float RestingTime { get; set; } public float TargetTemperature { get; set; } } public class ReceipeCoolplate { public float RestingTime { get; set; } public float TargetTemperature { get; set; } } public class ReceipeHighvoltageTester { /// /// Test voltage in V /// public float TestVoltage { get; set; } /// /// Maximum test Current /// public float MaximumTestCurrent { get; set; } /// /// Ramp Time in milliseconds /// public float RampTime { get; set; } /// /// Testfrequency in HZ /// public float TestFrequency { get; set; } /// /// Polarity 1=Positive, 2=Negative /// public UInt16 Polarity { get; set; } /// /// Overpressure N2 in mbar /// public float TestpressureN2 { get; set; } /// /// N2 pre purging time in seconds /// public float N2PrePurgetime { get; set; } /// /// Test retries /// public UInt16 NumRetries { get; set; } /// /// Temperature for testing (only used in heated HV station) /// public float TestTemperature { get; set; } /// /// Test OK Voltage /// public float TestOkVoltage { get; set; } /// /// Test OK Current /// public float TestOkCurrent { get; set; } } public class ReceipeEtcher { /// /// Number of Robot positions /// public UInt16 NumberRobotPos { get; set; } public float Rpm { get; set; } /// /// Roboter position and setting data /// public List RobotStepData { get; set; } /// /// Radial position of water jet under the blank in mm /// public float RadialPosLowerWaterJet { get; set; } public ReceipeEtcher() { RobotStepData = new List(); } } public class EtcherRobotStepData { public float PosX { get; set; } public float PosY { get; set; } public float PosZ { get; set; } public float AngleAlpha { get; set; } public float MoveSpeed { get; set; } public float Delay { get; set; } public UInt16 Medium { get; set; } public bool WaterFromBelow { get; set; } public bool WaterFromAbove { get; set; } } public class FlowReceipeModel { public int NodeCount { get; set; } public List Nodes { get; set; } public FlowReceipeModel() { Nodes = new List(); } } public class FlowReceipeNode { public UInt16 Priority { get; set; } public UInt32 StationType { get; set; } public UInt16 MaxRetries { get; set; } public int NextNodeSuccess { get; set; } public int NextNodeRetry { get; set; } public int NextNodeFail { get; set; } } public class TrayPosition { public int PosId { get; set; } public float PosX { get; set; } public float PosY { get; set; } }