.

mpiFilterMemory

Declaration

 
long mpiFilterMemory(MPIFilter  filter,
                     void       **memory)
 

Required Header: stdmpi.h

Description

mpiFilterMemory writes an address, which is used to access a Filter's (filter) memory to the contents of memory. This address, or an address calculated from it, can be passed as the src parameter to MPIFilterMemoryGet(...) and as the dst parameter to MPIFilterMemorySet(...).

 
Return Values
MPIMessageOK  

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

mpiFilterMemoryGet | mpiFilterMemorySet

 

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