CheckReply
Verifies a reply value against an expected reply value. By default, the reply value is compared against the done ( 'DON' ) reply value.
Syntax
void CheckReply( reply, expectedReply );
Parameters
long reply
The reply value to check.
long expectedReply
[optional] The reply value to compare against. Default value: 'DON'.
Returns
None
Required Headers
CController.h
Namespace
arc
Throws
std::runtime_error
Remarks
This method will throw an exception if the two reply parameters do not match. Exceptions can be caught using a try/catch block.
Example
        // This code demonstrates how to use CheckReply().

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

        CController cController;

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

        try {
            // Verify that Test Data Link reply is 0x112233
            long lReply = cController.Command( TIM_ID, TDL, 0x112233 );
            cController.CheckReply( lReply, 0x112233 );
 
            // Verify that Write Memory command returns a 'DON'
            lReply = cController.Command( TIM_ID, WRM, ( X | 0x1 ), 0x55 );
            cController.CheckReply( lReply );
        }
        catch ( std::exception &e )
        {
            cerr << "Exception Occurred: " << e.what() << endl;
        }

© Astronomical Research Cameras, Inc.