.

mpiCaptureMemoryGet

Declaration

 
long mpiCaptureMemoryGet(MPICapture  capture,
                         void        *dst,
                         const void  *src,
                         long        count) 
  Required Header: stdmpi.h
Change History: Modified in the 03.03.00

Description

mpiCaptureMemoryGet copies count bytes of a Capture object's (capture) memory (starting at address src) and writes them into application memory (starting at address dst).

 
Return Values  
MPIMessageOK  

Sample Code


/* captureDataGet(...) demonstrates how to read sample counter 
of a capture object. mpiCaptureMemory(...) obtains the capture
control memory pointer. The pointer's address is then passed
into mpiCaptureMemoryGet(...) to obtain the sampleCounter value.
Note: MEIXmpCapture *memory must be casted as (void *) in
mpiCaptureMemory.
*/

long captureDataGet(MPICapture  capture, 
                    long        *sampleCounter)
{

   MEIXmpCapture *memory;
   long          returnValue;

   /* Get capture control memory pointer */
   returnValue = 
   mpiCaptureMemory(capture, 
                   (void *)&memory);

   /* Get capture sample counter */
   if(returnValue == MPIMessageOK)
   {

      returnValue = 
         mpiCaptureMemoryGet(capture,
                             sampleCounter,
                             &memory->Data.SampleCounter,
                             sizeof(&memory->Data.SampleCounter));
   }

   return returnValue;
}

See Also

mpiCaptureMemory | mpiCaptureMemorySet

 

       Legal Notice  |  Tech Email  |  Feedback
      
Copyright ©
2001-2021 Motion Engineering