Is it possible to use FIN, FOUT and FRET in functions written in the function block?

Categories:
Solution Number:
S20671
Last Modified:
2013-08-20
Issue

Is it possible to use FIN, FOUT and FRET in functions written in the function block?

Solution

Yes, you can and should include these in functions written by you.FIN (name_of_function (arg1, arg2)) stands for function in and it is a label of the function being called. FOUT is like return; and FRET (x) is like return x;The FIN/FOUT/FRET information provides debugging information to OPNET. FIN, FOUT, and FRETs serve the purpose of including your function in the function call stack in the case of an error (i.e. your functions will appear in the Function Call Stack in the err_log when you use op_vuerr or Help->Error Log->View). To see this you also need to have your comp_trace_info in Edit->Preferences set to TRUE or these macros will be ignored. These macros do not really add debugging information as your functions will still not show up in the OPNET Debugger (ODB). For more information about FIN/FOUT/FRET macros, please read the following pages in the online help: Simulation Kernel->Introduction->Function Stack Tracing. If you want actual debugging info on your custom functions you will need to use an actual C debugger in conjunction with your simulations. (For instructions on how to use a C debugger, please see the Technical Support FAQs in the Support area of www.opnet.com).

Environment

DES Kernel->Process Modeling/Coding

Attachments
NOTICE: Riverbed® product names have changed. Please refer to the Product List for a complete list of product names.
Can't find an answer? Create a case