mpiFilterMemoryGet
Declaration
|
long mpiFilterMemoryGet(MPIFilter filter,
void *dst,
const void *src,
long count)
|
|
Required Header: stdmpi.h
Change History: Modified in the 03.03.00 |
Description
mpiFilterMemoryGet copies count bytes of a Filter's (filter) memory (starting at address src) and writes them into application memory (starting at address dst).
Sample Code
|
/* filterControlOutputGet(...) demonstrates how to read
the control output velocity on a motion object directly
through memory. mpiFilterMemory(...) obtains the filter
control memory pointer. The pointer's address is then
passed into mpiFilterMemoryGet(...) to obtain the control
output.
Note: MEIXmpFilter *memory must be casted as (void *) in
mpiFilterMemory(...).
*/
long filterControlOutputGet(MPIFilter filter,
float *controlOutput)
{
MEIXmpFilter *memory;
long returnValue;
/* Get filter control memory pointer */
returnValue =
mpiFilterMemory(filter,
(void *)&memory);
/* Get filter control output value */
if(returnValue == MPIMessageOK)
{
returnValue =
mpiFilterMemoryGet(filter,
controlOutput,
&memory->ControlOutput,
sizeof(&memory->ControlOutput));
}
return returnValue;
}
|
See Also
mpiFilterMemorySet | mpiFilterMemory
|