linux libgps dev,libgps.h

/* libgps.h -- prototypes for internals of the libgps library */

/*

* This file is Copyright (c) 2010 by the GPSD project

* SPDX-License-Identifier: BSD-2-clause

*/

#ifndef _GPSD_LIBGPS_H_

#define _GPSD_LIBGPS_H_

/* values to poke in the gps_fd member if we get it via something special */

#define SHM_PSEUDO_FD-1

#define DBUS_PSEUDO_FD-2

#include "gps.h"

#include "gpsd_config.h"

#include "compiler.h"

#ifdef __cplusplus

extern "C" {

#endif

extern int gps_sock_open(const char *, const char *,

struct gps_data_t *);

extern int gps_sock_close(struct gps_data_t *);

extern int gps_sock_send(struct gps_data_t *, const char *);

extern int gps_sock_read(struct gps_data_t *, char *message, int message_len);

extern bool gps_sock_waiting(const struct gps_data_t *, int);

extern int gps_sock_stream(struct gps_data_t *, unsigned int, void *);

extern const char *gps_sock_data(const struct gps_data_t *);

extern int gps_sock_mainloop(struct gps_data_t *, int,

void (*)(struct gps_data_t *));

extern int gps_shm_open(struct gps_data_t *);

extern void gps_shm_close(struct gps_data_t *);

extern bool gps_shm_waiting(const struct gps_data_t *, int);

extern int gps_shm_read(struct gps_data_t *);

extern int gps_shm_mainloop(struct gps_data_t *, int,

void (*)(struct gps_data_t *));

extern int gps_dbus_open(struct gps_data_t *);

extern int gps_dbus_mainloop(struct gps_data_t *, int,

void (*)(struct gps_data_t *));

extern int json_ais_read(const char *, char *, size_t, struct ais_t *,

const char **);

/* debugging apparatus for the client library */

#ifdef CLIENTDEBUG_ENABLE

#define LIBGPS_DEBUG

#endif /* CLIENTDEBUG_ENABLE */

#ifdef LIBGPS_DEBUG

#define DEBUG_CALLS1/* shallowest debug level */

#define DEBUG_JSON5/* minimum level for verbose JSON debugging */

# define libgps_debug_trace(args) (void) libgps_trace args

extern int libgps_debuglevel;

extern void libgps_dump_state(struct gps_data_t *);

#else

# define libgps_debug_trace(args) do { } while (0)

#endif /* LIBGPS_DEBUG */

#ifdef __cplusplus

}

#endif

#define PRIVATE(gpsdata) ((struct privdata_t *)(gpsdata)->privdata)

#endif /* _GPSD_LIBGPS_H_ */

一键复制

编辑

Web IDE

原始数据

按行查看

历史

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值