Description
CLIP provides a number of functions that can identify the index of the process. These allow the code to make processing decisions dependent on the index. They can be called anywhere in the code, but are often called in OnPrestart to initialise any Run-Time Attributes.
Generation
The ClpThisSlaveId function identifies the slave index of this process.
Uns ClpThisSlaveId();
The first slave to register with the Master (Root or Sub) is index 1, subsequent slaves will increment the index. index 0 implies the master.
Return
The function returns the index of the slave.
Examples
bool MyProc1Process::OnPrestart()
{
...
if ( ClpThisSlaveId() == 1 )
gPRIMARY_SLAVE = TRUE;
else
gPRIMARY_SLAVE = FALSE;
...
}