mapFdBytes
Syntax
unsigned long mapFdBytes
Type
unsigned long integer
Required Headers
CController.h
Namespace
arc
Remarks
The current size of the kernel image buffer ( in bytes ).
Example
        // Demonstrates how to print out every pixel
        // in the entire image buffer.

        #include <iostream.h>
        #include "CController.h"
        using namespace std;
        using namespace arc;

        CController cController;

        try {
            // .... open driver, initialize, etc ....

            unsigned short *pBuf = ( unsigned short * )cController.mapFd;

            if ( pBuf == NULL )
                throw std::runtime_error( "Invalid image buffer ( NULL )!" );
 
            long lPixelCount = cController.mapFdBytes / sizeof( unsigned short );

            for ( int pix=0; pix<lPixelCount; pix++ )
            {
                cout << "pBuf[ " << pix << " ]: " << pBuf[ pix ] << endl;
            }

            // .... do something else ....
        }
        catch ( std::exception &e )
        {
            cerr << "Exception Occurred: " << e.what() << endl;
        }

© Astronomical Research Cameras, Inc.