/* Automatically generated nanopb header */
/* Generated by nanopb-0.4.9.1 */

#ifndef PB_SNS_TOUCHSLIDER_PB_H_INCLUDED
#define PB_SNS_TOUCHSLIDER_PB_H_INCLUDED
#include <pb.h>
#include "sns_std_sensor.pb.h"

#if PB_PROTO_HEADER_VERSION != 40
#error Regenerate this file with the current version of nanopb generator.
#endif

/* Enum definitions */
/* @brief Message IDs for touchslider Sensor */
typedef enum _sns_touchslider_msgid {
    /* @brief Uses message: sns_touchslider_events
 Purpose: used to publish touch/slider events */
    SNS_TOUCHSLIDER_MSGID_SNS_TOUCHSLIDER_SENSOR_EVENT = 780,
    /* @brief Uses message: sns_touch_pad_events_recurrent
 Purpose: used to publish touch/slider events recurrently */
    SNS_TOUCHSLIDER_MSGID_SNS_TOUCHSLIDER_SENSOR_EVENT_RECURRENT = 1031
} sns_touchslider_msgid;

/* @brief Slider's slide direction type */
typedef enum _sns_touchslider_slider_direction_type {
    SNS_TOUCHSLIDER_SLIDER_DIRECTION_INVALID = 0,
    SNS_TOUCHSLIDER_SLIDER_DIRECTION_FORWARD = 1,
    SNS_TOUCHSLIDER_SLIDER_DIRECTION_BACKWARD = 2
} sns_touchslider_slider_direction_type;

/* @brief Touch's hold start and end marker */
typedef enum _sns_touchslider_touch_hold_type {
    SNS_TOUCHSLIDER_TOUCH_HOLD_INVALID = 0,
    SNS_TOUCHSLIDER_TOUCH_HOLD_START = 1,
    SNS_TOUCHSLIDER_TOUCH_HOLD_END = 2
} sns_touchslider_touch_hold_type;

/* Struct definitions */
/* @brief message for gesture type tap */
typedef struct _sns_touchslider_touch_event_tap {
    /* @brief Number of taps */
    bool has_tap_count;
    uint32_t tap_count;
} sns_touchslider_touch_event_tap;

/* @brief message for gesture type hold */
typedef struct _sns_touchslider_touch_event_hold {
    bool has_hold_type;
    sns_touchslider_touch_hold_type hold_type;
} sns_touchslider_touch_event_hold;

/* @brief message for touch event */
typedef struct _sns_touchslider_touch_event {
    /* @brief List of button events */
    pb_callback_t event;
} sns_touchslider_touch_event;

typedef struct _sns_touchslider_touch_event_sns_touch_event {
    /* @brief Unique identifier of the button */
    bool has_touch_id;
    uint32_t touch_id;
    pb_size_t which_event;
    union {
        sns_touchslider_touch_event_tap event_tap;
        sns_touchslider_touch_event_hold event_hold;
    } event;
} sns_touchslider_touch_event_sns_touch_event;

/* @brief message for slider event */
typedef struct _sns_touchslider_slider_event {
    /* @brief List of slider events */
    pb_callback_t event;
} sns_touchslider_slider_event;

typedef struct _sns_touchslider_slider_event_sns_slider_event {
    /* @brief Unique identifier */
    bool has_slider_id;
    uint32_t slider_id;
    /* @brief Current position */
    bool has_slider_position;
    uint32_t slider_position;
    /* @brief touch state */
    bool has_touch_pressed;
    bool touch_pressed;
    /* @brief Direction */
    bool has_direction;
    sns_touchslider_slider_direction_type direction;
} sns_touchslider_slider_event_sns_slider_event;

/* @brief Event msg for either button or slider */
typedef struct _sns_touchslider_event {
    pb_size_t which_msg;
    union {
        sns_touchslider_touch_event touch_event;
        sns_touchslider_slider_event slider_event;
    } msg;
} sns_touchslider_event;

/* @brief Event for Touchslider sensor */
typedef struct _sns_touchslider_sensor_event {
    bool has_event;
    sns_touchslider_event event;
} sns_touchslider_sensor_event;

/* @brief Recurrent event for Touchslider sensor */
typedef struct _sns_touchslider_sensor_event_recurrent {
    bool has_event;
    sns_touchslider_event event;
} sns_touchslider_sensor_event_recurrent;


#ifdef __cplusplus
extern "C" {
#endif

/* Helper constants for enums */
#define _sns_touchslider_msgid_MIN SNS_TOUCHSLIDER_MSGID_SNS_TOUCHSLIDER_SENSOR_EVENT
#define _sns_touchslider_msgid_MAX SNS_TOUCHSLIDER_MSGID_SNS_TOUCHSLIDER_SENSOR_EVENT_RECURRENT
#define _sns_touchslider_msgid_ARRAYSIZE ((sns_touchslider_msgid)(SNS_TOUCHSLIDER_MSGID_SNS_TOUCHSLIDER_SENSOR_EVENT_RECURRENT+1))
#define sns_touchslider_msgid_SNS_TOUCHSLIDER_MSGID_SNS_TOUCHSLIDER_SENSOR_EVENT SNS_TOUCHSLIDER_MSGID_SNS_TOUCHSLIDER_SENSOR_EVENT
#define sns_touchslider_msgid_SNS_TOUCHSLIDER_MSGID_SNS_TOUCHSLIDER_SENSOR_EVENT_RECURRENT SNS_TOUCHSLIDER_MSGID_SNS_TOUCHSLIDER_SENSOR_EVENT_RECURRENT

#define _sns_touchslider_slider_direction_type_MIN SNS_TOUCHSLIDER_SLIDER_DIRECTION_INVALID
#define _sns_touchslider_slider_direction_type_MAX SNS_TOUCHSLIDER_SLIDER_DIRECTION_BACKWARD
#define _sns_touchslider_slider_direction_type_ARRAYSIZE ((sns_touchslider_slider_direction_type)(SNS_TOUCHSLIDER_SLIDER_DIRECTION_BACKWARD+1))
#define sns_touchslider_slider_direction_type_SNS_TOUCHSLIDER_SLIDER_DIRECTION_INVALID SNS_TOUCHSLIDER_SLIDER_DIRECTION_INVALID
#define sns_touchslider_slider_direction_type_SNS_TOUCHSLIDER_SLIDER_DIRECTION_FORWARD SNS_TOUCHSLIDER_SLIDER_DIRECTION_FORWARD
#define sns_touchslider_slider_direction_type_SNS_TOUCHSLIDER_SLIDER_DIRECTION_BACKWARD SNS_TOUCHSLIDER_SLIDER_DIRECTION_BACKWARD

#define _sns_touchslider_touch_hold_type_MIN SNS_TOUCHSLIDER_TOUCH_HOLD_INVALID
#define _sns_touchslider_touch_hold_type_MAX SNS_TOUCHSLIDER_TOUCH_HOLD_END
#define _sns_touchslider_touch_hold_type_ARRAYSIZE ((sns_touchslider_touch_hold_type)(SNS_TOUCHSLIDER_TOUCH_HOLD_END+1))
#define sns_touchslider_touch_hold_type_SNS_TOUCHSLIDER_TOUCH_HOLD_INVALID SNS_TOUCHSLIDER_TOUCH_HOLD_INVALID
#define sns_touchslider_touch_hold_type_SNS_TOUCHSLIDER_TOUCH_HOLD_START SNS_TOUCHSLIDER_TOUCH_HOLD_START
#define sns_touchslider_touch_hold_type_SNS_TOUCHSLIDER_TOUCH_HOLD_END SNS_TOUCHSLIDER_TOUCH_HOLD_END


#define sns_touchslider_touch_event_hold_hold_type_ENUMTYPE sns_touchslider_touch_hold_type




#define sns_touchslider_slider_event_sns_slider_event_direction_ENUMTYPE sns_touchslider_slider_direction_type





/* Initializer values for message structs */
#define sns_touchslider_touch_event_tap_init_default {false, 0}
#define sns_touchslider_touch_event_hold_init_default {false, _sns_touchslider_touch_hold_type_MIN}
#define sns_touchslider_touch_event_init_default {{{NULL}, NULL}}
#define sns_touchslider_touch_event_sns_touch_event_init_default {false, 0, 0, {sns_touchslider_touch_event_tap_init_default}}
#define sns_touchslider_slider_event_init_default {{{NULL}, NULL}}
#define sns_touchslider_slider_event_sns_slider_event_init_default {false, 0, false, 0, false, 0, false, _sns_touchslider_slider_direction_type_MIN}
#define sns_touchslider_event_init_default       {0, {sns_touchslider_touch_event_init_default}}
#define sns_touchslider_sensor_event_init_default {false, sns_touchslider_event_init_default}
#define sns_touchslider_sensor_event_recurrent_init_default {false, sns_touchslider_event_init_default}
#define sns_touchslider_touch_event_tap_init_zero {false, 0}
#define sns_touchslider_touch_event_hold_init_zero {false, _sns_touchslider_touch_hold_type_MIN}
#define sns_touchslider_touch_event_init_zero    {{{NULL}, NULL}}
#define sns_touchslider_touch_event_sns_touch_event_init_zero {false, 0, 0, {sns_touchslider_touch_event_tap_init_zero}}
#define sns_touchslider_slider_event_init_zero   {{{NULL}, NULL}}
#define sns_touchslider_slider_event_sns_slider_event_init_zero {false, 0, false, 0, false, 0, false, _sns_touchslider_slider_direction_type_MIN}
#define sns_touchslider_event_init_zero          {0, {sns_touchslider_touch_event_init_zero}}
#define sns_touchslider_sensor_event_init_zero   {false, sns_touchslider_event_init_zero}
#define sns_touchslider_sensor_event_recurrent_init_zero {false, sns_touchslider_event_init_zero}

/* Field tags (for use in manual encoding/decoding) */
#define sns_touchslider_touch_event_tap_tap_count_tag 1
#define sns_touchslider_touch_event_hold_hold_type_tag 1
#define sns_touchslider_touch_event_event_tag    1
#define sns_touchslider_touch_event_sns_touch_event_touch_id_tag 1
#define sns_touchslider_touch_event_sns_touch_event_event_tap_tag 100
#define sns_touchslider_touch_event_sns_touch_event_event_hold_tag 101
#define sns_touchslider_slider_event_event_tag   1
#define sns_touchslider_slider_event_sns_slider_event_slider_id_tag 1
#define sns_touchslider_slider_event_sns_slider_event_slider_position_tag 2
#define sns_touchslider_slider_event_sns_slider_event_touch_pressed_tag 3
#define sns_touchslider_slider_event_sns_slider_event_direction_tag 4
#define sns_touchslider_event_touch_event_tag    100
#define sns_touchslider_event_slider_event_tag   101
#define sns_touchslider_sensor_event_event_tag   1
#define sns_touchslider_sensor_event_recurrent_event_tag 1

/* Struct field encoding specification for nanopb */
#define sns_touchslider_touch_event_tap_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, UINT32,   tap_count,         1)
#define sns_touchslider_touch_event_tap_CALLBACK NULL
#define sns_touchslider_touch_event_tap_DEFAULT NULL

#define sns_touchslider_touch_event_hold_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, UENUM,    hold_type,         1)
#define sns_touchslider_touch_event_hold_CALLBACK NULL
#define sns_touchslider_touch_event_hold_DEFAULT NULL

#define sns_touchslider_touch_event_FIELDLIST(X, a) \
X(a, CALLBACK, REPEATED, MESSAGE,  event,             1)
#define sns_touchslider_touch_event_CALLBACK pb_default_field_callback
#define sns_touchslider_touch_event_DEFAULT NULL
#define sns_touchslider_touch_event_event_MSGTYPE sns_touchslider_touch_event_sns_touch_event

#define sns_touchslider_touch_event_sns_touch_event_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, UINT32,   touch_id,          1) \
X(a, STATIC,   ONEOF,    MESSAGE,  (event,event_tap,event.event_tap), 100) \
X(a, STATIC,   ONEOF,    MESSAGE,  (event,event_hold,event.event_hold), 101)
#define sns_touchslider_touch_event_sns_touch_event_CALLBACK NULL
#define sns_touchslider_touch_event_sns_touch_event_DEFAULT NULL
#define sns_touchslider_touch_event_sns_touch_event_event_event_tap_MSGTYPE sns_touchslider_touch_event_tap
#define sns_touchslider_touch_event_sns_touch_event_event_event_hold_MSGTYPE sns_touchslider_touch_event_hold

#define sns_touchslider_slider_event_FIELDLIST(X, a) \
X(a, CALLBACK, REPEATED, MESSAGE,  event,             1)
#define sns_touchslider_slider_event_CALLBACK pb_default_field_callback
#define sns_touchslider_slider_event_DEFAULT NULL
#define sns_touchslider_slider_event_event_MSGTYPE sns_touchslider_slider_event_sns_slider_event

#define sns_touchslider_slider_event_sns_slider_event_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, UINT32,   slider_id,         1) \
X(a, STATIC,   OPTIONAL, UINT32,   slider_position,   2) \
X(a, STATIC,   OPTIONAL, BOOL,     touch_pressed,     3) \
X(a, STATIC,   OPTIONAL, UENUM,    direction,         4)
#define sns_touchslider_slider_event_sns_slider_event_CALLBACK NULL
#define sns_touchslider_slider_event_sns_slider_event_DEFAULT NULL

#define sns_touchslider_event_FIELDLIST(X, a) \
X(a, STATIC,   ONEOF,    MESSAGE,  (msg,touch_event,msg.touch_event), 100) \
X(a, STATIC,   ONEOF,    MESSAGE,  (msg,slider_event,msg.slider_event), 101)
#define sns_touchslider_event_CALLBACK NULL
#define sns_touchslider_event_DEFAULT NULL
#define sns_touchslider_event_msg_touch_event_MSGTYPE sns_touchslider_touch_event
#define sns_touchslider_event_msg_slider_event_MSGTYPE sns_touchslider_slider_event

#define sns_touchslider_sensor_event_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, MESSAGE,  event,             1)
#define sns_touchslider_sensor_event_CALLBACK NULL
#define sns_touchslider_sensor_event_DEFAULT NULL
#define sns_touchslider_sensor_event_event_MSGTYPE sns_touchslider_event

#define sns_touchslider_sensor_event_recurrent_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, MESSAGE,  event,             1)
#define sns_touchslider_sensor_event_recurrent_CALLBACK NULL
#define sns_touchslider_sensor_event_recurrent_DEFAULT NULL
#define sns_touchslider_sensor_event_recurrent_event_MSGTYPE sns_touchslider_event

extern const pb_msgdesc_t sns_touchslider_touch_event_tap_msg;
extern const pb_msgdesc_t sns_touchslider_touch_event_hold_msg;
extern const pb_msgdesc_t sns_touchslider_touch_event_msg;
extern const pb_msgdesc_t sns_touchslider_touch_event_sns_touch_event_msg;
extern const pb_msgdesc_t sns_touchslider_slider_event_msg;
extern const pb_msgdesc_t sns_touchslider_slider_event_sns_slider_event_msg;
extern const pb_msgdesc_t sns_touchslider_event_msg;
extern const pb_msgdesc_t sns_touchslider_sensor_event_msg;
extern const pb_msgdesc_t sns_touchslider_sensor_event_recurrent_msg;

/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define sns_touchslider_touch_event_tap_fields &sns_touchslider_touch_event_tap_msg
#define sns_touchslider_touch_event_hold_fields &sns_touchslider_touch_event_hold_msg
#define sns_touchslider_touch_event_fields &sns_touchslider_touch_event_msg
#define sns_touchslider_touch_event_sns_touch_event_fields &sns_touchslider_touch_event_sns_touch_event_msg
#define sns_touchslider_slider_event_fields &sns_touchslider_slider_event_msg
#define sns_touchslider_slider_event_sns_slider_event_fields &sns_touchslider_slider_event_sns_slider_event_msg
#define sns_touchslider_event_fields &sns_touchslider_event_msg
#define sns_touchslider_sensor_event_fields &sns_touchslider_sensor_event_msg
#define sns_touchslider_sensor_event_recurrent_fields &sns_touchslider_sensor_event_recurrent_msg

/* Maximum encoded size of messages (where known) */
/* sns_touchslider_touch_event_size depends on runtime parameters */
/* sns_touchslider_slider_event_size depends on runtime parameters */
/* sns_touchslider_event_size depends on runtime parameters */
/* sns_touchslider_sensor_event_size depends on runtime parameters */
/* sns_touchslider_sensor_event_recurrent_size depends on runtime parameters */
#define SNS_TOUCHSLIDER_PB_H_MAX_SIZE            sns_touchslider_slider_event_sns_slider_event_size
#define sns_touchslider_slider_event_sns_slider_event_size 16
#define sns_touchslider_touch_event_hold_size    2
#define sns_touchslider_touch_event_sns_touch_event_size 15
#define sns_touchslider_touch_event_tap_size     6

#ifdef __cplusplus
} /* extern "C" */
#endif

#endif
