RemapDriver
Re-sizes the device driver image buffer, with the specified size.
Syntax
void RemapDriver( bytes );
Parameters
unsigned long bytes
The new size of the kernel image buffer ( in bytes ).
Returns
None
Required Headers
CController.h
Namespace
arc
Throws
None
Remarks
None
Example
        // This code demonstrates how to use RemapDriver().

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

        CController cController;

        try {
            // This MUST be called first!
            cController.GetDeviceBindings();

            if ( cController.GetDeviceBindingCount() <= 0 )
                throw std::runtime_error( "Failed to find any ARC devices!" );
 
            cout << "Opening device #0 ..." << endl;
            cController.OpenDriver( 0 );

            cout << "Mapping 2200x2200 pixel image buffer ..." << endl;
            cController.MapDriver( 2200 * 2200 * sizeof( unsigned short ) );

            // .... do something here ....

            cout << "Remapping buffer to 1024x600 pixels ..." << endl;
            cController.RemapDriver( 1024 * 600 * sizeof( unsigned short ) );

            // .... do something here ....

            // Unmap the driver when all done.
            cController.UnmapDriver();
 
            // Close the driver when we're all done.
            cController.CloseDriver();
        }
        catch ( std::exception &e )
        {
            cerr << "Exception Occurred: " << e.what() << endl;
        }

© Astronomical Research Cameras, Inc.