CAPL Script

GetNrOfCOConsumers

Syntax

dword GetNrOfCOConsumers(communicationObject co)

Function

Returns the current number of consumer endpoints at a (service-oriented) communication object. Note the number of endpoints may vary over time for some objects. The function is particularly useful to iterate over all consumers.

Parameters

co Communication object.

Return Values

The current number of consumer endpoints.

for (i = 0; i < GetNrOfCOConsumers(MirrorAdjustment); ++i){svc = MirrorAdjustment.providerSide[i,LeftMirror];// ...}

[GetNrOfCOProviders](/en/syntax/communication-objects/misc/getnrofcoproviders) | [GetNrOfCOSenders](/en/syntax/communication-objects/math/getnrofcosenders) | [GetNrOfCOReceivers](/en/syntax/communication-objects/misc/getnrofcoreceivers)