mpiCaptureMemorySet

Declaration

int32_t mpiCaptureMemorySet(MPICapture  capture,
                         void        *dst,
                         const void  *src,
                         int32_t        count) 
 

Required Header: capture.h
Change History: Modified in the 03.03.00

Description

mpiCaptureMemorySet copies count bytes of application memory (starting at address src) and writes them into a Capture object's (capture) 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: MPIXmpCapture *memory must be casted as (void *) in
mpiCaptureMemory.
*/

int32_t captureDataGet(MPICapture  capture, 
                    int32_t        *sampleCounter)
{

   MPIXmpCapture *memory;
   int32_t          returnValue;

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

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

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

   return returnValue;
}

See Also

mpiCaptureMemory | mpiCaptureMemoryGet