.

mpiControlConfigGet

Declaration

 
long mpiControlConfigGet(MPIControl       control,
                         MPIControlConfig *config,
                         void             *external)
 

Required Header: stdmpi.h

Description

mpiControlConfigGet gets the configuration of a Control object (control) and writes it into the structure pointed to by config, and also writes it into the implementation-specific structure pointed to by external (if external is not NULL).

The configuration information in external is in addition to the configuration information in config, i.e, the configuration information in config and in external is not the same information. Note that config or external can be NULL (but not both NULL).

Remarks

external either points to a structure of type MEIControlConfig{} or is NULL.

 
Return Values  
MPIMessageOK  

Sample Code


/*
  Write a value to element index of the user buffer.
  Make sure to save topology to flash before doing this.
*/
void write2UserBuffer(MPIControl control, long value, long index)
{
    MPIControlConfig   config;
    MEIControlConfig   external;
    long               returnValue;
	
    if((index < MEIXmpUserDataSize) && (index >= 0))
    {
      /* Make sure to save topology to flash before doing this */
      returnValue = mpiControlConfigGet(control,
           &config,
           &external);
      msgCHECK(returnValue);

      external.UserBuffer.Data[index] = value;

      returnValue = mpiControlConfigSet(control,
                                        &config,
                                        &external);	
      msgCHECK(returnValue);
     }
}

See Also

mpiControlConfigSet | MEIControlConfig | Dynamic Allocation of External Memory Buffers

 

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