The following syntax is used for C code generation support for interfaces and ports. In these examples, we have an interface x, an operation f, a port p, and a class A.
[Interface]_[Operation]([object realizing the interface]
[, argList])
Example: To call operation x_f (object realizing the interface, port number), where the port number is 5, do:
x_f(me->itsl, 5);
RiCGEN_[Interface]([object realizing the interface], [event([argList])])
Example: To send event RiCGEN_l(object realizing the interface, port number), do:
RiCGEN_l(me->itsl, evt());
[Interface]_[Operation](OUT_PORT([class], [port], [interface])
[, argList])
Example: To call operation x_f (object realizing the port, port number), where the port number is 5, do:
x_f(OUT_PORT(A, p, x), 5);
RiCGEN_PORT([pointer to port], [event])
Example: To send event RiCGEN_PORT(object realizing the port, event), do:
RiCGEN_PORT(me->p, evt());
RiCGEN_PORT_ISR([pointer to port], [event])
Example: To send event RiCGEN_PORT_ISR, do:
RiCGEN_PORT_ISR(me->p, evt());
RiCIS_PORT([object], [pointer to port])
Example: To query port RiCIS, do:
RiCIS_PORT(me, me->p);
RiCGEN_PORT_I([class], [port], [interface], [event([argList])])
Example: To send event RiCGEN_PORT_I(object realizing the port, event), do:
RiCGEN_PORT_I(A, p, x, evt());