ioctl(ixj1, IXJCTL_SET_FILTER, pFilter)
Return Value
Returns 0 if successful.
Parameters
A pointer to an IXJ_FILTER structure.
typedef struct { unsigned int filter; IXJ_FILTER_FREQ freq; char enable; } IXJ_FILTER;
Remarks
Selects and programs a tone detection filter. The DSP supports 4 filters numbered 0 - 3. The freq element of the struct defines which frequency or frequency range the filter should trigger on. The enable flag should be set to 1 to enable the filter or 0 to disable the filter. The following frequencies are defined:
typedef enum { f300_640 = 4, f300_500, f1100, f350, f400, f480, f440, f620, f20_50, f133_200, f300, f300_420, f330, f300_425, f330_440, f340, f350_400, f350_440, f350_450, f360, f380_420, f392, f400_425, f400_440, f400_450, f420, f425, f425_450, f425_475, f435, f440_450, f440_480, f445, f450, f452, f475, f480_620, f494, f500, f520, f523, f525, f540_660, f587, f590, f600, f660, f700, f740, f750, f750_1450, f770, f800, f816, f850, f857_1645, f900, f900_1300, f935_1215, f941_1477, f942, f950, f950_1400, f975, f1000, f1020, f1050, f1100_1750, f1140, f1200, f1209, f1330, f1336, f1366, f1380, f1400, f1477, f1600, f1633_1638, f1800, f1860 } IXJ_FILTER_FREQ;
The definitions with an underscore are wide band filters, while the ones with a single number are narrow band filters, i.e. F350_440 will trigger on any frequency between 350Hz and 440Hz while f440 will only trigger on 440Hz. The triggers will be reported via the f0, f1, f2, and f3 bits in the exception structure (depending on which filter you selected in the filter element of the structure), and will also generate a SIGIO if the application has registered for asynchronous notifications.
See Also:
IXJCTL_GET_FILTER_HIST, IXJCTL_FILTER_CADENCE, PHONE_EXCEPTION
Example:
IXJ_FILTER sFilter; sFilter.filter = 0 ; sFilter.freq = f1200; sFilter.enable = 1; ioctl(ixj1, IXJCTL_SET_FILTER, &sFilter);
©1996-2001 Quicknet Technologies, Inc.