long value |
The value to compare against standard error values. |
// Demonstrates how to check a command
// reply for errors.
#include <iostream.h>
#include "CController.h"
using namespace std;
using namespace arc;
CController cController;
// .... open driver, initialize, etc ....
try {
// Set the next exposure time to 3 seconds
long lRetVal = cController.Command( TIM_ID, SET, 3000 );
if ( cController.ContainsError( lRetVal ) )
throw std::runtime_error( "Set exposure time failed!" );
// .... OR could have also done this ....
lRetVal = cController.Command( TIM_ID, SET, 3000 );
if ( lRetVal != DON )
throw std::runtime_error( "Set exposure time failed!" );
}
catch ( std::exception &e )
{
cerr << "Exception Occurred: " << e.what() << endl;
}
© Astronomical Research Cameras, Inc.