These macros allow you to explicitly control the read and
write and transfer of individual records.
Each of the macros takes an argument as follows:
- input is the index of the input (0 to n).
If you have defined a name for the input port you can use this in place of
the index in the form portname.portid_.
- output is the index of the output (0
to n). If you have defined a name for the output port you
can use this in place of the index in the form portname.portid_.
- index is the index of the transfer (0
to n).
The following macros are available:
- readRecord(input). Immediately reads
the next record from input, if there is one. If there is
no record, the next call to inputDone() will return true.
- writeRecord(output). Immediately writes
a record to output.
- inputDone(input). Returns true if the
last call to readRecord() for the specified input failed to read a new record,
because the input has no more records.
- holdRecord(input). Causes auto input
to be suspended for the current record, so that the operator does not automatically
read a new record at the start of the next loop. If auto is not set for the
input, holdRecord() has no effect.
- discardRecord(output). Causes auto output
to be suspended for the current record, so that the operator does not output
the record at the end of the current loop. If auto is not set for the output,
discardRecord() has no effect.
- discardTransfer(index).
Causes auto transfer to be suspended, so that the operator does not perform
the transfer at the end of the current loop. If auto is not set for the transfer,
discardTransfer() has no effect.