CloseDriver
Closes the driver connection that was opened with a previous call to OpenDriver().
Syntax
void CloseDriver();
Parameters
None
Returns
None
Required Headers
CController.h
Namespace
arc
Throws
std::runtime_error
Remarks
None
Example
        // This code demonstrates how to instantiate a new CController
        // object, open a driver connection, and then closes it.

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

        CController cController;

        try {
            // Find all ARC PCI boards in the system.
            // This MUST be called first!
            cController.GetDeviceBindings();

            if ( cController.GetDeviceBindingCount() <= 0 )
                throw std::runtime_error( "No PCI devices available!" );

            cout << "Opening device #0" << endl;
            cController.OpenDriver( 0 );

            // Check if the driver is open.
            bool bIsOpen = cController.IsDriverOpen();

            if ( !bIsOpen )
                throw std::runtime_error( "Not connected to any driver!" );
            else
                cout << "Successfully opened device #0" << endl;

            // Close the driver connection.
           cout << "Closing device #0" << endl;
           cController.CloseDriver();
         }
        catch ( std::exception &e )
        {
            cerr << "Exception Occurred: " << e.what() << endl;
        }

© Astronomical Research Cameras, Inc.