mpiControlMemoryGet

Declaration

int32_t mpiControlMemoryGet(MPIControl  control,
                         void         *dst,
                         const  void  *src,
                         int32_t         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] */
  MPIXmpData        *firmware;
  MPIXmpBufferData  *buffer;
	
  int32_t 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