public IdentificationSection(byte[] rawBytes) : base(rawBytes)
        {
            CenterId = SectionReader.ReadGribShort();

            SubCenterId = SectionReader.ReadGribShort();

            MasterTablesVersionNumber = SectionReader.ReadByte();

            LocalTablesVersionNumber = SectionReader.ReadByte();

            SignificanceOfReferenceTime = SectionReader.ReadByte();

            var year   = SectionReader.ReadGribShort();
            var month  = SectionReader.ReadByte();
            var day    = SectionReader.ReadByte();
            var hour   = SectionReader.ReadByte();
            var minute = SectionReader.ReadByte();
            var second = SectionReader.ReadByte();

            ReferenceTime = new DateTime(year, month, day, hour, minute, second, DateTimeKind.Utc);

            ProductionStatusOfMessage = SectionReader.ReadByte();

            ProcessedDataTypeOfMessage = SectionReader.ReadByte();

            Reserved = SectionReader.ReadBytes(Length - Constants.Section1.DefaultLength);
        }
예제 #2
0
        public GridDefinition(byte[] rawBytes) : base(rawBytes)
        {
            SourceOfGridDefinition = SectionReader.ReadByte();

            NumberOfDataPoints = SectionReader.ReadGribInt();

            NumberOfOctetsForOptionalListOfNumbersDefiningNumberOfPoints = SectionReader.ReadByte();
            InterpretationOfOptionalList = SectionReader.ReadByte();

            GridDefintionTemplateNumber = SectionReader.ReadGribShort();
            if (GridDefintionTemplateNumber == Constants.Section3.GridDefinitionTemplateNumber.LatitudeLongitude)
            {
                var def = new LatLonGridDefinitionTemplate();
            }

            GridDefinitionTemplateAndStuff = SectionReader.ReadBytes(Length - 14);
        }