National Instruments 320571-01 Car Stereo System User Manual


 
Getting Started with the NI-DSP Interface Utilities Chapter 2
Part 4: NI-DSP Interface Utilities 2-6 NI-DSP SRM for LabVIEW for Windows
Notice that functions accepted by the Dispatch application should have acceptable C syntax, that is, names may
contain letters, numbers, and the underscore character but must start with a letter or underscore. A function name
can contain up to 31 characters. You must divide your functions into groups with a maximum of 64 (40 hex)
functions per group. The Dispatch application returns an error message if function names are not acceptable or if
you have more than 64 functions per group. You may have up to 24 groups of 64 functions each. The Dispatch
application assigns a unique ID number to each function depending on how the functions are grouped. Groups start
at zero and are consecutive (Group 0, 1, 2, ...). The ID number of the first function of a group is the group number
multiplied by 64. The function IDs are then consecutive within that group. The function ID, therefore, has group
information as well as index information for functions within each group. This information is necessary for the
dispatcher to execute a particular function efficiently based on the function ID. The first group of functions are the
Essential Functions group. The Essential Functions are always linked into the DSP Library. These functions are
specified in NIESSEN.fnc. Do not modify this file. In the library function list file, NIDSP.fnc, group
beginnings are marked by two asterisks (** ) followed by a group name. Figure 2-3 shows a typical section of
NIDSP.fnc.
*
*
group name
function name
function name
:
:
:
**
group name
function name
function name
:
:
:
Figure 2-3. Typical Section of NIDSP.fnc
Customizing the DSP Library by Deleting Functions
Another way to customize the DSP Library is to delete functions from NIDSP.fnc. This decreases the size of the
DSP Library because the object code for those deleted functions are not included. To customize the DSP Library by
deleting functions, follow the instructions in this chapter, but delete functions rather than add functions. Follow
these guidelines when deleting functions from the DSP Library:
When modifying the NIDSP.fnc, replace the name of each function you want to delete with the function name
DSP_NOP. This replacement ensures that the remaining functions in the library are addressable by the
dispatcher using the same function ID. The Interface Library DSP.DLL is built using the organization of the
original library function list file, and thus function IDs are hard coded into the Interface Library. If you
reorganize the original functions and groups without replacing the function name with DSP_NOP, the interface
to the function calls a different DSP Library function, which causes the DSP Library to fail. For example, if
you had a function group with 10 functions and you wanted to delete the first and third functions of that group,
if you replace their names with DSP_NOP, you can ensure that all of the other functions in the group maintain
the same function ID. This ensures that the interface code for those functions remain valid. If you do not
follow these guidelines, functions become disorganized, you could call the wrong function, and an unexpected
error could happen.
Never delete any of the function group names that form the original DSP Library that you received with the
NI-DSP software package. The function group names ensure that the remaining functions in the DSP Library
have the same function IDs. If you want to delete all functions of a group, replace each function name of that
group in the NIDSP.fnc with DSP_NOP.