Add Transmission Control Protocol file handling and update PCL serialization
- Introduced FileRead and Record classes for handling file reading in the Transmission Control Protocol. - Enhanced Description, Detail, and other related classes with JSON serialization attributes for improved data handling. - Implemented methods for reading and processing files, including network stream management. - Updated unit tests to cover new functionality and ensure robust testing. - Added new PDSF file handling classes and integrated them into the project structure. - Refactored existing code to utilize source generation for JSON serialization, improving performance and maintainability.
This commit is contained in:
		| @ -4,111 +4,112 @@ using System; | ||||
| using System.Collections.Generic; | ||||
| using System.Linq; | ||||
| using System.Text.Json; | ||||
| using System.Text.Json.Serialization; | ||||
|  | ||||
| namespace Adaptation.FileHandlers.pcl; | ||||
|  | ||||
| public class Description : IDescription, Shared.Properties.IDescription | ||||
| { | ||||
|  | ||||
|     public int Test { get; set; } | ||||
|     public int Count { get; set; } | ||||
|     public int Index { get; set; } | ||||
|     [JsonPropertyName("EventId")] public int Test { get; set; } | ||||
|     [JsonPropertyName("Count")] public int Count { get; set; } | ||||
|     [JsonPropertyName("Index")] public int Index { get; set; } | ||||
|     // | ||||
|     public string EventName { get; set; } | ||||
|     public string NullData { get; set; } | ||||
|     public string JobID { get; set; } | ||||
|     public string Sequence { get; set; } | ||||
|     public string MesEntity { get; set; } | ||||
|     [JsonPropertyName("MesEntity")] public string MesEntity { get; set; } | ||||
|     public string ReportFullPath { get; set; } | ||||
|     public string ProcessJobID { get; set; } | ||||
|     public string MID { get; set; } | ||||
|     // | ||||
|     public string Date { get; set; } | ||||
|     public string Employee { get; set; } | ||||
|     public string Lot { get; set; } | ||||
|     public string PSN { get; set; } | ||||
|     public string Reactor { get; set; } | ||||
|     public string Recipe { get; set; } | ||||
|     [JsonPropertyName("Date")] public string Date { get; set; } | ||||
|     [JsonPropertyName("Employee")] public string Employee { get; set; } | ||||
|     [JsonPropertyName("Lot")] public string Lot { get; set; } | ||||
|     [JsonPropertyName("PSN")] public string PSN { get; set; } | ||||
|     [JsonPropertyName("Reactor")] public string Reactor { get; set; } | ||||
|     [JsonPropertyName("Recipe")] public string Recipe { get; set; } | ||||
|     // | ||||
|     public string Area { get; set; } | ||||
|     public string Folder { get; set; } | ||||
|     [JsonPropertyName("Area")] public string Area { get; set; } | ||||
|     [JsonPropertyName("Folder")] public string Folder { get; set; } | ||||
|     public string HeaderUniqueId { get; set; } | ||||
|     public string Id { get; set; } | ||||
|     public string Layer { get; set; } | ||||
|     public string Model { get; set; } | ||||
|     public string Pattern { get; set; } | ||||
|     public string Phase { get; set; } | ||||
|     public string Plan { get; set; } | ||||
|     public string RampRate { get; set; } | ||||
|     public string RDS { get; set; } | ||||
|     public string SetupFile { get; set; } | ||||
|     public string StartVoltage { get; set; } | ||||
|     public string StopVoltage { get; set; } | ||||
|     [JsonPropertyName("Layer")] public string Layer { get; set; } | ||||
|     [JsonPropertyName("Model")] public string Model { get; set; } | ||||
|     [JsonPropertyName("Pattern")] public string Pattern { get; set; } | ||||
|     [JsonPropertyName("Phase")] public string Phase { get; set; } | ||||
|     [JsonPropertyName("Plan")] public string Plan { get; set; } | ||||
|     [JsonPropertyName("RampRate")] public string RampRate { get; set; } | ||||
|     [JsonPropertyName("RDS")] public string RDS { get; set; } | ||||
|     [JsonPropertyName("SetupFile")] public string SetupFile { get; set; } | ||||
|     [JsonPropertyName("StartVoltage")] public string StartVoltage { get; set; } | ||||
|     [JsonPropertyName("StopVoltage")] public string StopVoltage { get; set; } | ||||
|     public string UniqueId { get; set; } | ||||
|     public string Wafer { get; set; } | ||||
|     public string WaferSize { get; set; } | ||||
|     public string Zone { get; set; } | ||||
|     [JsonPropertyName("Wafer")] public string Wafer { get; set; } | ||||
|     [JsonPropertyName("WaferSize")] public string WaferSize { get; set; } | ||||
|     [JsonPropertyName("Zone")] public string Zone { get; set; } | ||||
|     // | ||||
|     public string Ccomp { get; set; } | ||||
|     public string CondType { get; set; } | ||||
|     public string FlatZ { get; set; } | ||||
|     public string FlatZMean { get; set; } | ||||
|     public string FlatZRadialGradient { get; set; } | ||||
|     public string FlatZStdDev { get; set; } | ||||
|     public string GLimit { get; set; } | ||||
|     public string Grade { get; set; } | ||||
|     public string GradeMean { get; set; } | ||||
|     public string GradeRadialGradient { get; set; } | ||||
|     public string GradeStdDev { get; set; } | ||||
|     public string NAvg { get; set; } | ||||
|     public string NAvgMean { get; set; } | ||||
|     public string NAvgRadialGradient { get; set; } | ||||
|     public string NAvgStdDev { get; set; } | ||||
|     public string Nsl { get; set; } | ||||
|     public string NslMean { get; set; } | ||||
|     public string NslRadialGradient { get; set; } | ||||
|     public string NslStdDev { get; set; } | ||||
|     public string PhaseMean { get; set; } | ||||
|     public string PhaseRadialGradient { get; set; } | ||||
|     public string PhaseStdDev { get; set; } | ||||
|     public string RhoAvg { get; set; } | ||||
|     public string RhoAvgMean { get; set; } | ||||
|     public string RhoAvgRadialGradient { get; set; } | ||||
|     public string RhoAvgStdDev { get; set; } | ||||
|     public string RhoMethod { get; set; } | ||||
|     public string Rhosl { get; set; } | ||||
|     public string RhoslMean { get; set; } | ||||
|     public string RhoslRadialGradient { get; set; } | ||||
|     public string RhoslStdDev { get; set; } | ||||
|     public string RsMean { get; set; } | ||||
|     public string RsRadialGradient { get; set; } | ||||
|     public string RsStdDev { get; set; } | ||||
|     public string Vd { get; set; } | ||||
|     public string VdMean { get; set; } | ||||
|     public string VdRadialGradient { get; set; } | ||||
|     public string VdStdDev { get; set; } | ||||
|     [JsonPropertyName("Ccomp")] public string Ccomp { get; set; } | ||||
|     [JsonPropertyName("CondType")] public string CondType { get; set; } | ||||
|     [JsonPropertyName("FlatZ")] public string FlatZ { get; set; } | ||||
|     [JsonPropertyName("MeanFlatZ")] public string FlatZMean { get; set; } | ||||
|     [JsonPropertyName("RadialGradientFlatZ")] public string FlatZRadialGradient { get; set; } | ||||
|     [JsonPropertyName("StandardDeviationPercentageFlatZ")] public string FlatZStdDev { get; set; } | ||||
|     [JsonPropertyName("GLimit")] public string GLimit { get; set; } | ||||
|     [JsonPropertyName("Grade")] public string Grade { get; set; } | ||||
|     [JsonPropertyName("MeanGrade")] public string GradeMean { get; set; } | ||||
|     [JsonPropertyName("RadialGradientGrade")] public string GradeRadialGradient { get; set; } | ||||
|     [JsonPropertyName("StandardDeviationPercentageGrade")] public string GradeStdDev { get; set; } | ||||
|     [JsonPropertyName("NAvg")] public string NAvg { get; set; } | ||||
|     [JsonPropertyName("MeanNAvg")] public string NAvgMean { get; set; } | ||||
|     [JsonPropertyName("RadialGradientNAvg")] public string NAvgRadialGradient { get; set; } | ||||
|     [JsonPropertyName("StandardDeviationPercentageNAvg")] public string NAvgStdDev { get; set; } | ||||
|     [JsonPropertyName("Nsl")] public string Nsl { get; set; } | ||||
|     [JsonPropertyName("MeanNsl")] public string NslMean { get; set; } | ||||
|     [JsonPropertyName("RadialGradientNsl")] public string NslRadialGradient { get; set; } | ||||
|     [JsonPropertyName("StandardDeviationPercentageNsl")] public string NslStdDev { get; set; } | ||||
|     [JsonPropertyName("MeanPhase")] public string PhaseMean { get; set; } | ||||
|     [JsonPropertyName("RadialGradientPhase")] public string PhaseRadialGradient { get; set; } | ||||
|     [JsonPropertyName("StandardDeviationPercentagePhase")] public string PhaseStdDev { get; set; } | ||||
|     [JsonPropertyName("RhoAvg")] public string RhoAvg { get; set; } | ||||
|     [JsonPropertyName("MeanRhoAvg")] public string RhoAvgMean { get; set; } | ||||
|     [JsonPropertyName("RadialGradientRhoAvg")] public string RhoAvgRadialGradient { get; set; } | ||||
|     [JsonPropertyName("StandardDeviationPercentageRhoAvg")] public string RhoAvgStdDev { get; set; } | ||||
|     [JsonPropertyName("RhoMethod")] public string RhoMethod { get; set; } | ||||
|     [JsonPropertyName("Rhosl")] public string Rhosl { get; set; } | ||||
|     [JsonPropertyName("MeanRhosl")] public string RhoslMean { get; set; } | ||||
|     [JsonPropertyName("RadialGradientRhosl")] public string RhoslRadialGradient { get; set; } | ||||
|     [JsonPropertyName("StandardDeviationPercentageRhosl")] public string RhoslStdDev { get; set; } | ||||
|     [JsonPropertyName("MeanRs")] public string RsMean { get; set; } | ||||
|     [JsonPropertyName("RadialGradientRs")] public string RsRadialGradient { get; set; } | ||||
|     [JsonPropertyName("StandardDeviationPercentageRs")] public string RsStdDev { get; set; } | ||||
|     [JsonPropertyName("Vd")] public string Vd { get; set; } | ||||
|     [JsonPropertyName("MeanVd")] public string VdMean { get; set; } | ||||
|     [JsonPropertyName("RadialGradientVd")] public string VdRadialGradient { get; set; } | ||||
|     [JsonPropertyName("StandardDeviationPercentageVd")] public string VdStdDev { get; set; } | ||||
|     // | ||||
|     public string Variation { get; set; } | ||||
|     public string AreaDeltaFromLastRun { get; set; } | ||||
|     [JsonPropertyName("Variation")] public string Variation { get; set; } | ||||
|     [JsonPropertyName("AreaDeltaFromLastRun")] public string AreaDeltaFromLastRun { get; set; } | ||||
|     // | ||||
|     public string Nine10mmEdgeMean { get; set; } | ||||
|     public string Nine4mmEdgeMean { get; set; } | ||||
|     public string NineCriticalPointsAverage { get; set; } | ||||
|     public string NineCriticalPointsPhaseAngleAverage { get; set; } | ||||
|     public string NineCriticalPointsStdDev { get; set; } | ||||
|     public string NineEdgeMeanDelta { get; set; } | ||||
|     public string NineMean { get; set; } | ||||
|     public string NineResRangePercent { get; set; } | ||||
|     [JsonPropertyName("Nine10mmEdgeMean")] public string Nine10mmEdgeMean { get; set; } | ||||
|     [JsonPropertyName("Nine4mmEdgeMean")] public string Nine4mmEdgeMean { get; set; } | ||||
|     [JsonPropertyName("NineCriticalPointsAverage")] public string NineCriticalPointsAverage { get; set; } | ||||
|     [JsonPropertyName("NineCriticalPointsPhaseAngleAverage")] public string NineCriticalPointsPhaseAngleAverage { get; set; } | ||||
|     [JsonPropertyName("NineCriticalPointsStdDev")] public string NineCriticalPointsStdDev { get; set; } | ||||
|     [JsonPropertyName("NineEdgeMeanDelta")] public string NineEdgeMeanDelta { get; set; } | ||||
|     [JsonPropertyName("NineMean")] public string NineMean { get; set; } | ||||
|     [JsonPropertyName("NineResRangePercent")] public string NineResRangePercent { get; set; } | ||||
|     // | ||||
|     public string RhoAvg01 { get; set; } | ||||
|     public string RhoAvg02 { get; set; } | ||||
|     public string RhoAvg03 { get; set; } | ||||
|     public string RhoAvg04 { get; set; } | ||||
|     public string RhoAvg05 { get; set; } | ||||
|     public string RhoAvg06 { get; set; } | ||||
|     public string RhoAvg07 { get; set; } | ||||
|     public string RhoAvg08 { get; set; } | ||||
|     public string RhoAvg09 { get; set; } | ||||
|     [JsonPropertyName("RhoAvg01")] public string RhoAvg01 { get; set; } | ||||
|     [JsonPropertyName("RhoAvg02")] public string RhoAvg02 { get; set; } | ||||
|     [JsonPropertyName("RhoAvg03")] public string RhoAvg03 { get; set; } | ||||
|     [JsonPropertyName("RhoAvg04")] public string RhoAvg04 { get; set; } | ||||
|     [JsonPropertyName("RhoAvg05")] public string RhoAvg05 { get; set; } | ||||
|     [JsonPropertyName("RhoAvg06")] public string RhoAvg06 { get; set; } | ||||
|     [JsonPropertyName("RhoAvg07")] public string RhoAvg07 { get; set; } | ||||
|     [JsonPropertyName("RhoAvg08")] public string RhoAvg08 { get; set; } | ||||
|     [JsonPropertyName("RhoAvg09")] public string RhoAvg09 { get; set; } | ||||
|  | ||||
|     string IDescription.GetEventDescription() => "File Has been read and parsed"; | ||||
|  | ||||
| @ -511,4 +512,16 @@ public class Description : IDescription, Shared.Properties.IDescription | ||||
|  | ||||
|     internal static string GetDateFormat() => "MM/dd/yyyy hh:mm:ss tt"; | ||||
|  | ||||
| } | ||||
|  | ||||
| [JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)] | ||||
| [JsonSerializable(typeof(Description))] | ||||
| internal partial class DescriptionSourceGenerationContext : JsonSerializerContext | ||||
| { | ||||
| } | ||||
|  | ||||
| [JsonSourceGenerationOptions(WriteIndented = true, NumberHandling = JsonNumberHandling.AllowReadingFromString | JsonNumberHandling.WriteAsString)] | ||||
| [JsonSerializable(typeof(Description[]))] | ||||
| internal partial class DescriptionArraySourceGenerationContext : JsonSerializerContext | ||||
| { | ||||
| } | ||||
		Reference in New Issue
	
	Block a user