Chapter 2 C Language ReferenceAutoCode Reference 2-22 ni.comLinking Procedures with Real-Time Applications or SimulatorGenerate reusable procedures from your Procedure SuperBlocks asdescribed in this chapter and in Chapter 3, Ada Language Reference. Tolink generated reusable procedures with your own application or simulatoryou have the three following options:• Invoke the generated algorithmic procedure directly (refer to callout 2of Figure 2-4), passing it pointers to structure objects as arguments.• Invoke the re-entrant UCB wrapper routine generated to link withSystemBuild UCBs (refer to callout 3 of Figure 2-4), passing itarguments, which are pointers to arrays and values.• Invoke the generated non-reentrant subsystem function, which invokesthe procedure.The first option is more efficient for performance reasons, but might not bethe easiest to use. The second option provides ease of use in terms ofargument list and re-entrancy, but is the least efficient in some cases. Thethird option also provides ease of use in terms of argument list, but althoughthe procedure itself is re-entrant, the subsystem invoking the procedure isnot re-entrant.Invoking Generated Procedures DirectlyTo invoke a generated algorithmic procedure directly from your ownapplication, you must have thorough understanding of the arguments to theprocedure. When this is achieved, several steps need to be taken to invokethe procedure.The model in Example 2-1 contains a Procedure SuperBlock named procwith a time delay block and a BlockScript block. The arguments to thegenerated procedure corresponding to Procedure SuperBlock proc areshown in Figure 2-5.Example 2-1 Model with Procedure SuperBlockDepending on the nature of the application, complete the following steps toinvoke the procedure:1. Create an object of type _procedure name_u and copy in the inputsto the procedure. A pointer to this object will be passed as argument Uto the procedure.2. Create an object of type _procedure name_y where the outputs ofthe procedure will be stored. A pointer to this object will be passed asargument Y to the procedure.