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

#ifndef PB_SNS_OFFBODY_DETECT_PB_H_INCLUDED
#define PB_SNS_OFFBODY_DETECT_PB_H_INCLUDED
#include <pb.h>
#include "sns_std_sensor.pb.h"
#include "sns_physical_sensor_test.pb.h"
#include "sns_cal.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 Offbody Detection Sensor. */
typedef enum _sns_offbody_detect_msgid {
    SNS_OFFBODY_DETECT_MSGID_SNS_OFFBODY_DETECT_EVENT = 772
} sns_offbody_detect_msgid;

/* @brief Offbody event types. */
typedef enum _sns_offbody_detect_event_type {
    /* @brief Current state is unknown: not yet detected. */
    SNS_OFFBODY_DETECT_EVENT_TYPE_UNKNOWN = 0,
    /* @brief Device has been detected to be on-body. */
    SNS_OFFBODY_DETECT_EVENT_TYPE_ON = 1,
    /* @brief Device has been detected to be off-body. */
    SNS_OFFBODY_DETECT_EVENT_TYPE_OFF = 2
} sns_offbody_detect_event_type;

/* Struct definitions */
/* @brief Offbody event */
typedef struct _sns_offbody_detect_event {
    /* @brief Detected state. */
    sns_offbody_detect_event_type state;
    /* @brief Accuracy level of the state. */
    bool has_status;
    sns_std_sensor_sample_status status;
} sns_offbody_detect_event;


#ifdef __cplusplus
extern "C" {
#endif

/* Helper constants for enums */
#define _sns_offbody_detect_msgid_MIN SNS_OFFBODY_DETECT_MSGID_SNS_OFFBODY_DETECT_EVENT
#define _sns_offbody_detect_msgid_MAX SNS_OFFBODY_DETECT_MSGID_SNS_OFFBODY_DETECT_EVENT
#define _sns_offbody_detect_msgid_ARRAYSIZE ((sns_offbody_detect_msgid)(SNS_OFFBODY_DETECT_MSGID_SNS_OFFBODY_DETECT_EVENT+1))
#define sns_offbody_detect_msgid_SNS_OFFBODY_DETECT_MSGID_SNS_OFFBODY_DETECT_EVENT SNS_OFFBODY_DETECT_MSGID_SNS_OFFBODY_DETECT_EVENT

#define _sns_offbody_detect_event_type_MIN SNS_OFFBODY_DETECT_EVENT_TYPE_UNKNOWN
#define _sns_offbody_detect_event_type_MAX SNS_OFFBODY_DETECT_EVENT_TYPE_OFF
#define _sns_offbody_detect_event_type_ARRAYSIZE ((sns_offbody_detect_event_type)(SNS_OFFBODY_DETECT_EVENT_TYPE_OFF+1))
#define sns_offbody_detect_event_type_SNS_OFFBODY_DETECT_EVENT_TYPE_UNKNOWN SNS_OFFBODY_DETECT_EVENT_TYPE_UNKNOWN
#define sns_offbody_detect_event_type_SNS_OFFBODY_DETECT_EVENT_TYPE_ON SNS_OFFBODY_DETECT_EVENT_TYPE_ON
#define sns_offbody_detect_event_type_SNS_OFFBODY_DETECT_EVENT_TYPE_OFF SNS_OFFBODY_DETECT_EVENT_TYPE_OFF

#define sns_offbody_detect_event_state_ENUMTYPE sns_offbody_detect_event_type
#define sns_offbody_detect_event_status_ENUMTYPE sns_std_sensor_sample_status


/* Initializer values for message structs */
#define sns_offbody_detect_event_init_default    {SNS_OFFBODY_DETECT_EVENT_TYPE_UNKNOWN, false, SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE}
#define sns_offbody_detect_event_init_zero       {_sns_offbody_detect_event_type_MIN, false, _sns_std_sensor_sample_status_MIN}

/* Field tags (for use in manual encoding/decoding) */
#define sns_offbody_detect_event_state_tag       1
#define sns_offbody_detect_event_status_tag      2

/* Struct field encoding specification for nanopb */
#define sns_offbody_detect_event_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, UENUM,    state,             1) \
X(a, STATIC,   OPTIONAL, UENUM,    status,            2)
#define sns_offbody_detect_event_CALLBACK NULL
#define sns_offbody_detect_event_DEFAULT NULL

extern const pb_msgdesc_t sns_offbody_detect_event_msg;

/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define sns_offbody_detect_event_fields &sns_offbody_detect_event_msg

/* Maximum encoded size of messages (where known) */
#define SNS_OFFBODY_DETECT_PB_H_MAX_SIZE         sns_offbody_detect_event_size
#define sns_offbody_detect_event_size            4

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

#endif
