Esempio n. 1
0
        /*HelpDecode decode; CAT21Helper cat21Helper;
         * public CAT21v21(HelpDecode decode, CAT10Helper cat21Helper)
         * {
         *  cat21Helper.decode = decode;
         *  cat21Helper.cat21Helper = cat21Helper;
         * }*/
        // Constructor with message array and decoder class
        public CAT21(ref HelpDecode decode, ref CAT21Helper cat21Helper, string[] hexMessageArray, int id, string[] messageBinary)
        {
            try
            {
                //Decode FSPEC
                string FSPEC0      = decode.getFSPEC(hexMessageArray);
                int    octetsFSPEC = FSPEC0.Length / 7;
                int    index       = 3 + octetsFSPEC;
                this.FSPEC   = FSPEC0.ToCharArray(0, FSPEC0.Length);
                this.message = messageBinary;
                // Data Item Header
                this.Id        = id;
                this.numOctets = hexMessageArray.Length;

                /* From now on each function looks to see if the decoding parameter exists in the
                 * message (checking if the FSPEC in its indexition == 1) and if it exists calls the function to decode the parameter */

                if (FSPEC[0] == '1')
                {
                    index = cat21Helper.Compute_Data_Source_Identification(message, index);
                    SAC   = cat21Helper.SAC;
                    SIC   = cat21Helper.SIC;
                }
                if (FSPEC[1] == '1')
                {
                    index    = cat21Helper.Compute_Target_Report_Descripter(message, index);
                    ATP      = cat21Helper.ATP;
                    ARC      = cat21Helper.ARC;
                    RC       = cat21Helper.RC;
                    RAB      = cat21Helper.RAB;
                    DCR      = cat21Helper.DCR;
                    GBS      = cat21Helper.GBS;
                    SIM      = cat21Helper.SIM;
                    TST      = cat21Helper.TST;
                    this.SAA = cat21Helper.SAA;
                    CL       = cat21Helper.CL;
                    IPC      = cat21Helper.IPC;
                    NOGO     = cat21Helper.NOGO;
                    CPR      = cat21Helper.CPR;
                    LDPJ     = cat21Helper.LDPJ;
                    RCF      = cat21Helper.RCF;
                    FX       = cat21Helper.FX;
                }
                if (FSPEC[2] == '1')
                {
                    index        = cat21Helper.Compute_Track_Number(message, index);
                    Track_Number = cat21Helper.Track_Number;
                }
                if (FSPEC[3] == '1')
                {
                    index = cat21Helper.Compute_Service_Identification(message, index);
                    Service_Identification = cat21Helper.Service_Identification;
                }
                if (FSPEC[4] == '1')
                {
                    index = cat21Helper.Compute_Time_of_Aplicabillity_Position(message, index);
                    Time_of_Applicability_Position = cat21Helper.Time_of_Applicability_Position;
                }
                if (FSPEC[5] == '1')
                {
                    index               = cat21Helper.Compute_PositionWGS_84(message, index);
                    LatitudeWGS_84      = cat21Helper.LatitudeWGS_84;
                    LongitudeWGS_84     = cat21Helper.LongitudeWGS_84;
                    LatitudeWGS_84_map  = cat21Helper.LatitudeWGS_84_map;
                    LongitudeWGS_84_map = cat21Helper.LongitudeWGS_84_map;
                }
                if (FSPEC[6] == '1')
                {
                    index = cat21Helper.Compute_High_Resolution_PositionWGS_84(message, index);
                    High_Resolution_LatitudeWGS_84  = cat21Helper.High_Resolution_LatitudeWGS_84;
                    High_Resolution_LongitudeWGS_84 = cat21Helper.High_Resolution_LongitudeWGS_84;
                }
                if (FSPEC.Count() > 8)
                {
                    if (FSPEC[7] == '1')
                    {
                        index = cat21Helper.Compute_Time_of_Aplicabillity_Velocity(message, index);
                        Time_of_Applicability_Velocity = cat21Helper.Time_of_Applicability_Velocity;
                    }
                    if (FSPEC[8] == '1')
                    {
                        index     = cat21Helper.Compute_Air_Speed(message, index);
                        Air_Speed = cat21Helper.Air_Speed;
                    }
                    if (FSPEC[9] == '1')
                    {
                        index          = cat21Helper.Compute_True_Air_Speed(message, index);
                        True_Air_Speed = cat21Helper.True_Air_Speed;
                    }
                    if (FSPEC[10] == '1')
                    {
                        index          = cat21Helper.Compute_Target_Address(message, index);
                        Target_address = cat21Helper.Target_address;
                    }
                    if (FSPEC[11] == '1')
                    {
                        index = cat21Helper.Compute_Time_of_Message_Reception_Position(message, index);
                        Time_of_Message_Reception_Position = cat21Helper.Time_of_Message_Reception_Position;
                    }
                    if (FSPEC[12] == '1')
                    {
                        index = cat21Helper.Compute_Time_of_Message_Reception_Position_High_Precision(message, index);
                        Time_of_Message_Reception_Position_High_Precision = cat21Helper.Time_of_Message_Reception_Position_High_Precision;
                    }
                    if (FSPEC[13] == '1')
                    {
                        index = cat21Helper.Compute_Time_of_Message_Reception_Velocity(message, index);
                        Time_of_Message_Reception_Velocity = cat21Helper.Time_of_Message_Reception_Velocity;
                    }
                }
                if (FSPEC.Count() > 16)
                {
                    if (FSPEC[14] == '1')
                    {
                        index = cat21Helper.Compute_Time_of_Message_Reception_Velocity_High_Precision(message, index);
                        Time_of_Message_Reception_Velocity_High_Precision = cat21Helper.Time_of_Message_Reception_Velocity_High_Precision;
                    }
                    if (FSPEC[15] == '1')
                    {
                        index            = cat21Helper.Compute_Geometric_Height(message, index);
                        Geometric_Height = cat21Helper.Geometric_Height;
                    }
                    if (FSPEC[16] == '1')
                    {
                        index = cat21Helper.Compute_Quality_Indicators(message, index);
                        Quality_Indicators = cat21Helper.Quality_Indicators;
                        NUCr_NACv          = cat21Helper.NUCr_NACv;
                        NUCp_NIC           = cat21Helper.NUCp_NIC;
                        NICbaro            = cat21Helper.NICbaro;
                        SIL  = cat21Helper.SIL;
                        NACp = cat21Helper.NACp;
                        SILS = cat21Helper.SILS;
                        SDA  = cat21Helper.SDA;
                        GVA  = cat21Helper.GVA;
                        PIC  = cat21Helper.PIC;
                        ICB  = cat21Helper.ICB;
                        NUCp = cat21Helper.NUCp;
                        NIC  = cat21Helper.NIC;
                    }
                    if (FSPEC[17] == '1')
                    {
                        index = cat21Helper.Compute_MOPS_Version(message, index);
                        VNS   = cat21Helper.VNS;
                        LTT   = cat21Helper.LTT;
                        MOPS  = cat21Helper.MOPS;
                    }
                    if (FSPEC[18] == '1')
                    {
                        index  = cat21Helper.Compute_Mode_A3(message, index);
                        ModeA3 = cat21Helper.ModeA3;
                    }
                    if (FSPEC[19] == '1')
                    {
                        index      = cat21Helper.Compute_Roll_Angle(message, index);
                        Roll_Angle = cat21Helper.Roll_Angle;
                    }
                    if (FSPEC[20] == '1')
                    {
                        index        = cat21Helper.Compute_Flight_level(message, index);
                        Flight_Level = cat21Helper.Flight_Level;
                    }
                }
                if (FSPEC.Count() > 22)
                {
                    if (FSPEC[21] == '1')
                    {
                        index            = cat21Helper.Compute_Magnetic_Heading(message, index);
                        Magnetic_Heading = cat21Helper.Magnetic_Heading;
                    }
                    if (FSPEC[22] == '1')
                    {
                        index = cat21Helper.Compute_Target_Status(message, index);
                        ICF   = cat21Helper.ICF;
                        LNAV  = cat21Helper.LNAV;
                        PS    = cat21Helper.PS;
                        SS    = cat21Helper.SS;
                    }
                    if (FSPEC[23] == '1')
                    {
                        index = cat21Helper.Compute_Barometric_Vertical_Rate(message, index);
                        Barometric_Vertical_Rate = cat21Helper.Barometric_Vertical_Rate;
                    }
                    if (FSPEC[24] == '1')
                    {
                        index = cat21Helper.Compute_Geometric_Vertical_Rate(message, index);
                        Geometric_Vertical_Rate = cat21Helper.Geometric_Vertical_Rate;
                    }
                    if (FSPEC[25] == '1')
                    {
                        index         = cat21Helper.Compute_Airborne_Ground_Vector(message, index);
                        Ground_Speed  = cat21Helper.Ground_Speed;
                        Track_Angle   = cat21Helper.Track_Angle;
                        Ground_vector = cat21Helper.Ground_vector;
                    }
                    if (FSPEC[26] == '1')
                    {
                        index            = cat21Helper.Compute_Track_Angle_Rate(message, index);
                        Track_Angle_Rate = cat21Helper.Track_Angle_Rate;
                    }
                    if (FSPEC[27] == '1')
                    {
                        index = cat21Helper.Compute_Time_of_Asterix_Report_Transmission(message, index);
                        Time_of_Asterix_Report_Transmission = cat21Helper.Time_of_Asterix_Report_Transmission;
                        TimeOfDayInSeconds = cat21Helper.Time_of_day_sec;
                    }
                }
                if (FSPEC.Count() > 29)
                {
                    if (FSPEC[28] == '1')
                    {
                        index = cat21Helper.Compute_Target_Identification(message, index);
                        Target_Identification = cat21Helper.Target_Identification;
                    }
                    if (FSPEC[29] == '1')
                    {
                        index = cat21Helper.Compute_Emitter_Category(message, index);
                        ECAT  = cat21Helper.ECAT;
                    }
                    if (FSPEC[30] == '1')
                    {
                        index          = cat21Helper.Compute_Met_Information(message, index);
                        MET_present    = cat21Helper.MET_present;
                        Wind_Speed     = cat21Helper.Wind_Speed;
                        Wind_Direction = cat21Helper.Wind_Direction;
                        Temperature    = cat21Helper.Temperature;
                        Turbulence     = cat21Helper.Turbulence;
                    }
                    if (FSPEC[31] == '1')
                    {
                        index             = cat21Helper.Compute_Selected_Altitude(message, index);
                        SAS               = cat21Helper.SAS;
                        Source            = cat21Helper.Source;
                        Sel_Altitude      = cat21Helper.Sel_Altitude;
                        Selected_Altitude = cat21Helper.Selected_Altitude;
                    }
                    if (FSPEC[32] == '1')
                    {
                        index = cat21Helper.Compute_Final_State_Selected_Altitude(message, index);
                        MV    = cat21Helper.MV;
                        AH    = cat21Helper.AH;
                        AM    = cat21Helper.AM;
                        Final_State_Altitude = cat21Helper.Final_State_Altitude;
                    }
                    if (FSPEC[33] == '1')
                    {
                        index = cat21Helper.Compute_Trajectory_Intent(message, index);
                        Trajectory_present = cat21Helper.Trajectory_present;
                        subfield1          = cat21Helper.subfield1;
                        subfield2          = cat21Helper.subfield2;
                        NAV      = cat21Helper.NAV;
                        NVB      = cat21Helper.NVB;
                        REP      = cat21Helper.REP;
                        TCA      = cat21Helper.TCA;
                        NC       = cat21Helper.NC;
                        TCP      = cat21Helper.TCP;
                        Altitude = cat21Helper.Altitude;

                        Latitude   = cat21Helper.Latitude;
                        Longitude  = cat21Helper.Longitude;
                        Point_Type = cat21Helper.Point_Type;
                        TD         = cat21Helper.TD;
                        TRA        = cat21Helper.TRA;
                        TOA        = cat21Helper.TOA;
                        TOV        = cat21Helper.TOV;
                        TTR        = cat21Helper.TTR;
                    }
                    if (FSPEC[34] == '1')
                    {
                        index = cat21Helper.Compute_Service_Managment(message, index);
                        RP    = cat21Helper.RP;
                    }
                }
                if (FSPEC.Count() > 36)
                {
                    if (FSPEC[35] == '1')
                    {
                        index    = cat21Helper.Compute_Aircraft_Operational_Status(message, index);
                        RA       = cat21Helper.RA;
                        TC       = cat21Helper.TC;
                        TS       = cat21Helper.TS;
                        ARV      = cat21Helper.ARV;
                        CDTIA    = cat21Helper.CDTIA;
                        Not_TCAS = cat21Helper.Not_TCAS;
                        SA       = cat21Helper.SA;
                    }
                    if (FSPEC[36] == '1')
                    {
                        index          = cat21Helper.Compute_Surface_Capabiliteies_and_Characteristics(message, index);
                        POA            = cat21Helper.POA;
                        CDTIS          = cat21Helper.CDTIS;
                        B2_low         = cat21Helper.B2_low;
                        RAS            = cat21Helper.RAS;
                        IDENT          = cat21Helper.IDENT;
                        LengthandWidth = cat21Helper.LengthandWidth;
                    }
                    if (FSPEC[37] == '1')
                    {
                        index             = cat21Helper.Compute_Message_Amplitude(message, index);
                        Message_Amplitude = cat21Helper.Message_Amplitude;
                    }
                    if (FSPEC[38] == '1')
                    {
                        index     = cat21Helper.Compute_Mode_S_MB_DATA(message, index);
                        MB_Data   = cat21Helper.MB_Data;
                        BDS1      = cat21Helper.BDS1;
                        BDS2      = cat21Helper.BDS2;
                        modeS_rep = cat21Helper.modeS_rep;
                    }
                    if (FSPEC[39] == '1')
                    {
                        index = cat21Helper.Compute_ACAS_Resolution_Advisory_Report(message, index);
                        TYP   = cat21Helper.TYP;
                        STYP  = cat21Helper.STYP;
                        ARA   = cat21Helper.ARA;
                        RAC   = cat21Helper.RAC;
                        RAT   = cat21Helper.RAT;
                        MTE   = cat21Helper.MTE;
                        TTI   = cat21Helper.TTI;
                        TID   = cat21Helper.TID;
                    }
                    if (FSPEC[40] == '1')
                    {
                        index       = cat21Helper.Compute_Receiver_ID(message, index);
                        Receiver_ID = cat21Helper.Receiver_ID;
                    }
                    if (FSPEC[41] == '1')
                    {
                        index             = cat21Helper.Compute_Data_Age(message, index);
                        Data_Ages_present = cat21Helper.Data_Ages_present;
                        AOS         = cat21Helper.AOS;
                        TRD         = cat21Helper.TRD;
                        M3A         = cat21Helper.M3A;
                        QI          = cat21Helper.QI;
                        TI          = cat21Helper.TI;
                        MAM         = cat21Helper.MAM;
                        GH          = cat21Helper.GH;
                        FL          = cat21Helper.FL;
                        ISA         = cat21Helper.ISA;
                        FSA         = cat21Helper.FSA;
                        AS          = cat21Helper.AS;
                        TAS         = cat21Helper.TAS;
                        MH          = cat21Helper.MH;
                        BVR         = cat21Helper.BVR;
                        GVR         = cat21Helper.GVR;
                        GV          = cat21Helper.GV;
                        TAR         = cat21Helper.TAR;
                        TI_DataAge  = cat21Helper.TI_DataAge;
                        TS_DataAge  = cat21Helper.TS_DataAge;
                        MET         = cat21Helper.MET;
                        ROA         = cat21Helper.ROA;
                        ARA_DataAge = cat21Helper.ARA_DataAge;
                        SCC         = cat21Helper.SCC;
                    }
                }
            }
            catch
            {
                message = hexMessageArray;
            }
        }
Esempio n. 2
0
 public CAT10Helper(ref HelpDecode decode)
 {
     this.lib = decode;
 }
Esempio n. 3
0
        // Filled
        public CAT10(ref HelpDecode decode, ref CAT10Helper cat10Helper, string[] array, int id, string[] messageBinary)
        {
            try
            {
                //Decode FSPEC
                string FSPEC0      = decode.getFSPEC(array);
                int    octetsFSPEC = FSPEC0.Length / 7;
                int    index       = 3 + octetsFSPEC;
                this.FSPEC     = FSPEC0.ToCharArray(0, FSPEC0.Length);
                message        = messageBinary;
                this.Id        = id;
                this.numOctets = array.Length;
                if (id == 34)
                {
                    String ds = "";
                }

                /* From now on each function looks to see if the decoding parameter exists in the
                 * message (checking if the FSPEC in its position == 1) and if it exists calls the function to decode the parameter */

                if (FSPEC[0] == '1')
                {
                    index            = cat10Helper.Compute_Data_Source_Identifier(message, index);
                    this.SAC         = cat10Helper.SAC;
                    this.SIC         = cat10Helper.SIC;
                    this.airportCode = cat10Helper.airportCode;
                    this.TAR         = cat10Helper.TAR;
                } //
                if (FSPEC[1] == '1')
                {
                    index            = cat10Helper.Compute_Message_Type(message, index);
                    this.messageType = cat10Helper.MESSAGE_TYPE;
                } //
                if (FSPEC[2] == '1')
                {
                    index    = cat10Helper.Compute_Target_Report_Descriptor(message, index);
                    this.TYP = cat10Helper.TYP;
                    this.DCR = cat10Helper.DCR;
                    this.CHN = cat10Helper.CHN;
                    this.GBS = cat10Helper.GBS;
                    this.CRT = cat10Helper.CRT;
                    this.SIM = cat10Helper.SIM;
                    this.TST = cat10Helper.TST;
                    this.RAB = cat10Helper.RAB;
                    this.LOP = cat10Helper.LOP;
                    this.TOT = cat10Helper.TOT;
                    this.SPI = cat10Helper.SPI;
                } //
                if (FSPEC[3] == '1')
                {
                    index                   = cat10Helper.Compute_Time_of_Day(message, index);
                    this.TimeOfDay          = cat10Helper.Time_Of_Day;
                    this.TimeOfDayInSeconds = cat10Helper.Time_of_day_sec;
                } //
                if (FSPEC[4] == '1')
                {
                    index = cat10Helper.Compute_Position_in_WGS_84_Coordinates(message, index);
                    this.LatitudeWGS_84 = cat10Helper.Latitude_in_WGS_84;
                    this.LatitudeWGS_84 = cat10Helper.Longitude_in_WGS_84;
                } //
                if (FSPEC[5] == '1')
                {
                    index      = cat10Helper.Compute_Measured_Position_in_Polar_Coordinates(message, index);
                    this.RHO   = cat10Helper.RHO;
                    this.THETA = cat10Helper.THETA;
                }
                if (FSPEC[6] == '1')
                {
                    index                  = cat10Helper.Compute_Position_in_Cartesian_Coordinates(message, index);
                    this.X_Component       = cat10Helper.X_Component;
                    this.Y_Component       = cat10Helper.Y_Component;
                    this.Position_In_Polar = cat10Helper.Position_In_Polar;
                }  //
                if (FSPEC.Count() > 8)
                {
                    if (FSPEC[7] == '1')
                    {
                        index            = cat10Helper.Compute_Track_Velocity_in_Polar_Coordinates(message, index);
                        this.GroundSpeed = cat10Helper.Ground_Speed;
                        this.TrackAngle  = cat10Helper.Track_Angle;
                    }  //
                    if (FSPEC[8] == '1')
                    {
                        index   = cat10Helper.Compute_Track_Velocity_in_Cartesian_Coordinates(message, index);
                        this.Vx = cat10Helper.Vx;
                        this.Vy = cat10Helper.Vy;
                    }  //
                    if (FSPEC[9] == '1')
                    {
                        index            = cat10Helper.Compute_Track_Number(message, index);
                        this.TrackNumber = cat10Helper.Track_Number;
                    }  //
                    if (FSPEC[10] == '1')
                    {
                        index    = cat10Helper.Compute_Track_Status(message, index);
                        this.CNF = cat10Helper.CNF;
                        this.TRE = cat10Helper.TRE;
                        this.CST = cat10Helper.CST;
                        this.MAH = cat10Helper.MAH;
                        this.TCC = cat10Helper.TCC;
                        this.STH = cat10Helper.STH;
                        this.TOM = cat10Helper.TOM;
                        this.DOU = cat10Helper.DOU;
                        this.MRS = cat10Helper.MRS;
                        this.GHO = cat10Helper.GHO;
                    }  //
                    if (FSPEC[11] == '1')
                    {
                        index        = cat10Helper.Compute_Mode_3A_Code_in_Octal_Representation(message, index);
                        this.VMode3A = cat10Helper.V_Mode_3A;
                        this.GMode3A = cat10Helper.G_Mode_3A;
                        this.LMode3A = cat10Helper.L_Mode_3A;
                        this.Mode3A  = cat10Helper.Mode_3A;
                    }  //
                    if (FSPEC[12] == '1')
                    {
                        index = cat10Helper.Compute_Target_Address(message, index);
                        this.TargetAddress = cat10Helper.Target_Address;
                    }  //
                    if (FSPEC[13] == '1')
                    {
                        index    = cat10Helper.Compute_Target_Identification(message, index);
                        this.STI = cat10Helper.STI;
                    }  //
                }
                if (FSPEC.Count() > 16)
                {
                    if (FSPEC[14] == '1')
                    {
                        index         = cat10Helper.Compute_Mode_S_MB_Data(message, index);
                        this.MBData   = cat10Helper.MB_Data;
                        this.BDS1     = cat10Helper.BDS1;
                        this.BDS2     = cat10Helper.BDS2;
                        this.modeSrep = cat10Helper.modeS_rep;
                    }  //
                    if (FSPEC[15] == '1')
                    {
                        index    = cat10Helper.Compute_Vehicle_Fleet_Identificatior(message, index);
                        this.VFI = cat10Helper.VFI;
                    }  //
                    if (FSPEC[16] == '1')
                    {
                        index                  = cat10Helper.Compute_Flight_Level_in_Binary_Representaion(message, index);
                        this.VFlightLevel      = cat10Helper.V_Flight_Level;
                        this.GFlightLevel      = cat10Helper.G_Flight_Level;
                        this.FlightLevelBinary = cat10Helper.Flight_Level_Binary;
                        this.FlightLevel       = cat10Helper.Flight_Level;
                    }  //
                    if (FSPEC[17] == '1')
                    {
                        index = cat10Helper.Compute_Measured_Height(message, index);
                        this.MeasuredHeight = cat10Helper.Measured_Height;
                    }  //
                    if (FSPEC[18] == '1')
                    {
                        index            = cat10Helper.Compute_Target_Size_and_Orientation(message, index);
                        this.LENGHT      = cat10Helper.LENGHT;
                        this.ORIENTATION = cat10Helper.ORIENTATION;
                        this.WIDTH       = cat10Helper.WIDTH;
                    }  //
                    if (FSPEC[19] == '1')
                    {
                        index     = cat10Helper.Compute_System_Status(message, index);
                        this.NOGO = cat10Helper.NOGO;
                        this.OVL  = cat10Helper.OVL;
                        this.TSV  = cat10Helper.TSV;
                        this.DIV  = cat10Helper.DIV;
                        this.SAC  = cat10Helper.TIF;
                    }  //
                    if (FSPEC[20] == '1')
                    {
                        index    = cat10Helper.Compute_Preprogrammed_Message(message, index);
                        this.TRB = cat10Helper.TRB;
                        this.MSG = cat10Helper.MSG;
                    } //
                }
                if (FSPEC.Count() > 22)
                {
                    if (FSPEC[21] == '1')
                    {
                        index             = cat10Helper.Compute_Standard_Deviation_of_Position(message, index);
                        this.DeviationX   = cat10Helper.Deviation_X;
                        this.DeviationY   = cat10Helper.Deviation_Y;
                        this.CovarianceXY = cat10Helper.Covariance_XY;
                    }
                    if (FSPEC[22] == '1')
                    {
                        index       = cat10Helper.Compute_Presence(message, index);
                        this.REP    = cat10Helper.REP_Presence;
                        this.DRHO   = cat10Helper.DRHO;
                        this.DTHETA = cat10Helper.DTHETA;
                    }
                    if (FSPEC[23] == '1')
                    {
                        index    = cat10Helper.Compute_Amplitude_of_Primary_Plot(message, index);
                        this.PAM = cat10Helper.PAM;
                    }
                    if (FSPEC[24] == '1')
                    {
                        index   = cat10Helper.Compute_Calculated_Acceleration(message, index);
                        this.Ax = cat10Helper.Ax;
                        this.Ay = cat10Helper.Ay;
                    }
                }
            }

            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
Esempio n. 4
0
        public void read(string path)
        {
            if (tablaCAT10.Columns.Count != 27)
            {
                StartTable10();
            }
            if (tablaCAT21.Columns.Count != 43)
            {
                StartTable21();
            }
            // Load file to RAM
            byte[] fileBytes = File.ReadAllBytes(path);
            // New Version Improvement by 0.673ms@4Ghz and 150MB ram usage only
            // Go over all of the packets and store them in a separate list of lists
            // First Octet Category
            List <Byte> fileBytesList = fileBytes.ToList();
            // 2nd*256 + 3rd Octet = Length in Bytes
            int messageCategory = fileBytes[0];
            int messageLength; // 2nd*256 + 3rd Octet
            List <List <Byte> > messages        = new List <List <Byte> >();
            List <String[]>     messagesHex     = new List <String[]>();
            List <String[]>     messagesBinary  = new List <String[]>();
            List <int>          messagesLengths = new List <int>();
            // Store messages from the fileBytes into packet size Blocks using messageLength
            int           currPointer = 0;
            int           lengthFile  = fileBytesList.Count;
            List <Byte>   message;
            List <string> messageHex    = new List <string>();
            List <string> messageBinary = new List <string>();

            while ((currPointer + 1) < lengthFile)
            {
                messageLength = (fileBytes[currPointer + 1] * 256) + fileBytes[currPointer + 2];
                message       = fileBytesList.GetRange(currPointer, messageLength);

                // Convert Message Byte to Messages of Hexadecimal
                messagesBinary.Add(message.Select(x => Convert.ToString(x, 2).PadLeft(8, '0')).ToArray());
                message.ForEach((b) =>
                {
                    messageHex.Add(b.ToString("X"));
                });
                // Store the Message and Message in Hex
                messages.Add(message); // (currentMessageByte)-LastByteIncluded
                messagesHex.Add(messageHex.ToArray());
                messageHex.Clear();
                messagesLengths.Add(messageLength);
                currPointer += messageLength;
            }

            // Messages separated --> Now we have to convert them according to CAT 10 or CAT 21
            HelpDecode decode = new HelpDecode();
            // To improve performance, just 1 object generated. For entire list
            CAT10Helper cat10Helper = new CAT10Helper(ref decode);
            CAT21Helper cat21Helper = new CAT21Helper(ref decode);
            //List<CAT10> arrCat10 = new List<CAT10>[listhex.Count];
            List <CAT10> arrCat10 = new List <CAT10>();
            List <CAT21> arrCat21 = new List <CAT21>();

            /*CAT10 newcat10 = new CAT10(decode, cat10Helper); */
            string[] arraystring;
            /*CAT21v21 newcat21 = new CAT21v21(decode, cat10Helper);*/
            CAT10 temp10; CAT21 temp21;

            for (int q = 0; q < messagesHex.Count; q++)
            {
                arraystring = messagesHex[q];
                /*int CAT = int.Parse(arraystring[0], System.Globalization.NumberStyles.HexNumber);*/

                if (arraystring[0] == "A")
                {
                    temp10 = new CAT10(ref decode, ref cat10Helper, arraystring, q, messagesBinary[q]);
                    arrCat10.Add(temp10);
                    AddRowTable10(temp10);
                }
                else if (arraystring[0] == "15")
                {
                    /*temp21 = new CAT21(ref decode, ref cat21Helper, arraystring, q, messagesBinary[q]);
                     * arrCat21.Add(temp21);
                     * AddRowTable21(temp21);*/
                }
            }
            string a = ";";
        }