SetHctr
Sets the 24-bit HCTR ( control ) PCI register with the specified value.
Syntax
void SetHctr( value );
Parameters
long value
The 24-bit value to set.
Returns
None
Required Headers
CController.h
Namespace
arc
Throws
std::runtime_error
Remarks
Exceptions can be caught using a try/catch block.
Example
        // Set the PCI board HCTR bits. Bits 8 & 9 (HTF bits) are cleared to
	    // allow 32-bit values to be written to the PCI board without loss
	    // of bytes. The 32-bit values are broken up into two 16-bit values.

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

        CController cController;

        // .... open driver, initialize, etc ....

        try {
	        long lHctrValue = cController.GetHctr();

        	// Clear the HTF bits (8 and 9) and bit3
	        lHctrValue = lHctrValue & HTF_CLEAR_MASK;

	        // Set the HTF bits
	        lHctrValue = lHctrValue | HTF_MASK;
	        cController.SetHctr( lHctrValue );
         }
        catch ( std::exception &e )
        {
            cerr << "Exception Occurred: " << e.what() << endl;
        }

© Astronomical Research Cameras, Inc.