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

#ifdef __cplusplus
extern "C" {
#endif

#define SENLCM_MS_GX1_T_INST_MAGFIELD 1
#define SENLCM_MS_GX1_T_INST_ACCEL 2
#define SENLCM_MS_GX1_T_INST_ANGRATE 4
#define SENLCM_MS_GX1_T_INST_EULER 8
#define SENLCM_MS_GX1_T_INST_M 16
#define SENLCM_MS_GX1_T_INST_Q 32
#define SENLCM_MS_GX1_T_STAB_MAGFIELD 64
#define SENLCM_MS_GX1_T_STAB_ACCEL 128
#define SENLCM_MS_GX1_T_STAB_ANGRATE 256
#define SENLCM_MS_GX1_T_STAB_EULER 512
#define SENLCM_MS_GX1_T_STAB_M 1024
#define SENLCM_MS_GX1_T_STAB_Q 2048
#define SENLCM_MS_GX1_T_TEMPERATURE 4096

typedef struct _senlcm_ms_gx1_t senlcm_ms_gx1_t;
struct _senlcm_ms_gx1_t
{
    int64_t    utime;
    int64_t    bitmask;
    double     sMagField[3];
    double     sAccel[3];
    double     sAngRate[3];
    double     sEuler[3];
    double     sM[3][3];
    double     sQ[4];
    double     iMagField[3];
    double     iAccel[3];
    double     iAngRate[3];
    double     iEuler[3];
    double     iM[3][3];
    double     iQ[4];
    double     Temperature;
    int16_t    TimerTicks;
};
 
senlcm_ms_gx1_t   *senlcm_ms_gx1_t_copy(const senlcm_ms_gx1_t *p);
void senlcm_ms_gx1_t_destroy(senlcm_ms_gx1_t *p);

typedef struct _senlcm_ms_gx1_t_subscription_t senlcm_ms_gx1_t_subscription_t;
typedef void (*senlcm_ms_gx1_t_handler_t)(const lcm_recv_buf_t *rbuf, 
             const char *channel, const senlcm_ms_gx1_t *msg, void *user);

int senlcm_ms_gx1_t_publish(lcm_t *lcm, const char *channel, const senlcm_ms_gx1_t *p);
senlcm_ms_gx1_t_subscription_t* senlcm_ms_gx1_t_subscribe (lcm_t *lcm, const char *channel, senlcm_ms_gx1_t_handler_t f, void *userdata);
int senlcm_ms_gx1_t_unsubscribe(lcm_t *lcm, senlcm_ms_gx1_t_subscription_t* hid);

int  senlcm_ms_gx1_t_encode(void *buf, int offset, int maxlen, const senlcm_ms_gx1_t *p);
int  senlcm_ms_gx1_t_decode(const void *buf, int offset, int maxlen, senlcm_ms_gx1_t *p);
int  senlcm_ms_gx1_t_decode_cleanup(senlcm_ms_gx1_t *p);
int  senlcm_ms_gx1_t_encoded_size(const senlcm_ms_gx1_t *p);

// LCM support functions. Users should not call these
int64_t __senlcm_ms_gx1_t_get_hash(void);
int64_t __senlcm_ms_gx1_t_hash_recursive(const __lcm_hash_ptr *p);
int     __senlcm_ms_gx1_t_encode_array(void *buf, int offset, int maxlen, const senlcm_ms_gx1_t *p, int elements);
int     __senlcm_ms_gx1_t_decode_array(const void *buf, int offset, int maxlen, senlcm_ms_gx1_t *p, int elements);
int     __senlcm_ms_gx1_t_decode_array_cleanup(senlcm_ms_gx1_t *p, int elements);
int     __senlcm_ms_gx1_t_encoded_array_size(const senlcm_ms_gx1_t *p, int elements);
int     __senlcm_ms_gx1_t_clone_array(const senlcm_ms_gx1_t *p, senlcm_ms_gx1_t *q, int elements);

#ifdef __cplusplus
}
#endif

#endif
