Sensoray 2410 API Manual de usuario Pagina 25

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 39
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 24
Sensoray 24xx Programming Guide
21
Model 2410 Digital I/O Module
case CAPMSG_ONESHOT:
printf( "one-shot cap enabled: %04x %04x %04x\n", val[2], val[1], val[0] );
break;
case CAPMSG_DISABLE:
printf( "cap disabled: %04x %04x %04x\n", val[2], val[1], val[0] );
break;
case CAPMSG_EVENT:
if ( val[0] | val[1] | val[2] )
printf( "captured events: %04x %04x %04x\n", val[2], val[1], val[0] );
else
printf( "time-out -- no events captured" );
break;
case CAPMSG_ERROR:
printf( "connection closed unexpectedly\n" );
break;
default:
printf( "unknown error\n" );
break;
}
}
6.4.4 s2410_AsyncCapEnd()
Function: Terminate asynchronous notification messages.
Prototype:
BOOL s2410_AsyncCapEnd( HEVCAP hevcap, u32 &err );
Returns: True if the operation was successful, otherwise False is returned and
err
will contain the associated error code.
Notes: This function instructs the asynchronous event notification system to terminate operations. In response, the
application’s callback function will be called one final time, with message type
CAPMSG_DETACH
, to inform the
application that the notification system has shut down.
s2410_AsyncCapEnd()
should only be called if asynchronous event notifications have been enabled by a previous
call to
s2410_AsyncCapBegin()
.
Example:
// Shut down the asynchronous event notification system.
u32 err = ERR_NONE;
if ( !s2410_AsyncCapEnd( hevcap, &err ) )
printf( "Error: %s\n", s24xx_ErrorText(err) );
Argument Description
hevcap
Handle to async event notification system obtained from
s24xx_AsyncCapBegin()
.
err
Pointer to error code. See Section 4.3.1 for details.
Vista de pagina 24
1 2 ... 20 21 22 23 24 25 26 27 28 29 30 ... 38 39

Comentarios a estos manuales

Sin comentarios