/** THIS IS AN AUTOMATICALLY GENERATED FILE.  DO NOT MODIFY
 * BY HAND!!
 *
 * Generated by LCM
 **/

#include <stdint.h>
#include <stdlib.h>
#include <lcm/lcm_coretypes.h>
#include <lcm/lcm.h>

#ifndef _senlcm_gpsd_t_h
#define _senlcm_gpsd_t_h

#ifdef __cplusplus
extern "C" {
#endif

#define SENLCM_GPSD_T_MODE_NOT_SEEN 0
#define SENLCM_GPSD_T_MODE_NO_FIX 1
#define SENLCM_GPSD_T_MODE_2D 2
#define SENLCM_GPSD_T_MODE_3D 3
#define SENLCM_GPSD_T_STATUS_NO_FIX 0
#define SENLCM_GPSD_T_STATUS_FIX 1
#define SENLCM_GPSD_T_STATUS_DGPS_FIX 2

typedef struct _senlcm_gpsd_t senlcm_gpsd_t;
struct _senlcm_gpsd_t
{
    int64_t    utime;
    int64_t    online;
    int64_t    fix_utime;
    int8_t     mode;
    double     ept;
    double     latitude;
    double     longitude;
    double     altitude;
    double     eph;
    double     epv;
    double     track;
    double     epd;
    double     speed;
    double     eps;
    double     climb;
    double     epc;
    double     geoidal_separation;
    int16_t    status;
    int16_t    satellites_used;
    int16_t    *used;
    double     pdop;
    double     hdop;
    double     tdop;
    double     gdop;
    double     epe;
    int16_t    satellites_visible;
    int16_t    *PRN;
    int16_t    *elevation;
    int16_t    *azimuth;
    int16_t    *ss;
    char*      gps_device;
    char*      gps_id;
    int16_t    ndevices;
    char*      *devicelist;
};
 
senlcm_gpsd_t   *senlcm_gpsd_t_copy(const senlcm_gpsd_t *p);
void senlcm_gpsd_t_destroy(senlcm_gpsd_t *p);

typedef struct _senlcm_gpsd_t_subscription_t senlcm_gpsd_t_subscription_t;
typedef void (*senlcm_gpsd_t_handler_t)(const lcm_recv_buf_t *rbuf, 
             const char *channel, const senlcm_gpsd_t *msg, void *user);

int senlcm_gpsd_t_publish(lcm_t *lcm, const char *channel, const senlcm_gpsd_t *p);
senlcm_gpsd_t_subscription_t* senlcm_gpsd_t_subscribe (lcm_t *lcm, const char *channel, senlcm_gpsd_t_handler_t f, void *userdata);
int senlcm_gpsd_t_unsubscribe(lcm_t *lcm, senlcm_gpsd_t_subscription_t* hid);

int  senlcm_gpsd_t_encode(void *buf, int offset, int maxlen, const senlcm_gpsd_t *p);
int  senlcm_gpsd_t_decode(const void *buf, int offset, int maxlen, senlcm_gpsd_t *p);
int  senlcm_gpsd_t_decode_cleanup(senlcm_gpsd_t *p);
int  senlcm_gpsd_t_encoded_size(const senlcm_gpsd_t *p);

// LCM support functions. Users should not call these
int64_t __senlcm_gpsd_t_get_hash(void);
int64_t __senlcm_gpsd_t_hash_recursive(const __lcm_hash_ptr *p);
int     __senlcm_gpsd_t_encode_array(void *buf, int offset, int maxlen, const senlcm_gpsd_t *p, int elements);
int     __senlcm_gpsd_t_decode_array(const void *buf, int offset, int maxlen, senlcm_gpsd_t *p, int elements);
int     __senlcm_gpsd_t_decode_array_cleanup(senlcm_gpsd_t *p, int elements);
int     __senlcm_gpsd_t_encoded_array_size(const senlcm_gpsd_t *p, int elements);
int     __senlcm_gpsd_t_clone_array(const senlcm_gpsd_t *p, senlcm_gpsd_t *q, int elements);

#ifdef __cplusplus
}
#endif

#endif
