MATLAB IMAGE ACQUISITION TOOLBOX - RELEASE NOTES Guide de l'utilisateur Page 90

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 172
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 89
5 Acquiring Image Data
5-12
return true;
// Create the image acquistion thread.
_acquireThread = CreateThread(NULL,
0,
acquireThread,
this,
0,
&_acquireThreadID);
if (_acquireThread == NULL) {
closeDevice();
return false;
}
// Wait for thread to create message queue.
while(PostThreadMessage(_acquireThreadID,WM_USER+1,0,0) == 0)
Sleep(1);
return true;
}
2
To be able to compile and link your adaptor, you must create a stub implementation
of your acquireThread() function and add it to your adaptor. You can fill in
the complete implementation later — see “Implementing the Acquisition Thread
Function” on page 5-18.
DWORD WINAPI MyDeviceAdaptor::acquireThread(void* param) {
MSG msg;
while (GetMessage(&msg,NULL,0,0) > 0) {
switch (msg.message) {
case WM_USER:
// The frame acquisition loop code goes here.
imaqkit::adaptorWarn(''in acquire thread function \n'');
} // end switch
} // end while
return 0;
} // end acquireThread
3
Add declarations of the acquireThread() function, the acquireThread variable,
and the acquireThreadID variable as private data members of your adaptor class
header file. In this example, MyDeviceAdaptor.h.
Vue de la page 89
1 2 ... 85 86 87 88 89 90 91 92 93 94 95 ... 171 172

Commentaires sur ces manuels

Pas de commentaire