![]() |
SolarCapture C Bindings User Guide
SF-115721-CD
Issue 3
|
Node that causes the process to exit when a condition is met.
By default this node causes the process to exit when all sc_exit nodes in the process have received the end-of-stream signal on their inputs. Typically sc_exit nodes are placed at the end of a pipeline so that the process exits after all packet processing is complete.
Each sc_exit node has one or more "exit conditions", set by the end_of_stream and predicate arguments. Each sc_exit node also has a scope. When all of the sc_exit nodes in a scope detect their exit condition, the "exit action" is invoked. The scope argument may take the following values:
If the session was started with sc_session_run(), then the default action is to call sc_session_stop() so that the sc_session_run() call returns. Otherwise the default action is to exit the process by calling exit(). (NB. It is important to ensure that the application cannot also call exit(), because exit() is not thread safe).
Input packets are forwarded to the output unmodified.
Argument | Optional? | Default | Type | Description |
---|---|---|---|---|
action | Yes | (1) | SC_PARAM_STR | Action to take when exit condition met. One of: exit, stop. |
end_of_stream | Yes | 1 | SC_PARAM_INT | Exit condition is met when end-of-stream signal is received. |
scope | Yes | process | SC_PARAM_STR | See description. May be process, session or none. |
predicate | Yes | SC_PARAM_OBJ | Predicate is invoked on each input packet. Exit condition is met when it returns true. |
(1) See above for a description of the default action.