pmonGetNum()

The function pmonGetNum() returns the number of a WinCC OA manager.

Synopsis

int pmonGetNum(int idx);

Parameters

Parameter Description
idx The WinCC OA manager index. See chapter Details on the Pmon

Return value

The function pmonGetNum() returns the number of a WinCC OA manager or in the event of errors, -1.

Description

The function pmonGetNum() returns the number of a WinCC OA manager. The number is the manager number that was assigned to a manager in the WinCC OA console.

Figure: The WinCC OA Console and the manager numbers

NOTE that the function can only be used on a local computer. A remote UI cannot query the PMON of a server.

EXAMPLE

In the following example, the numbers as well as names of WinCC_OA managers are returned and output.

main(mapping event)
{
  string pName;
  int i, pNum;
  for (int i = 0; i < pmonGetCount(); i++)
  {
   pNum = pmonGetNum(i);
   pName = pmonGetName(i);
   DebugN("Manager name: ", pName, "Manager number:", pNum);
  }
 }

The function outputs the numbers and the names of the managers as follows:

WCCOAui2:["Manager name: "]["WCCILpmon"]["Manager number:"][1]

WCCOAui2:["Manager name: "]["WCCILdata"]["Manager number:"][0]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Manager number:"][0]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Manager number:"][1]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Manager number:"][2]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Manager number:"][3]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Manager number:"][4]

WCCOAui2:["Manager name: "]["WCCOAvalarch"]["Manager number:"][5]

WCCOAui2:["Manager name: "]["WCCILevent"]["Manager number:"][0]

WCCOAui2:["Manager name: "]["WCCILproxy"]["Manager number:"][1]

WCCOAui2:["Manager name: "]["WCCOActrl"]["Manager number:"][1]

WCCOAui2:["Manager name: "]["WCCILsim"]["Manager number:"][1]

WCCOAui2:["Manager name: "]["WCCOAui"]["Manager number:"][1]

WCCOAui2:["Manager name: "]["WCCOActrl"]["Manager number:"][1]

WCCOAui2:["Manager name: "]["WCCOActrl"]["Manager number:"][2]

WCCOAui2:["Manager name: "]["WCCOAui"]["Manager number:"][2]

Assignment

PMON functions.

Availability

UI