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

#ifndef PB_SNS_CCD_GESTURE_PB_H_INCLUDED
#define PB_SNS_CCD_GESTURE_PB_H_INCLUDED
#include <pb.h>
#include "sns_std_sensor.pb.h"
#include "sns_std_type.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 CCD gesture sensors */
typedef enum _sns_ccd_gesture_msgid {
    /* @brief Gesture event contains state0 & state1 for TE-based sensors,
 and cd_state for CD-based sensors. */
    SNS_CCD_GESTURE_MSGID_SNS_CCD_GESTURE_EVENT = 775,
    /* @brief Request to load a model */
    SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_CONFIG_REQ = 722,
    /* @brief Request to get a list of supported models */
    SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_LIST_REQ = 723,
    /* @brief Event indicating current loaded model and status */
    SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_CONFIG_EVENT = 790,
    /* @brief Event containing list of supported models */
    SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_LIST_EVENT = 791
} sns_ccd_gesture_msgid;

/* @brief State for CD-based sensors. */
typedef enum _sns_ccd_cd_state {
    SNS_CCD_CD_STATE_UNKNOWN = 0,
    SNS_CCD_CD_STATE_LOW = 1,
    SNS_CCD_CD_STATE_HIGH = 2
} sns_ccd_cd_state;

/* Struct definitions */
/* @brief message containing TE state */
typedef struct _sns_ccd_te_event {
    /* @brief Refer to CECT Tool Documentation for details. */
    uint32_t state0;
    /* @brief Refer to CECT Tool Documentation for details. */
    uint32_t state1;
} sns_ccd_te_event;

/* @brief Message containing CD state. */
typedef struct _sns_ccd_cd_event {
    sns_ccd_cd_state cd_state;
} sns_ccd_cd_event;

/* @brief Message containing CCD gesture event. */
typedef struct _sns_ccd_gesture_event {
    pb_size_t which_event;
    union {
        sns_ccd_te_event te_event;
        sns_ccd_cd_event cd_event;
    } event;
} sns_ccd_gesture_event;

/* @brief Request containing model to load. */
typedef struct _sns_ccd_model_config_req {
    pb_callback_t model_name;
} sns_ccd_model_config_req;

/* @brief Message containing supported models. */
typedef struct _sns_ccd_model_list_event {
    pb_callback_t model_names;
} sns_ccd_model_list_event;

/* @brief Request containing the loaded model and status. */
typedef struct _sns_ccd_model_config_event {
    pb_callback_t model_name;
    bool has_status;
    sns_std_error status;
} sns_ccd_model_config_event;


#ifdef __cplusplus
extern "C" {
#endif

/* Helper constants for enums */
#define _sns_ccd_gesture_msgid_MIN SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_CONFIG_REQ
#define _sns_ccd_gesture_msgid_MAX SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_LIST_EVENT
#define _sns_ccd_gesture_msgid_ARRAYSIZE ((sns_ccd_gesture_msgid)(SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_LIST_EVENT+1))
#define sns_ccd_gesture_msgid_SNS_CCD_GESTURE_MSGID_SNS_CCD_GESTURE_EVENT SNS_CCD_GESTURE_MSGID_SNS_CCD_GESTURE_EVENT
#define sns_ccd_gesture_msgid_SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_CONFIG_REQ SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_CONFIG_REQ
#define sns_ccd_gesture_msgid_SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_LIST_REQ SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_LIST_REQ
#define sns_ccd_gesture_msgid_SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_CONFIG_EVENT SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_CONFIG_EVENT
#define sns_ccd_gesture_msgid_SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_LIST_EVENT SNS_CCD_GESTURE_MSGID_SNS_CCD_MODEL_LIST_EVENT

#define _sns_ccd_cd_state_MIN SNS_CCD_CD_STATE_UNKNOWN
#define _sns_ccd_cd_state_MAX SNS_CCD_CD_STATE_HIGH
#define _sns_ccd_cd_state_ARRAYSIZE ((sns_ccd_cd_state)(SNS_CCD_CD_STATE_HIGH+1))
#define sns_ccd_cd_state_SNS_CCD_CD_STATE_UNKNOWN SNS_CCD_CD_STATE_UNKNOWN
#define sns_ccd_cd_state_SNS_CCD_CD_STATE_LOW SNS_CCD_CD_STATE_LOW
#define sns_ccd_cd_state_SNS_CCD_CD_STATE_HIGH SNS_CCD_CD_STATE_HIGH


#define sns_ccd_cd_event_cd_state_ENUMTYPE sns_ccd_cd_state




#define sns_ccd_model_config_event_status_ENUMTYPE sns_std_error


/* Initializer values for message structs */
#define sns_ccd_te_event_init_default            {0, 0}
#define sns_ccd_cd_event_init_default            {_sns_ccd_cd_state_MIN}
#define sns_ccd_gesture_event_init_default       {0, {sns_ccd_te_event_init_default}}
#define sns_ccd_model_config_req_init_default    {{{NULL}, NULL}}
#define sns_ccd_model_list_event_init_default    {{{NULL}, NULL}}
#define sns_ccd_model_config_event_init_default  {{{NULL}, NULL}, false, _sns_std_error_MIN}
#define sns_ccd_te_event_init_zero               {0, 0}
#define sns_ccd_cd_event_init_zero               {_sns_ccd_cd_state_MIN}
#define sns_ccd_gesture_event_init_zero          {0, {sns_ccd_te_event_init_zero}}
#define sns_ccd_model_config_req_init_zero       {{{NULL}, NULL}}
#define sns_ccd_model_list_event_init_zero       {{{NULL}, NULL}}
#define sns_ccd_model_config_event_init_zero     {{{NULL}, NULL}, false, _sns_std_error_MIN}

/* Field tags (for use in manual encoding/decoding) */
#define sns_ccd_te_event_state0_tag              1
#define sns_ccd_te_event_state1_tag              2
#define sns_ccd_cd_event_cd_state_tag            1
#define sns_ccd_gesture_event_te_event_tag       1
#define sns_ccd_gesture_event_cd_event_tag       2
#define sns_ccd_model_config_req_model_name_tag  1
#define sns_ccd_model_list_event_model_names_tag 1
#define sns_ccd_model_config_event_model_name_tag 1
#define sns_ccd_model_config_event_status_tag    2

/* Struct field encoding specification for nanopb */
#define sns_ccd_te_event_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, UINT32,   state0,            1) \
X(a, STATIC,   REQUIRED, UINT32,   state1,            2)
#define sns_ccd_te_event_CALLBACK NULL
#define sns_ccd_te_event_DEFAULT NULL

#define sns_ccd_cd_event_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, UENUM,    cd_state,          1)
#define sns_ccd_cd_event_CALLBACK NULL
#define sns_ccd_cd_event_DEFAULT NULL

#define sns_ccd_gesture_event_FIELDLIST(X, a) \
X(a, STATIC,   ONEOF,    MESSAGE,  (event,te_event,event.te_event),   1) \
X(a, STATIC,   ONEOF,    MESSAGE,  (event,cd_event,event.cd_event),   2)
#define sns_ccd_gesture_event_CALLBACK NULL
#define sns_ccd_gesture_event_DEFAULT NULL
#define sns_ccd_gesture_event_event_te_event_MSGTYPE sns_ccd_te_event
#define sns_ccd_gesture_event_event_cd_event_MSGTYPE sns_ccd_cd_event

#define sns_ccd_model_config_req_FIELDLIST(X, a) \
X(a, CALLBACK, OPTIONAL, STRING,   model_name,        1)
#define sns_ccd_model_config_req_CALLBACK pb_default_field_callback
#define sns_ccd_model_config_req_DEFAULT NULL

#define sns_ccd_model_list_event_FIELDLIST(X, a) \
X(a, CALLBACK, REPEATED, STRING,   model_names,       1)
#define sns_ccd_model_list_event_CALLBACK pb_default_field_callback
#define sns_ccd_model_list_event_DEFAULT NULL

#define sns_ccd_model_config_event_FIELDLIST(X, a) \
X(a, CALLBACK, OPTIONAL, STRING,   model_name,        1) \
X(a, STATIC,   OPTIONAL, UENUM,    status,            2)
#define sns_ccd_model_config_event_CALLBACK pb_default_field_callback
#define sns_ccd_model_config_event_DEFAULT NULL

extern const pb_msgdesc_t sns_ccd_te_event_msg;
extern const pb_msgdesc_t sns_ccd_cd_event_msg;
extern const pb_msgdesc_t sns_ccd_gesture_event_msg;
extern const pb_msgdesc_t sns_ccd_model_config_req_msg;
extern const pb_msgdesc_t sns_ccd_model_list_event_msg;
extern const pb_msgdesc_t sns_ccd_model_config_event_msg;

/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define sns_ccd_te_event_fields &sns_ccd_te_event_msg
#define sns_ccd_cd_event_fields &sns_ccd_cd_event_msg
#define sns_ccd_gesture_event_fields &sns_ccd_gesture_event_msg
#define sns_ccd_model_config_req_fields &sns_ccd_model_config_req_msg
#define sns_ccd_model_list_event_fields &sns_ccd_model_list_event_msg
#define sns_ccd_model_config_event_fields &sns_ccd_model_config_event_msg

/* Maximum encoded size of messages (where known) */
/* sns_ccd_model_config_req_size depends on runtime parameters */
/* sns_ccd_model_list_event_size depends on runtime parameters */
/* sns_ccd_model_config_event_size depends on runtime parameters */
#define SNS_CCD_GESTURE_PB_H_MAX_SIZE            sns_ccd_gesture_event_size
#define sns_ccd_cd_event_size                    2
#define sns_ccd_gesture_event_size               14
#define sns_ccd_te_event_size                    12

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

#endif
