Chapter 3
Ada Language Reference
3-14
ni.com
Procedure SuperBlocks
This section describes how to generate and link Procedure SuperBlocks.
Generating Reusable Procedures
Generate reusable procedures from your Procedure SuperBlocks as
described in Chapter 2,
Using AutoCode
, of the
AutoCode User Guide
.
You have an option to call the generated algorithmic procedures directly
(refer to Example 3-1), passing it pointers to record objects as arguments,
or you can call the hook routine with a
fixed
UCB calling style interface,
passing it arguments, which are arrays and values. The former option is
more efficient for performance reasons, but the latter provides for
backward compatibility in terms of argument list.
Refer to Chapter 5,
, for more information.
Linking Procedures with Real-Time Applications or Simulator
Linking Ada procedures (either handwritten or generated) back
with SystemBuild for simulation requires the use of pragmas or
implementation-dependent features for calling Ada subprograms
from languages other than Ada (refer to Example 3-1).
Example 3-1
Linking Generated Reusable Procedures
-------- Procedure: myproc --------
...
package myproc_pkg is
...
procedure myproc(U : myproc_u_t_P;
Y : myproc_y_t_P;
I : myproc_info_t_P);
end myproc_pkg;
...
package body myproc_pkg is
procedure myproc(U : myproc_u_t_P;
Y : myproc_y_t_P;
I : myproc_info_t_P) is
...
begin
-- Body of the procedure --
end myproc;
end myproc_pkg;