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

#ifndef PB_SNS_REGISTRY_PB_H_INCLUDED
#define PB_SNS_REGISTRY_PB_H_INCLUDED
#include <pb.h>
#include "sns_std.pb.h"

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

/* Enum definitions */
/* @brief Registry Sensor message IDs: */
typedef enum _sns_registry_msgid {
    /* @brief A request to read data from the Registry database.
 Message: sns_registry_read_req */
    SNS_REGISTRY_MSGID_SNS_REGISTRY_READ_REQ = 512,
    /* @brief A request to write data to the Registry database.
 Message: sns_registry_write_req */
    SNS_REGISTRY_MSGID_SNS_REGISTRY_WRITE_REQ = 513,
    /* @brief A read event from the Registry Sensor.
 Message: sns_registry_read_event */
    SNS_REGISTRY_MSGID_SNS_REGISTRY_READ_EVENT = 514,
    /* @brief A write event from the Registry Sensor.
 Message: sns_registry_write_event */
    SNS_REGISTRY_MSGID_SNS_REGISTRY_WRITE_EVENT = 768
} sns_registry_msgid;

/* @brief Registry write status */
typedef enum _sns_registry_write_status {
    /* @brief The registry write was successful and the data was stored */
    SNS_REGISTRY_WRITE_STATUS_SUCCESS = 0,
    /* @brief An unspecified error has occurred; data may be lost */
    SNS_REGISTRY_WRITE_STATUS_ERROR_OTHER = 1
} sns_registry_write_status;

/* Struct definitions */
/* @brief A message representing a registry group */
typedef struct _sns_registry_data {
    /* @brief List of items contained in this group. */
    pb_callback_t items;
} sns_registry_data;

/* @brief A Registry Item */
typedef struct _sns_registry_data_item {
    /* @brief Item name (i.e. Only item-specific name, sans group name) */
    pb_callback_t name;
    bool has_version;
    uint32_t version;
    bool has_subgroup;
    sns_registry_data subgroup;
    pb_callback_t str;
    bool has_flt;
    float flt;
    bool has_sint;
    int64_t sint;
} sns_registry_data_item;

/* @brief The read request */
typedef struct _sns_registry_read_req {
    /* @brief Full name of the item or group to be read */
    pb_callback_t name;
} sns_registry_read_req;

/* @brief The read event */
typedef struct _sns_registry_read_event {
    /* @brief Full name of the group which was read */
    pb_callback_t name;
    /* @brief If the requested registry group was not found, data is empty */
    sns_registry_data data;
} sns_registry_read_event;

/* @brief The write request */
typedef struct _sns_registry_write_req {
    /* @brief Full name of the group to be written */
    pb_callback_t name;
    /* @brief The registry data */
    sns_registry_data data;
    /* @brief Cookie for request/event pairing */
    bool has_cookie;
    int64_t cookie;
} sns_registry_write_req;

/* @brief The write event */
typedef struct _sns_registry_write_event {
    /* @brief The Write Status */
    sns_registry_write_status status;
    /* @brief Echo cookie for request/event pairing */
    bool has_cookie;
    int64_t cookie;
} sns_registry_write_event;


#ifdef __cplusplus
extern "C" {
#endif

/* Helper constants for enums */
#define _sns_registry_msgid_MIN SNS_REGISTRY_MSGID_SNS_REGISTRY_READ_REQ
#define _sns_registry_msgid_MAX SNS_REGISTRY_MSGID_SNS_REGISTRY_WRITE_EVENT
#define _sns_registry_msgid_ARRAYSIZE ((sns_registry_msgid)(SNS_REGISTRY_MSGID_SNS_REGISTRY_WRITE_EVENT+1))
#define sns_registry_msgid_SNS_REGISTRY_MSGID_SNS_REGISTRY_READ_REQ SNS_REGISTRY_MSGID_SNS_REGISTRY_READ_REQ
#define sns_registry_msgid_SNS_REGISTRY_MSGID_SNS_REGISTRY_WRITE_REQ SNS_REGISTRY_MSGID_SNS_REGISTRY_WRITE_REQ
#define sns_registry_msgid_SNS_REGISTRY_MSGID_SNS_REGISTRY_READ_EVENT SNS_REGISTRY_MSGID_SNS_REGISTRY_READ_EVENT
#define sns_registry_msgid_SNS_REGISTRY_MSGID_SNS_REGISTRY_WRITE_EVENT SNS_REGISTRY_MSGID_SNS_REGISTRY_WRITE_EVENT

#define _sns_registry_write_status_MIN SNS_REGISTRY_WRITE_STATUS_SUCCESS
#define _sns_registry_write_status_MAX SNS_REGISTRY_WRITE_STATUS_ERROR_OTHER
#define _sns_registry_write_status_ARRAYSIZE ((sns_registry_write_status)(SNS_REGISTRY_WRITE_STATUS_ERROR_OTHER+1))
#define sns_registry_write_status_SNS_REGISTRY_WRITE_STATUS_SUCCESS SNS_REGISTRY_WRITE_STATUS_SUCCESS
#define sns_registry_write_status_SNS_REGISTRY_WRITE_STATUS_ERROR_OTHER SNS_REGISTRY_WRITE_STATUS_ERROR_OTHER






#define sns_registry_write_event_status_ENUMTYPE sns_registry_write_status


/* Initializer values for message structs */
#define sns_registry_data_init_default           {{{NULL}, NULL}}
#define sns_registry_data_item_init_default      {{{NULL}, NULL}, false, 0, false, sns_registry_data_init_default, {{NULL}, NULL}, false, 0, false, 0}
#define sns_registry_read_req_init_default       {{{NULL}, NULL}}
#define sns_registry_read_event_init_default     {{{NULL}, NULL}, sns_registry_data_init_default}
#define sns_registry_write_req_init_default      {{{NULL}, NULL}, sns_registry_data_init_default, false, 0}
#define sns_registry_write_event_init_default    {_sns_registry_write_status_MIN, false, 0}
#define sns_registry_data_init_zero              {{{NULL}, NULL}}
#define sns_registry_data_item_init_zero         {{{NULL}, NULL}, false, 0, false, sns_registry_data_init_zero, {{NULL}, NULL}, false, 0, false, 0}
#define sns_registry_read_req_init_zero          {{{NULL}, NULL}}
#define sns_registry_read_event_init_zero        {{{NULL}, NULL}, sns_registry_data_init_zero}
#define sns_registry_write_req_init_zero         {{{NULL}, NULL}, sns_registry_data_init_zero, false, 0}
#define sns_registry_write_event_init_zero       {_sns_registry_write_status_MIN, false, 0}

/* Field tags (for use in manual encoding/decoding) */
#define sns_registry_data_items_tag              3
#define sns_registry_data_item_name_tag          1
#define sns_registry_data_item_version_tag       2
#define sns_registry_data_item_subgroup_tag      10
#define sns_registry_data_item_str_tag           11
#define sns_registry_data_item_flt_tag           12
#define sns_registry_data_item_sint_tag          13
#define sns_registry_read_req_name_tag           1
#define sns_registry_read_event_name_tag         1
#define sns_registry_read_event_data_tag         2
#define sns_registry_write_req_name_tag          1
#define sns_registry_write_req_data_tag          2
#define sns_registry_write_req_cookie_tag        3
#define sns_registry_write_event_status_tag      1
#define sns_registry_write_event_cookie_tag      2

/* Struct field encoding specification for nanopb */
#define sns_registry_data_FIELDLIST(X, a) \
X(a, CALLBACK, REPEATED, MESSAGE,  items,             3)
#define sns_registry_data_CALLBACK pb_default_field_callback
#define sns_registry_data_DEFAULT NULL
#define sns_registry_data_items_MSGTYPE sns_registry_data_item

#define sns_registry_data_item_FIELDLIST(X, a) \
X(a, CALLBACK, REQUIRED, STRING,   name,              1) \
X(a, STATIC,   OPTIONAL, FIXED32,  version,           2) \
X(a, STATIC,   OPTIONAL, MESSAGE,  subgroup,         10) \
X(a, CALLBACK, OPTIONAL, STRING,   str,              11) \
X(a, STATIC,   OPTIONAL, FLOAT,    flt,              12) \
X(a, STATIC,   OPTIONAL, SFIXED64, sint,             13)
#define sns_registry_data_item_CALLBACK pb_default_field_callback
#define sns_registry_data_item_DEFAULT NULL
#define sns_registry_data_item_subgroup_MSGTYPE sns_registry_data

#define sns_registry_read_req_FIELDLIST(X, a) \
X(a, CALLBACK, REQUIRED, STRING,   name,              1)
#define sns_registry_read_req_CALLBACK pb_default_field_callback
#define sns_registry_read_req_DEFAULT NULL

#define sns_registry_read_event_FIELDLIST(X, a) \
X(a, CALLBACK, REQUIRED, STRING,   name,              1) \
X(a, STATIC,   REQUIRED, MESSAGE,  data,              2)
#define sns_registry_read_event_CALLBACK pb_default_field_callback
#define sns_registry_read_event_DEFAULT NULL
#define sns_registry_read_event_data_MSGTYPE sns_registry_data

#define sns_registry_write_req_FIELDLIST(X, a) \
X(a, CALLBACK, REQUIRED, STRING,   name,              1) \
X(a, STATIC,   REQUIRED, MESSAGE,  data,              2) \
X(a, STATIC,   OPTIONAL, INT64,    cookie,            3)
#define sns_registry_write_req_CALLBACK pb_default_field_callback
#define sns_registry_write_req_DEFAULT NULL
#define sns_registry_write_req_data_MSGTYPE sns_registry_data

#define sns_registry_write_event_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, UENUM,    status,            1) \
X(a, STATIC,   OPTIONAL, INT64,    cookie,            2)
#define sns_registry_write_event_CALLBACK NULL
#define sns_registry_write_event_DEFAULT NULL

extern const pb_msgdesc_t sns_registry_data_msg;
extern const pb_msgdesc_t sns_registry_data_item_msg;
extern const pb_msgdesc_t sns_registry_read_req_msg;
extern const pb_msgdesc_t sns_registry_read_event_msg;
extern const pb_msgdesc_t sns_registry_write_req_msg;
extern const pb_msgdesc_t sns_registry_write_event_msg;

/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define sns_registry_data_fields &sns_registry_data_msg
#define sns_registry_data_item_fields &sns_registry_data_item_msg
#define sns_registry_read_req_fields &sns_registry_read_req_msg
#define sns_registry_read_event_fields &sns_registry_read_event_msg
#define sns_registry_write_req_fields &sns_registry_write_req_msg
#define sns_registry_write_event_fields &sns_registry_write_event_msg

/* Maximum encoded size of messages (where known) */
/* sns_registry_data_size depends on runtime parameters */
/* sns_registry_data_item_size depends on runtime parameters */
/* sns_registry_read_req_size depends on runtime parameters */
/* sns_registry_read_event_size depends on runtime parameters */
/* sns_registry_write_req_size depends on runtime parameters */
#define SNS_REGISTRY_PB_H_MAX_SIZE               sns_registry_write_event_size
#define sns_registry_write_event_size            13

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

#endif
