CAPL Script

GetNrOfCOSenders

Syntax

dword GetNrOfCOSenders(communicationObject co)

Function

Returns the current number of sender endpoints at a signal or PDU communication object. Note the number of endpoints may vary over time for some objects. The function is particularly useful to iterate over all senders.

Parameters

co Communication object

Return Values

The current number of sender endpoints.

for (i = 0; i < GetNrOfCOSenders(MirrorState); ++i){MirrorState.senderSide[i].ResetValueState();// ...}

[GetNrOfCOConsumers](/en/syntax/communication-objects/misc/getnrofcoconsumers) | [GetNrOfCOProviders](/en/syntax/communication-objects/misc/getnrofcoproviders) | [GetNrOfCOReceivers](/en/syntax/communication-objects/misc/getnrofcoreceivers)