convManIdToInt()
Returns an integer that corresponds to the ManagerIdentifier.
Synopsis
int convManIdToInt(char manType, char manNum [, int sysNum [, char replica]]);
Parameters
Parameter | Meaning |
manType | Type of manager |
manNum | Number of the manager |
sysNum | System number. Per default the system number is 0 and not explicitly the own system number. In non-distributed systems the system number is 1. |
replica | Replica. In non-redundant systems the replica is 1. |
Return Value
In the event of an error -1, otherwise the manager identifier.
Description
Returns the manager identifier, according to manType, manNum, sysNum and replica. The system number and replica are optional parameters. Application , for example, for restarting a manager with _Managers.Exit. The function includes the manager type number (T), the manager number (N), the replica (R) and system (S) in an int as follows:
RRSSTTNN
Note that the manager identifier returned by the convManIdToInt under 3.1 is compatible to the manager identifier under 3.5.
The manType is evaluated from the constants (for example, API_MAN). The following constants are defined in Control for the manager type:
NO_MAN | ASCII_MAN |
API_MAN | CTRL_MAN |
DB_MAN | DEVICE_MAN |
DDE_MAN | DIST_MAN |
DRIVER_MAN | EVENT_MAN |
REDU_MAN | UI_MAN |
Example
You can use the convManIdToInt as follows with two parameters (Manager type and Manager number).
main()
{ int manID; dyn_char managers; managers = makeDynChar(UI_MAN); // Manager type constant manID = convManIdToInt(UI_MAN, 1); /* Function call with two parameters. The return value is an integer that corresponds to the manager identifier */ DebugN(manID); } |
You can pass also the parameters system number and replica to the function.
main()
{ int manID,sys; char rep; dyn_char managers; managers = makeDynChar(UI_MAN); sys = getSystemId("System1:"); //Returns the system ID of the own system rep = 2; //Replica number manID = convManIdToInt(UI_MAN, 1,sys,rep); /* Function call with all parameters */ DebugN(manID); //Integer that corresponds to the manager identifier } |
Assignment
Administration of managers..., User administration
Availability
CTRL