예제 #1
0
파일: s52ais.c 프로젝트: pcannon67/S52
int main(int argc, char *argv[])
{
    g_print("main():starting: argc=%i, argv[0]=%s\n", argc, argv[0]);

    g_thread_init(NULL);
    g_type_init();

    _initSIG();

#ifdef S52_USE_ANDROID
    _initPID();
#endif

    if (FALSE == s52ais_initAIS())
        return FALSE;

    // FIXME: remove old spurious AIS
    // - S52_getObjList("--6MARIN.000", "vessel");
    // - loop
    //        - S52_getMarObjH(unsigned int S57ID)
    //        - S52_delMarObj(S52ObjectHandle objH);
    // -OR-
    // reconnect
    // -OR-
    // libS52 will delete them when they expire
    // S52_setMarinerParam(S52_MAR_DEL_VESSEL_DELAY, 700.0);

    //_main_loop = g_main_loop_new(NULL, FALSE);

    _gpsdClientRead(NULL);

#ifdef S52_USE_ANDROID
    // clean up PID
    unlink(AIS PID);
#endif

    g_print("s52ais:main():exiting: ..\n");

    return TRUE;
}
예제 #2
0
파일: s52ais.c 프로젝트: MasterLivens/S52
int main(int argc, char *argv[])
{
    g_print("main():starting: argc=%i, argv[0]=%s\n", argc, argv[0]);

    _initSIG();

#ifdef S52_USE_ANDROID
    _initPID();
#endif

    if (FALSE == s52ais_initAIS())
        return FALSE;

    _gpsdClientRead(NULL);

#ifdef S52_USE_ANDROID
    // clean up PID
    unlink(AIS PID);
#endif

    g_print("s52ais:main():exiting: ..\n");

    return TRUE;
}