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

#ifdef __cplusplus
extern "C" {
#endif

#include "botlcm_image_metadata_t.h"
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_UYVY 1498831189
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_YUYV 1448695129
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_IYU1 827677001
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_IYU2 844454217
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_YUV420 842093913
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_YUV411P 1345401140
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_I420 808596553
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_NV12 842094158
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_GRAY 1497715271
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_RGB 859981650
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_BGR 861030210
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_RGBA 876758866
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_BGRA 877807426
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_BAYER_BGGR 825770306
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_BAYER_GBRG 844650584
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_BAYER_GRBG 861427800
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_BAYER_RGGB 878205016
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_MJPEG 1196444237
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_BE_GRAY16 357
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_BE_RGB16 358
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_BE_SIGNED_GRAY16 359
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_BE_SIGNED_RGB16 360
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_LE_GRAY16 909199180
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_FLOAT_GRAY32 842221382
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_INVALID -2
#define BOTLCM_IMAGE_T_PIXEL_FORMAT_ANY -1

typedef struct _botlcm_image_t botlcm_image_t;
struct _botlcm_image_t
{
    int64_t    utime;
    int32_t    width;
    int32_t    height;
    int32_t    row_stride;
    int32_t    pixelformat;
    int32_t    size;
    uint8_t    *data;
    int32_t    nmetadata;
    botlcm_image_metadata_t *metadata;
};
 
botlcm_image_t   *botlcm_image_t_copy(const botlcm_image_t *p);
void botlcm_image_t_destroy(botlcm_image_t *p);

typedef struct _botlcm_image_t_subscription_t botlcm_image_t_subscription_t;
typedef void (*botlcm_image_t_handler_t)(const lcm_recv_buf_t *rbuf, 
             const char *channel, const botlcm_image_t *msg, void *user);

int botlcm_image_t_publish(lcm_t *lcm, const char *channel, const botlcm_image_t *p);
botlcm_image_t_subscription_t* botlcm_image_t_subscribe (lcm_t *lcm, const char *channel, botlcm_image_t_handler_t f, void *userdata);
int botlcm_image_t_unsubscribe(lcm_t *lcm, botlcm_image_t_subscription_t* hid);

int  botlcm_image_t_encode(void *buf, int offset, int maxlen, const botlcm_image_t *p);
int  botlcm_image_t_decode(const void *buf, int offset, int maxlen, botlcm_image_t *p);
int  botlcm_image_t_decode_cleanup(botlcm_image_t *p);
int  botlcm_image_t_encoded_size(const botlcm_image_t *p);

// LCM support functions. Users should not call these
int64_t __botlcm_image_t_get_hash(void);
int64_t __botlcm_image_t_hash_recursive(const __lcm_hash_ptr *p);
int     __botlcm_image_t_encode_array(void *buf, int offset, int maxlen, const botlcm_image_t *p, int elements);
int     __botlcm_image_t_decode_array(const void *buf, int offset, int maxlen, botlcm_image_t *p, int elements);
int     __botlcm_image_t_decode_array_cleanup(botlcm_image_t *p, int elements);
int     __botlcm_image_t_encoded_array_size(const botlcm_image_t *p, int elements);
int     __botlcm_image_t_clone_array(const botlcm_image_t *p, botlcm_image_t *q, int elements);

#ifdef __cplusplus
}
#endif

#endif
