.

mpiCaptureMemory

Declaration

 
long mpiCaptureMemory(MPICapture  capture,
                      void        **memory) 
  Required Header: stdmpi.h

Description

mpiCaptureMemory writes an address [which is used to access a Capture object's (capture) memory] to the contents of memory. This address, or an address calculated from it, can be passed as the src parameter to mpiCaptureMemoryGet(...) and as the dst parameter to mpiCaptureMemorySet(...).

 
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

mpiCaptureMemoryGet | mpiCaptureMemorySet

 

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