Description
CLIP provides a number of functions that can identify the type of process (ie. Master, Slave). These allow the code to make processing decisions dependent on the process. They can be called anywhere in the code, but are usually called in OnPrestart to initialise any Run-Time Attributes.
Generation
The ClpAmAutonomous function identifies whether this process is an Autonomous process
Uns ClpAmAutonomous();
Return
The function returns TRUE if this is an Autonomous process, FALSE otherwise.
Examples
bool MyProc1Process::OnPrestart()
{
...
if ( ClpAmAutonomous() )
gMEMORY = MB( 1024 );
else if ( ClpAmRootMaster() )
gMEMORY = MB( 512 );
else if ( ClpAmSubMaster() )
gMEMORY = MB( 512 );
else if ( ClpAmSlave() )
gMEMORY = MB( 1024 );
...
}