.

mpiControlMemoryGet

Declaration

 
long mpiControlMemoryGet(MPIControl  control,
                         void         *dst,
                         const  void  *src,
                         long         count) 
 

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

Description

mpiControlMemoryGet gets count bytes of control memory (starting at address src) and puts (writes) them in application memory (starting at address dst).

 
Return Values
MPIMessageOK  

Sample Code

/* Simple code to increment userbuffer[0] */
  MEIXmpData        *firmware;
  MEIXmpBufferData  *buffer;
	
  long returnValue, tempBuffer;
	
  /* Get memory pointers */
  returnValue =
      mpiControlMemory(control,
      &firmware,
      &buffer);
  msgCHECK(returnValue);
	
  returnValue = mpiControlMemoryGet(control,
      &tempBuffer,
      &buffer->UserBuffer.Data[0],
      sizeof(buffer->UserBuffer.Data[0]));
  msgCHECK(returnValue);

  tempBuffer++;
	
  returnValue = mpiControlMemorySet(control,
      &buffer->UserBuffer.Data[0],
      &tempBuffer,
      sizeof(buffer->UserBuffer.Data[0]));
  msgCHECK(returnValue);

See Also

mpiControlMemorySet | mpiControlMemory | mpiControlMemoryAlloc | mpiControlMemoryCount | mpiControlMemoryFree

 

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