UseDeviceBindings
Sets the device binding to a specific value. Used for backward compatibility with the older astropciV1.7 driver. i.e. allows "astropci1" to be used on windows.
Syntax
void UseDeviceBindings( deviceNames[], nameCount );
Parameters
std::string deviceNames[]
Array of device names, such as sDeviceName = { "astropci1" }.
int nameCount
The number of elements in parameter 1 array.
Returns
None
Required Headers
CController.h
Namespace
arc
Throws
std::runtime_error
Remarks
This function must be called first if GetDeviceBindings() is not used, or OpenDriver() will fail. Exceptions can be caught using a try/catch block.
Example
        // This code demonstrates how to instantiate a new CController
        // object and manually set the available device list using the
        // older V1.7 device driver.

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

        CController cController;

        try {
            std::string sDevNames[ 1 ] = { "astropci1" };

            cController.UseDeviceBindings( sDevNames, 1 );
            cController.OpenDriver( 0 );

            // .... do something here ....
  
            // Close the driver connection when program
            // is finished.
            cController.CloseDriver();
        }
        catch ( std::exception &e )
        {
            cerr << "Exception Occurred: " << e.what() << endl;
        }

© Astronomical Research Cameras, Inc.