Agilent Technologies FS2010 Guide de l'utilisateur Page 66

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 160
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 65
66 Agilent VISA User’s Guide
3 Programming with VISA
ViStatus _VI_FUNCH my_handler (ViSession vi,
ViEventType eventType, ViEvent context, ViAddr
usrHandle) {
/* your event handling code here */
return VI_SUCCESS;
}
main(){
ViSession vi;
ViAddr addr=0;
.
.
viInstallHandler(vi, VI_EVENT_SERVICE_REQ,
my_handler, addr);
viEnableEvent(vi, VI_EVENT_SERVICE_REQ,
VI_HNDLR, VI_NULL);
.
/* your code here */
.
viDisableEvent(vi, VI_EVENT_SERVICE_REQ,
VI_HNDLR);
viUninstallHandler(vi, VI_EVENT_SERVICE_REQ,
my_handler, addr);
.
}
Installing Handlers
VISA allows applications to install multiple handlers for an
event type on the same session. Multiple handlers can be
installed through multiple invocations of the
viInstallHandler operation, where each invocation adds to
the previous list of handlers.
If more than one handler is installed for an event type, each
of the handlers is invoked on every occurrence of the
specified event(s). VISA specifies that the handlers are
invoked in Last In First Out (LIFO) order. Use the following
function when installing an event handler:
Vue de la page 65
1 2 ... 61 62 63 64 65 66 67 68 69 70 71 ... 159 160

Commentaires sur ces manuels

Pas de commentaire