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

#ifndef PB_SNS_DPC_PB_H_INCLUDED
#define PB_SNS_DPC_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 DPC Sensor */
typedef enum _sns_dpc_msgid {
    SNS_DPC_MSGID_SNS_DPC_EVENT_CONFIG = 777,
    SNS_DPC_MSGID_SNS_DPC_EVENT = 1030
} sns_dpc_msgid;

/* @brief Device position states */
typedef enum _sns_dpc_state {
    SNS_DPC_UNINITIALIZED = 0,
    /* @brief when algo cannot identify other states. */
    SNS_DPC_UNKNOWN = 1,
    /* @brief User keeps the device steady with display at an angle within
        +/-15 deg with respect to the horizontal plane */
    SNS_DPC_FLAT_STATIC = 2,
    /* @brief Device is not in FLAT_STATIC state and proximity sensor detects NEAR */
    SNS_DPC_HIDDEN = 3,
    /* @brief User picks up the device */
    SNS_DPC_IN_HAND = 4,
    /* @brief User keeps the device steady with display at an angle greater than
        +/-15 deg with respect to the horizontal plane */
    SNS_DPC_FACING = 5
} sns_dpc_state;

/* Struct definitions */
/* @brief Event generated by DPC to publish updated device position. */
typedef struct _sns_dpc_event {
    /* @brief current dpc state */
    sns_dpc_state dpc_state;
} sns_dpc_event;

/* @brief Event generated by DPC to new client to inform the current device
        position. */
typedef struct _sns_dpc_event_config {
    /* @brief current dpc state */
    sns_dpc_state dpc_state;
} sns_dpc_event_config;


#ifdef __cplusplus
extern "C" {
#endif

/* Helper constants for enums */
#define _sns_dpc_msgid_MIN SNS_DPC_MSGID_SNS_DPC_EVENT_CONFIG
#define _sns_dpc_msgid_MAX SNS_DPC_MSGID_SNS_DPC_EVENT
#define _sns_dpc_msgid_ARRAYSIZE ((sns_dpc_msgid)(SNS_DPC_MSGID_SNS_DPC_EVENT+1))
#define sns_dpc_msgid_SNS_DPC_MSGID_SNS_DPC_EVENT_CONFIG SNS_DPC_MSGID_SNS_DPC_EVENT_CONFIG
#define sns_dpc_msgid_SNS_DPC_MSGID_SNS_DPC_EVENT SNS_DPC_MSGID_SNS_DPC_EVENT

#define _sns_dpc_state_MIN SNS_DPC_UNINITIALIZED
#define _sns_dpc_state_MAX SNS_DPC_FACING
#define _sns_dpc_state_ARRAYSIZE ((sns_dpc_state)(SNS_DPC_FACING+1))
#define sns_dpc_state_SNS_DPC_UNINITIALIZED SNS_DPC_UNINITIALIZED
#define sns_dpc_state_SNS_DPC_UNKNOWN SNS_DPC_UNKNOWN
#define sns_dpc_state_SNS_DPC_FLAT_STATIC SNS_DPC_FLAT_STATIC
#define sns_dpc_state_SNS_DPC_HIDDEN SNS_DPC_HIDDEN
#define sns_dpc_state_SNS_DPC_IN_HAND SNS_DPC_IN_HAND
#define sns_dpc_state_SNS_DPC_FACING SNS_DPC_FACING

#define sns_dpc_event_dpc_state_ENUMTYPE sns_dpc_state

#define sns_dpc_event_config_dpc_state_ENUMTYPE sns_dpc_state


/* Initializer values for message structs */
#define sns_dpc_event_init_default               {_sns_dpc_state_MIN}
#define sns_dpc_event_config_init_default        {_sns_dpc_state_MIN}
#define sns_dpc_event_init_zero                  {_sns_dpc_state_MIN}
#define sns_dpc_event_config_init_zero           {_sns_dpc_state_MIN}

/* Field tags (for use in manual encoding/decoding) */
#define sns_dpc_event_dpc_state_tag              1
#define sns_dpc_event_config_dpc_state_tag       1

/* Struct field encoding specification for nanopb */
#define sns_dpc_event_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, UENUM,    dpc_state,         1)
#define sns_dpc_event_CALLBACK NULL
#define sns_dpc_event_DEFAULT NULL

#define sns_dpc_event_config_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, UENUM,    dpc_state,         1)
#define sns_dpc_event_config_CALLBACK NULL
#define sns_dpc_event_config_DEFAULT NULL

extern const pb_msgdesc_t sns_dpc_event_msg;
extern const pb_msgdesc_t sns_dpc_event_config_msg;

/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define sns_dpc_event_fields &sns_dpc_event_msg
#define sns_dpc_event_config_fields &sns_dpc_event_config_msg

/* Maximum encoded size of messages (where known) */
#define SNS_DPC_PB_H_MAX_SIZE                    sns_dpc_event_size
#define sns_dpc_event_config_size                2
#define sns_dpc_event_size                       2

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

#endif
