libfap Documentation

1.3

Abstract

This documentation describes briefly libfap, an APRS parser made by porting most important parts of the Ham::APRS::FAP - Finnish APRS Parser (Fabulous APRS Parser) perl module into C.

API of the parser has been declared in the fap.h file, others are listed here for those who are interested in internal operation of the parser.

Usage example

#include <fap.h>

int main()
{
        char* input;
        unsigned int input_len;
        fap_packet_t* packet;

        fap_init();

        // Read TNC2-formatted input for example from APRS-IS.
        
        // Process the packet.
        packet = fap_parseaprs(input, input_len, 0);
        if ( packet->error_code )
        {
                printf("Failed to parse packet (%s): %s\n", input, fap_explain_error(*packet->error_code));
        }
        else if ( packet->src_callsign )
        {
                printf("Got packet from %s.\n", packet->src_callsign);
        }
        fap_free(packet);
        
        fap_cleanup();
        
        return EXIT_SUCCESS;
}

Generated on Sun Nov 20 09:26:23 2011 for libfap by  doxygen 1.5.6