GetNrOfCOConsumers
This reference collection includes Vector documentation reproduced with permission. Snippets may require configuration-specific symbols and are not all standalone programs. Sources and validation limits.
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.
Reference example from the CANoe 12 help. This is an incomplete context fragment: omitted surrounding code is shown as comments. Do not paste it as a complete program.
for (i = 0; i < GetNrOfCOConsumers(MirrorAdjustment); ++i)
{
svc = MirrorAdjustment.providerSide[i,LeftMirror];
// // ... surrounding context omitted
}