/** 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 _legacy_gsd_stats_t_h
#define _legacy_gsd_stats_t_h

#ifdef __cplusplus
extern "C" {
#endif

typedef struct _legacy_gsd_stats_t legacy_gsd_stats_t;
struct _legacy_gsd_stats_t
{
    int64_t    utime;
    int32_t    ntimeouts;
    int32_t    ngood;
    int32_t    nbad;
    int32_t    dt;
    int32_t    dtmax;
    int32_t    latency;
    int32_t    latencymax;
};
 
legacy_gsd_stats_t   *legacy_gsd_stats_t_copy(const legacy_gsd_stats_t *p);
void legacy_gsd_stats_t_destroy(legacy_gsd_stats_t *p);

typedef struct _legacy_gsd_stats_t_subscription_t legacy_gsd_stats_t_subscription_t;
typedef void (*legacy_gsd_stats_t_handler_t)(const lcm_recv_buf_t *rbuf, 
             const char *channel, const legacy_gsd_stats_t *msg, void *user);

int legacy_gsd_stats_t_publish(lcm_t *lcm, const char *channel, const legacy_gsd_stats_t *p);
legacy_gsd_stats_t_subscription_t* legacy_gsd_stats_t_subscribe (lcm_t *lcm, const char *channel, legacy_gsd_stats_t_handler_t f, void *userdata);
int legacy_gsd_stats_t_unsubscribe(lcm_t *lcm, legacy_gsd_stats_t_subscription_t* hid);

int  legacy_gsd_stats_t_encode(void *buf, int offset, int maxlen, const legacy_gsd_stats_t *p);
int  legacy_gsd_stats_t_decode(const void *buf, int offset, int maxlen, legacy_gsd_stats_t *p);
int  legacy_gsd_stats_t_decode_cleanup(legacy_gsd_stats_t *p);
int  legacy_gsd_stats_t_encoded_size(const legacy_gsd_stats_t *p);

// LCM support functions. Users should not call these
int64_t __legacy_gsd_stats_t_get_hash(void);
int64_t __legacy_gsd_stats_t_hash_recursive(const __lcm_hash_ptr *p);
int     __legacy_gsd_stats_t_encode_array(void *buf, int offset, int maxlen, const legacy_gsd_stats_t *p, int elements);
int     __legacy_gsd_stats_t_decode_array(const void *buf, int offset, int maxlen, legacy_gsd_stats_t *p, int elements);
int     __legacy_gsd_stats_t_decode_array_cleanup(legacy_gsd_stats_t *p, int elements);
int     __legacy_gsd_stats_t_encoded_array_size(const legacy_gsd_stats_t *p, int elements);
int     __legacy_gsd_stats_t_clone_array(const legacy_gsd_stats_t *p, legacy_gsd_stats_t *q, int elements);

#ifdef __cplusplus
}
#endif

#endif
