Communicate with ports with multiplicity
The following table shows the calls to use if the multiplicity of the ports is 10 and you want to communicate with the ports using index 5.
Task | Call |
---|---|
Call an operation. | OUT_PORT_AT(src, 5)->f(); |
Send an event from a to b using the ports. |
OUT_PORT_AT(src, 5)->GEN(evt); |
Listen for an event from port src to port mon . |
evt[IS_PORT_AT(mon, 5)]/doYourStuff(); |
You could also use the OPORT_AT
macro, which is equivalent to
OUT_PORT_AT
.