User Tools

Site Tools


irig106lib:using_irig106lib

Compile up using your favorite compiler suite. For MSVC 6 use the “irig106.dsw” work space. For MSVC .NET use the “irig106.sln” solution file. For GCC (on Linux or DJGPP) use “make”.

Reading files involves opening the file, reading a data packet header, optionally read the data packet (which may contain multiple data messages), decode the data packet, and then loop back and read the next header. The routines for handling data packets are in “irig106ch10”. Routines for decoding each data packet type are contained in their own source code modules. For example, 1553 decoding is contained in “i106_decode_1553f1”. Below is a simplified example of message processing…

    enI106Ch10Open(&iI106Ch10Handle, szInFile, I106_READ);

    while (1==1) 
        {

        enStatus = enI106Ch10ReadNextHeader(iI106Ch10Handle, &suI106Hdr);

        if (enStatus == I106_EOF) return;

        enStatus = enI106Ch10ReadData(iI106Ch10Handle, &ulBuffSize, pvBuff);

        switch (suI106Hdr.ubyDataType)
            {

            case I106CH10_DTYPE_1553_FMT_1 :    // 0x19

                enStatus = enI106_Decode_First1553F1(&suI106Hdr, pvBuff, &su1553Msg);
                while (enStatus == I106_OK)
                    {
                    Do some processing...
                    enStatus = enI106_Decode_Next1553F1(&su1553Msg);
                    }
                break;
            default:
                break;
            } // end switch on message type

        }  // End while

    enI106Ch10Close(iI106Ch10Handle);
irig106lib/using_irig106lib.txt · Last modified: 2014/05/06 09:12 by bob

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki