Port annotation
When a function is annotated with Amino::Node
, its parameter list will automatically be interpreted by cpp2json
as the node's ports.
Input parameters and input/output parameters must come before the output parameters in the parameter list. Input parameters are passed by value or as const references. Output parameters and input/output parameters are passed as non-const references.
With the exception of input/output parameters, parameters declared this way are interpreted as their respective port types by cpp2json
and do not require special annotation.
There are three situations when you should annotate a parameter or a port:
- Input/output parameters must be annotated with
Amino::InOut
. See Annotating input/output parameters for details. - Output ports that pass along the function's return value should be annotated with the
Amino::Node
annotation'soutName
token. See Annotating return values for details. - Associative input parameters must be annotated with
Amino::IsAssociative
. See Associative node annotation for details.