getManIdFromInt()

Converts manager ID into manager type and manager number.

Synopsis

int getManIdFromInt( int manIdInt, char &manType, char &manNum [, int &sysNum [, char &replica]]);

Parameters

Parameter Description
manIdInt Manager ID. The manager identifier consists of replica (R), system number (S), manager type (T) and number (N) in the following format 0xRRSSTTNN.
&manType Type of manager
&manNum Number of the manager.
&sysNum System number. The system number 0 will not be replaced by the default number.
replica Replica. In a non-redunant system, the replica is 1. In a non-distributed system, the system number is 1.

Return value

In the event of an error, the function returns -1 otherwise, 0.

Error

In the event of too few arguments

Description

Sets manType and manNum in accordance with the value from manIdInt. The following constants are defined in CONTROL for the manager type:

NO_MAN EVENT_MAN
DRIVER_MAN DB_MAN
UI_MAN CTRL_MAN
ASCII_MAN API_MAN

Example

This example returns first an integer that corresponds to a manager identifier with the convManIdToInt function and then converts the manager ID into manager type, manager number, system number and replica with the getManIdFromInt function.

main()
{
  int manID, manIDInt;
  int sysNum = 1;
  char manType = 4, manNum = 8, replica = 1;
  char manType1, manNum1,replica1;
  int sysNum1;
  manID = convManIdToInt(manType, manNum,sysNum,replica);
  DebugN(manID);
  manIDInt=getManIdFromInt (manID,manType1,manNum1, sysNum1,
  replica1);
  DebugN((int)manType1,(int)manNum1,sysNum1,(int)replica1);
}

Assignment

Administration of managers..., User administration

Availability

CTRL