getReduDp()

The function getReduDp() checks if a right-side redundancy partner exists (if the specified data point has a redundant partner).

Synopsis

bool getReduDp(string dp, string &sReturnDpReplica1, string &sReturnDpReplica2);

Parameters

Parameter Description
dp The data point. The function checks if this data point has a redundant partner. The function only works with a standard WinCC OA configuration.
&sReturnDpRedlica1 If the data point has a redundant partner, the sReturnDpReplica1 is the left-side partner and the sReturnDpReplica2 is the right-side partner.
&sReturnDpRedlica2 The redundant partner. If the data point has a redundant partner, the sReturnDpReplica1 is the left-side partner and the sReturnDpReplica2 is the right-side partner.

Return value

Bool. The function returns TRUE when the data point is only valid on the right replica. If the data point element is, for example, "_DataManager_2", the function returns TRUE since the data point "_DataManager_2" is only valid on the right replica. If the data point has a redundant partner, the sReturnDpReplica1 is the left-side partner and the sReturnDpReplica2 is the right-side partner.

Error

The function returns FALSE if there is no redundant partner.

Description

The function getReduDp() checks if a right-side redundancy partner exists (if the specified data point has a redundant partner).

Example

The example checks if the data point _DataManager has a redundant partner. If the data point has a redundant partner the sReturnDpReplica1 is the left (side) computer and the sReturnDpReplica2 the right (side) computer.

main()
{
  string dp, sReturnDpReplica1, sReturnDpReplica2;
  dp = "_DataManager";
  bool retVal;
  retVal = getReduDp(dp,sReturnDpReplica1, sReturnDpReplica2);
  DebugN("The return value is:", retVal, "is there a redundant
  partner: 
  ",sReturnDpReplica1, sReturnDpReplica2);
}

If the used data point would be _DataManager_2, the function would return 1 (TRUE) since the data point is only valid on the right computer (replica).

Assignment

Data point function

Availability

CTRL