Exemple #1
0
        /////////////////////////////////////////////
        /* Initialize method variables             */
        /////////////////////////////////////////////
        void initializeVariables()
        {
            msg_header_block  = new HeaderBlock();                    // Array to hold Message Header Block data.
            description_block = new DescriptionBlock();               // Array to hold Product Description Block data.
                                                                      // Array to hold the Product Symbology Block data.

            msg_header_block_offset  = 30;
            description_block_offset = 48;
        }
Exemple #2
0
        /////////////////////////////////////////////
        /* Parse the Message Header Block into an  */
        /* array and return it.                    */
        /////////////////////////////////////////////
        public HeaderBlock parseMHB()
        {
            HeaderBlock msg_header_block = new HeaderBlock();

            fs.Seek(msg_header_block_offset, SeekOrigin.Begin);
            msg_header_block.Code           = readHalfWord();  // HW 1
            msg_header_block.DateTime       = readTimeStamp(); // convertFromJulian((int)(readHalfWord() + 2440586.5)); // HW 2
            msg_header_block.Length         = readWord();      // HW 5 & HW 6
            msg_header_block.sourceID       = readHalfWord();  // HW 7
            msg_header_block.destinationID  = readHalfWord();  // HW 8
            msg_header_block.numberofBlocks = readHalfWord();  // HW 9
            this.msg_header_block           = msg_header_block;
            return(msg_header_block);
        }