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

  • 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 93
5 Acquiring Image Data
5-16
The PostThreadMessage() function accepts these parameters:
BOOL PostThreadMessage( DWORD idThread,
UINT Msg,
WPARAM wParam,
LPARAM lParam
);
The following table describes how to set these parameters for an adaptor. For more
information about sending thread messages, see the documentation at the Microsoft
Developer Network Web site (msdn.microsoft.com).
Parameter Description
idThread Identifier of the thread to which the message is to be posted, returned
by CreateThread().
Msg Message to be posted. Microsoft defines a range of values for user
messages, beginning with the value WM_USER.
wParam Additional message-specific information
lParam Additional message-specific information
Example: Initiating Acquisition
This example illustrates a simple startCapture() function. This function takes no
arguments and returns a Boolean value indicating whether the video input object is in
start state.
1
Replace the stub implementation in the MyDeviceAdaptor.cpp file with this code
and then rebuild your adaptor.
bool MyDeviceAdaptor::startCapture(){
// Check if device is already acquiring frames.
if (isAcquiring())
return false;
// Send start message to acquisition thread
PostThreadMessage(_acquireThreadID, WM_USER, 0, 0);
return true;
}
2
Start the MATLAB software and run your adaptor to verify that your acquisition
thread gets the start message from startCapture().
Vue de la page 93
1 2 ... 89 90 91 92 93 94 95 96 97 98 99 ... 171 172

Commentaires sur ces manuels

Pas de commentaire