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

#ifndef PB_SNS_ACTIVITY_RECOGNITION_PB_H_INCLUDED
#define PB_SNS_ACTIVITY_RECOGNITION_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 Activity Recognition Sensor */
typedef enum _sns_activity_recognition_msgid {
    SNS_ACTIVITY_RECOGNITION_MSGID_SNS_AR_EVENT = 800,
    SNS_ACTIVITY_RECOGNITION_MSGID_SNS_AR_CONFIG_EVENT = 801
} sns_activity_recognition_msgid;

/* @brief User activity states */
typedef enum _sns_ar_motion_state {
    /* @brief Unknown is reported when the algorithm is unable to detect the
        current activity state. */
    SNS_AR_UNKNOWN = 0,
    /* @brief User is relatively stationary. */
    SNS_AR_STATIONARY = 1,
    /* @brief User is classified as a pedestrian. */
    SNS_AR_PED = 2,
    /* @brief User is in a non-motorized vehicle. */
    SNS_AR_NMV = 3,
    /* @brief User is in a motorized vehicle. */
    SNS_AR_MV = 4,
    /* @brief User is walking. */
    SNS_AR_WALK = 5,
    /* @brief User is running. */
    SNS_AR_RUN = 6,
    /* @brief User is on a bicycle. */
    SNS_AR_BICYCLE = 7,
    /* @brief User is in a car. */
    SNS_AR_CAR = 8,
    /* @brief User is in an airplane. */
    SNS_AR_AIRPLANE = 9
} sns_ar_motion_state;

/* Struct definitions */
/* @brief Event generated by Activity Recognition to convey all the supported
        user activity states. */
typedef struct _sns_ar_config_event {
    /* @brief List of supported motion states. */
    pb_callback_t states;
} sns_ar_config_event;

/* @brief Event generated by Activity Recognition to convey user current
        activity state. */
typedef struct _sns_ar_event {
    /* @brief List of active states for this user.
        Multiple states may be reported concurrently.
        Any states not listed here are presumed to be inactive. */
    pb_size_t states_count;
    sns_ar_motion_state states[4];
} sns_ar_event;


#ifdef __cplusplus
extern "C" {
#endif

/* Helper constants for enums */
#define _sns_activity_recognition_msgid_MIN SNS_ACTIVITY_RECOGNITION_MSGID_SNS_AR_EVENT
#define _sns_activity_recognition_msgid_MAX SNS_ACTIVITY_RECOGNITION_MSGID_SNS_AR_CONFIG_EVENT
#define _sns_activity_recognition_msgid_ARRAYSIZE ((sns_activity_recognition_msgid)(SNS_ACTIVITY_RECOGNITION_MSGID_SNS_AR_CONFIG_EVENT+1))
#define sns_activity_recognition_msgid_SNS_ACTIVITY_RECOGNITION_MSGID_SNS_AR_EVENT SNS_ACTIVITY_RECOGNITION_MSGID_SNS_AR_EVENT
#define sns_activity_recognition_msgid_SNS_ACTIVITY_RECOGNITION_MSGID_SNS_AR_CONFIG_EVENT SNS_ACTIVITY_RECOGNITION_MSGID_SNS_AR_CONFIG_EVENT

#define _sns_ar_motion_state_MIN SNS_AR_UNKNOWN
#define _sns_ar_motion_state_MAX SNS_AR_AIRPLANE
#define _sns_ar_motion_state_ARRAYSIZE ((sns_ar_motion_state)(SNS_AR_AIRPLANE+1))
#define sns_ar_motion_state_SNS_AR_UNKNOWN SNS_AR_UNKNOWN
#define sns_ar_motion_state_SNS_AR_STATIONARY SNS_AR_STATIONARY
#define sns_ar_motion_state_SNS_AR_PED SNS_AR_PED
#define sns_ar_motion_state_SNS_AR_NMV SNS_AR_NMV
#define sns_ar_motion_state_SNS_AR_MV SNS_AR_MV
#define sns_ar_motion_state_SNS_AR_WALK SNS_AR_WALK
#define sns_ar_motion_state_SNS_AR_RUN SNS_AR_RUN
#define sns_ar_motion_state_SNS_AR_BICYCLE SNS_AR_BICYCLE
#define sns_ar_motion_state_SNS_AR_CAR SNS_AR_CAR
#define sns_ar_motion_state_SNS_AR_AIRPLANE SNS_AR_AIRPLANE

#define sns_ar_config_event_states_ENUMTYPE sns_ar_motion_state

#define sns_ar_event_states_ENUMTYPE sns_ar_motion_state


/* Initializer values for message structs */
#define sns_ar_config_event_init_default         {{{NULL}, NULL}}
#define sns_ar_event_init_default                {0, {_sns_ar_motion_state_MIN, _sns_ar_motion_state_MIN, _sns_ar_motion_state_MIN, _sns_ar_motion_state_MIN}}
#define sns_ar_config_event_init_zero            {{{NULL}, NULL}}
#define sns_ar_event_init_zero                   {0, {_sns_ar_motion_state_MIN, _sns_ar_motion_state_MIN, _sns_ar_motion_state_MIN, _sns_ar_motion_state_MIN}}

/* Field tags (for use in manual encoding/decoding) */
#define sns_ar_config_event_states_tag           1
#define sns_ar_event_states_tag                  1

/* Struct field encoding specification for nanopb */
#define sns_ar_config_event_FIELDLIST(X, a) \
X(a, CALLBACK, REPEATED, UENUM,    states,            1)
#define sns_ar_config_event_CALLBACK pb_default_field_callback
#define sns_ar_config_event_DEFAULT NULL

#define sns_ar_event_FIELDLIST(X, a) \
X(a, STATIC,   REPEATED, UENUM,    states,            1)
#define sns_ar_event_CALLBACK NULL
#define sns_ar_event_DEFAULT NULL

extern const pb_msgdesc_t sns_ar_config_event_msg;
extern const pb_msgdesc_t sns_ar_event_msg;

/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define sns_ar_config_event_fields &sns_ar_config_event_msg
#define sns_ar_event_fields &sns_ar_event_msg

/* Maximum encoded size of messages (where known) */
/* sns_ar_config_event_size depends on runtime parameters */
#define SNS_ACTIVITY_RECOGNITION_PB_H_MAX_SIZE   sns_ar_event_size
#define sns_ar_event_size                        8

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

#endif
