Description
CLIP slave applications (whether Sub-Master or Slave), need to identify the network address of their master. To simplify this process, each master registers its availability with a CLIP registrar application. Slaves and Sub-Masters can now interrogate the registrar for the necessary information. (In practice Masters are configured to act as the Registrar, but this need not be the case).
The function ClpAmRegistrar allows the code to make processing decisions dependent on the process's status. It can be called anywhere in the code, but is usually called in OnPrestart to initialise any Run-Time Attributes.
Generation
The ClpAmRegistrar function identifies whether this process is a Registrar.
Uns ClpAmRegistrar();
Return
The function returns TRUE if this is process is a Registrar, FALSE otherwise.
Examples
bool MyProc1Process::OnPrestart()
{
...
if ( ClpRegistrar() )
strcpy( gREGISTRAR, "127.0.0.0" );
else
strcpy( gREGISTRAR, "192.168.100.25" );
...
}