Agilent Technologies FS2010 Guía de usuario Pagina 85

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 160
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 84
Programming with VISA 3
Agilent VISA User’s Guide 85
/* Get the function name from the exception
context */
viGetAttribute( context, VI_ATTR_OPER_NAME,
functionName );
errStrBuffer[0] = 0;
viStatusDesc( vi, exceptionErrNbr,
errStrBuffer );
printf("ERROR: Exception Handler reports\n"
"(%s)\n","VISA function '%s' failed with
error 0x%lx\n", "functionName,
exceptionErrNbr, errStrBuffer );
return VI_SUCCESS;
}
void main(){
ViStatus status;
ViSession drm;
ViSession vi;
ViAddr myUserHandle = 0;
status = viOpenDefaultRM( &drm );
if ( status < VI_SUCCESS ) {
printf( "ERROR: viOpenDefaultRM failed with
error = 0x%lx\n", status );
return;
}
/* Install the exception handler and enable
events for it */
status = viInstallHandler(drm,
VI_EVENT_EXCEPTION, myExceptionHandler,
myUserHandle);
if ( status < VI_SUCCESS )
{
printf( "ERROR: viInstallHandler failed
with error 0x%lx\n", status );
}
status = viEnableEvent(drm, VI_EVENT_EXCEPTION,
VI_HNDLR, VI_NULL);
if ( status < VI_SUCCESS ) {
Vista de pagina 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 159 160

Comentarios a estos manuales

Sin comentarios