File: error_handling_example.c

package info (click to toggle)
liquid-dsp 1.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 9,216 kB
  • sloc: ansic: 115,859; sh: 3,513; makefile: 1,350; python: 274; asm: 11
file content (22 lines) | stat: -rw-r--r-- 470 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// demonstrate error handling in liquid
#include <stdlib.h>
#include <stdio.h>
#include "liquid.h"

int main(int argc, char*argv[])
{
    // create agc object
    agc_crcf q = agc_crcf_create();

    // try to set invalid parameter
    int rc = agc_crcf_set_bandwidth(q, -1e-3f);
    if (rc != LIQUID_OK)
        printf("received error %d: %s\n", rc, liquid_error_info(rc));

    // destroy object
    agc_crcf_destroy(q);

    //
    printf("done.\n");
    return 0;
}