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

#ifndef PB_SNS_DIAG_PB_H_INCLUDED
#define PB_SNS_DIAG_PB_H_INCLUDED
#include <pb.h>
#include "sns_std.pb.h"
#include "sns_std_sensor.pb.h"
#include "sns_client.pb.h"

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

/* Enum definitions */
/* Batch Sample Type */
typedef enum _sns_diag_batch_sample_type {
    /* This is the only sample in the batch */
    SNS_DIAG_BATCH_SAMPLE_TYPE_ONLY = 0,
    /* This is the first sample of the batch */
    SNS_DIAG_BATCH_SAMPLE_TYPE_FIRST = 1,
    /* This is an intermediate sample of the batch */
    SNS_DIAG_BATCH_SAMPLE_TYPE_INTERMEDIATE = 2,
    /* This is the last sample of the batch */
    SNS_DIAG_BATCH_SAMPLE_TYPE_LAST = 3
} sns_diag_batch_sample_type;

/* Sensor Interrupts */
typedef enum _sns_diag_interrupt {
    /* Interrupt caused by detection of a threshold being
 exceeded */
    SNS_DIAG_INTERRUPT_THRESHOLD = 0,
    /* Interrupt caused by detection of movement of the device */
    SNS_DIAG_INTERRUPT_MOTION = 1,
    /* Interrupt caused by detection of tilting of the device */
    SNS_DIAG_INTERRUPT_TILT = 2,
    /* Interrupt caused by detection of free fall */
    SNS_DIAG_INTERRUPT_FREE_FALL = 3,
    /* Interrupt caused by detection of double-tap */
    SNS_DIAG_INTERRUPT_DOUBLE_TAP = 4,
    /* Interrupt caused by detection of acceleration shock */
    SNS_DIAG_INTERRUPT_SHOCK = 5,
    /* Interrupt caused by CCD AMD */
    SNS_DIAG_INTERRUPT_CCD_AMD = 6,
    /* Interrupt caused by CCD WALK */
    SNS_DIAG_INTERRUPT_CCD_WALK = 7,
    /* Interrupt caused by CCD TILT */
    SNS_DIAG_INTERRUPT_CCD_TILT = 8,
    /* Interrupt caused by CCD TE0 */
    SNS_DIAG_INTERRUPT_CCD_TE0 = 9,
    /* Interrupt caused by CCD TE1 */
    SNS_DIAG_INTERRUPT_CCD_TE1 = 10,
    /* Interrupt caused by CCD TE2 */
    SNS_DIAG_INTERRUPT_CCD_TE2 = 11,
    /* Interrupt caused by CCD TE3 */
    SNS_DIAG_INTERRUPT_CCD_TE3 = 12,
    /* Interrupt caused by CCD CD0 */
    SNS_DIAG_INTERRUPT_CCD_CD0 = 13,
    /* Interrupt caused by CCD CD1 */
    SNS_DIAG_INTERRUPT_CCD_CD1 = 14,
    /* Interrupt caused by CCD CD2 */
    SNS_DIAG_INTERRUPT_CCD_CD2 = 15,
    /* Interrupt caused by CCD CD3 */
    SNS_DIAG_INTERRUPT_CCD_CD3 = 16,
    /* Interrupt caused by CCD GBE */
    SNS_DIAG_INTERRUPT_CCD_GBE1 = 17,
    /* Interrupt caused by CCD GBE */
    SNS_DIAG_INTERRUPT_CCD_GBE2 = 18,
    /* Interrupt caused by CCD OGV0 */
    SNS_DIAG_INTERRUPT_CCD_OGV0 = 19,
    /* Interrupt caused by CCD OGV1 */
    SNS_DIAG_INTERRUPT_CCD_OGV1 = 20,
    /* Interrupt caused by CCD OGV2 */
    SNS_DIAG_INTERRUPT_CCD_OGV2 = 21,
    /* Interrupt caused by CCD OGV3 */
    SNS_DIAG_INTERRUPT_CCD_OGV3 = 22,
    /* Interrupt caused by CCD TE4 */
    SNS_DIAG_INTERRUPT_CCD_TE4 = 23,
    /* Interrupt caused by CCD primary accel ppe */
    SNS_DIAG_INTERRUPT_CCD_PPE = 24,
    /* Interrupt caused by CCD gyro ppe */
    SNS_DIAG_INTERRUPT_CCD_PPE1 = 25,
    /* Interrupt caused by CCD secondary accel ppe */
    SNS_DIAG_INTERRUPT_CCD_PPE2 = 26
} sns_diag_interrupt;

/* Island mode states */
typedef enum _sns_diag_island_state {
    /* In Island mode */
    SNS_DIAG_ISLAND_STATE_IN_ISLAND_MODE = 0,
    /* Not in Island Mode */
    SNS_DIAG_ISLAND_STATE_NOT_IN_ISLAND_MODE = 1,
    /* Island mode disabled */
    SNS_DIAG_ISLAND_STATE_ISLAND_DISABLED = 2
} sns_diag_island_state;

/* Heap IDs */
typedef enum _sns_diag_heap_id {
    /* Primary Heap */
    SNS_DIAG_HEAP_ID_HEAP_MAIN = 0,
    /* Island Heap */
    SNS_DIAG_HEAP_ID_HEAP_ISLAND = 1,
    /* PRAM Heap */
    SNS_DIAG_HEAP_ID_HEAP_PRAM = 2,
    /* EVENT Heap */
    SNS_DIAG_HEAP_ID_HEAP_EVENT = 3,
    /* BATCH Heap */
    SNS_DIAG_HEAP_ID_HEAP_BATCH = 4,
    /* Event buffer */
    SNS_DIAG_HEAP_ID_EVENT_BUFFER = 100
} sns_diag_heap_id;

typedef enum _sns_diag_event_service_log_heap_stats_sns_event_service_heap_id {
    sns_diag_event_service_log_heap_stats_sns_event_service_heap_id_SNS_EVENT_SERVICE_HEAP_ID_ISLAND = 0,
    sns_diag_event_service_log_heap_stats_sns_event_service_heap_id_SNS_EVENT_SERVICE_HEAP_ID_MAIN = 1
} sns_diag_event_service_log_heap_stats_sns_event_service_heap_id;

/* Struct definitions */
/* Opaque Payload
 This message defines the fields used to log an undefined payload */
typedef struct _sns_diag_opaque_payload {
    pb_callback_t payload;
} sns_diag_opaque_payload;

/* Batch Sample
 This message defines the fields used to log batched data. */
typedef struct _sns_diag_batch_sample {
    /* Indicates if the sample is the first, intermediate, last or only
 sample of a batch */
    sns_diag_batch_sample_type sample_type;
    /* Timestamp of the sensor state data sample */
    uint64_t timestamp;
    /* Sensor state data sample */
    pb_callback_t sample;
    /* Data status. */
    sns_std_sensor_sample_status status;
} sns_diag_batch_sample;

/* Sensor State Hardware Interrupt Log Packet
 This message defines the fields used to log sensor state information
 pertaining to hardware interrupts
 This message is used as the payload field of sns_diag_sensor_log */
typedef struct _sns_diag_sensor_state_interrupt {
    /* Type of sensor hardware interrupt */
    sns_diag_interrupt interrupt;
    /* Timestamp when the interrupt occurred */
    uint64_t timestamp;
} sns_diag_sensor_state_interrupt;

/* Sensor State Raw
 This message defines the fields used to log sensor state information
 pertaining to raw uncalibrated physical sensor data.
 This message is used as the payload field of sns_diag_sensor_log */
typedef struct _sns_diag_sensor_state_raw {
    pb_callback_t sample;
} sns_diag_sensor_state_raw;

/* Client API Response Message */
typedef struct _sns_diag_client_resp_msg {
    /* The error response sent to the client */
    sns_std_error error;
} sns_diag_client_resp_msg;

/* Client API log packet
 This message defines the fields to log all
 Request, Response and Event messages at the Client API
 This message is used as the payload field of sns_diag_sensor_log */
typedef struct _sns_diag_client_api_log {
    /* Client ID identifies the client connection */
    uint64_t client_id;
    /* Data type of the source sensor */
    pb_callback_t src_sensor_type;
    pb_size_t which_client_api_log_payload;
    union {
        /* Client API Request message as defined in sns_client.proto */
        sns_client_request_msg request_payload;
        /* Client API Event message as defined in sns_client.proto */
        sns_client_event_msg event_payload;
        /* Client API Response message as defined in sns_diag.proto */
        sns_diag_client_resp_msg resp_payload;
    } client_api_log_payload;
} sns_diag_client_api_log;

/* Sensor API log packet
 This message defines the fields to log all Request and
 Event messages at the Sensor API
 This message is used as the payload field of sns_diag_sensor_log */
typedef struct _sns_diag_sensor_api_log {
    /* The message id of the message being logged */
    uint32_t message_id;
    /* Timestamp associated with this message */
    uint64_t timestamp;
    /* Data stream associated with this message */
    bool has_stream_id;
    uint64_t stream_id;
    pb_size_t which_sensor_api_log_payload;
    union {
        /* Sensor API Event message containing sensor specific event message
     as defined in the sensor's proto api file */
        sns_diag_opaque_payload opaque_payload;
        /* Sensor API Request message as defined in sns_std.proto */
        sns_std_request request_payload;
    } sensor_api_log_payload;
} sns_diag_sensor_api_log;

/* Sensor log packet
 This message defines the fields to log all sensor specific
 messages. This includes Sensor API messages, Client API messages,
 HW Interrupt messages, Sensor State messages */
typedef struct _sns_diag_sensor_log {
    /* Log ID for the log packet */
    uint32_t log_id;
    /* Timestamp when log packet.was generated */
    uint64_t timestamp;
    /* Sensor UID for the log packet */
    sns_std_suid suid;
    /* Data type provided by the Sensor UID */
    pb_callback_t sensor_type;
    /* In case of client_api payload :
 Instance ID of the Client Manager Sensor to which this
 message was passed to or obtained from
 In case of opaque, sensor_api and sensor_state payloads:
 Instance ID of the Sensor to which this
 message was passed to or obtained from */
    uint64_t instance_id;
    pb_size_t which_sensor_log_payload;
    union {
        /* Sensor specific Sensor State Algo message */
        sns_diag_opaque_payload opaque_payload;
        /* Sensor API message */
        sns_diag_sensor_api_log sensor_api_payload;
        /* Client API message */
        sns_diag_client_api_log client_api_payload;
        /* Sensor State Raw message */
        sns_diag_sensor_state_raw sensor_state_raw_payload;
        /* Sensor State Hardware Interrupt message */
        sns_diag_sensor_state_interrupt sensor_state_interrupt_payload;
    } sensor_log_payload;
} sns_diag_sensor_log;

/* Sensor Instance Mapping Log Packet
 This message defines the fields used to log sensor instance mapping
 information.  This message is used as the payload field of sns_diag_fw_log */
typedef struct _sns_diag_instance_map_log {
    /* The instance id of the source sensor instance */
    uint64_t src_instance_id;
    /* Array of destination Sensor Instance IDs or Sensor IDs that the
 source sensor instance is feeding to.
 If no destination instance ids are specified it signifies
 deletion of the source instance */
    pb_callback_t dest_instance_id;
    /* Array of data stream ids that the
 source sensor instance is feeding to */
    pb_callback_t stream_id;
} sns_diag_instance_map_log;

/* Island mode transition Log Packet
 This message defines the fields used to log
 transitions into and out of island mode

 This log packet is generated each time the system transitions into or out
 of island mode or when island mode is disabled or when triggered by
 a request to the diag sensor

 This message is used as the payload field of sns_diag_fw_log
 This message is legacy. It is replaced with 'message sns_diag_island_log' */
typedef struct _sns_diag_island_transition_log {
    /* Timestamp of the transition

 When logpacket is triggered, this timestamp will retain
 the timestamp when the current state became effective. */
    uint64_t timestamp;
    /* Island state after transition is completed */
    sns_diag_island_state island_state;
    /* User defined cookie
 Used by test scripts to identify logs triggered
 by messages sent to the SSC */
    bool has_cookie;
    uint64_t cookie;
    /* Total time system spent in island since device boot(micro seconds) */
    bool has_total_island_time;
    uint64_t total_island_time;
} sns_diag_island_transition_log;

/* This message is used to log system island states */
typedef struct _sns_diag_island_tx_log {
    /* Island state after transition is completed */
    bool has_island_state;
    sns_diag_island_state island_state;
    /* User defined cookie
 Used by test scripts to identify logs triggered
 by messages sent to the SSC */
    bool has_cookie;
    uint64_t cookie;
    /* Total time system spent in island since device boot(micro seconds) */
    bool has_total_island_time;
    uint64_t total_island_time;
} sns_diag_island_tx_log;

/* This message is used to log sensors' internal island states */
typedef struct _sns_diag_island_debug_log {
    /* previous state of island transition */
    bool has_previous_island_state;
    uint32_t previous_island_state;
    /* current state of island transition */
    bool has_current_island_state;
    uint32_t current_island_state;
    /* caller symbols causing island transition */
    pb_callback_t callers;
} sns_diag_island_debug_log;

/* This message is used to log the island transitions.
 The transitions includes both - system transitions into or out
 of island mode or when island mode is disabled or when triggered by
 a request to the diag sensor as well as debug transtions that capture
 the internal island states

 This message is used as the payload field of sns_diag_fw_log */
typedef struct _sns_diag_island_log {
    /* timestamp of island transition or debug transition */
    bool has_timestamp;
    uint64_t timestamp;
    pb_size_t which_sns_diag_island_log_payloads;
    union {
        sns_diag_island_tx_log log_payload;
        sns_diag_island_debug_log dbg_log_payload;
    } sns_diag_island_log_payloads;
} sns_diag_island_log;

/* Island exit vote Log Packet
 This message defines the fields used to log vote for island mode exits.

 This log packet is generated at each call to island_exit() */
typedef struct _sns_diag_island_exit_vote_log {
    /* Timestamp */
    uint64_t timestamp;
    /* SUID of the Sensor responsible for the vote */
    bool has_sensor;
    sns_std_suid sensor;
} sns_diag_island_exit_vote_log;

/* Memory status Log Packet
 This message defines the fields used to log the memory utilization
 This log packet is generated when a request is sent to the diag sensor */
typedef struct _sns_diag_mem_utilization_log {
    /* Timestamp */
    uint64_t timestamp;
    /* Heap ID */
    sns_diag_heap_id heap_id;
    /* Total Memory */
    uint32_t total_memory;
    /* Used Memory */
    uint32_t used_memory;
    /* User defined cookie
 Used by test scripts to identify logs triggered
 by messages sent to the SSC */
    bool has_cookie;
    uint64_t cookie;
} sns_diag_mem_utilization_log;

/* Event Service status Log Packet
 This message defines the fields used to log the memory utilization and
 other statistics from the Event Service.
 Used only for SW debug; *not guaranteed to be backward compatible*
 This log packet is generated when a request is sent to the diag sensor */
typedef struct _sns_diag_event_service_log {
    /* Timestamp */
    uint64_t timestamp;
    /* User defined cookie
 Used by test scripts to identify logs triggered
 by messages sent to the SSC */
    bool has_cookie;
    uint64_t cookie;
    pb_callback_t stats;
} sns_diag_event_service_log;

typedef struct _sns_diag_event_service_log_heap_stats {
    /* Heap ID */
    sns_diag_event_service_log_heap_stats_sns_event_service_heap_id heap_id;
    /* Total memory available in heap (in blocks) */
    uint32_t total_memory;
    /* Current memory consumption (in blocks) */
    uint32_t used_memory;
    /* Maximum memory consumption since last log packet (in blocks) */
    uint32_t max_memory;
    /* Total clusters available */
    uint32_t total_clusters;
    /* Current number of clusters in use */
    uint32_t used_clusters;
    /* Maximum in-use clusters since last log packet */
    uint32_t max_clusters;
    /* Number of allocation failues since the last DIAG log packet
 If Island will result in island exit; else causes dropped samples */
    uint32_t alloc_failures;
    /* Largest event allocation since the last DIAG log packet (in bytes) */
    uint32_t max_size;
} sns_diag_event_service_log_heap_stats;

/* Framework log packet
 This message defines the fields to log all framework messages. This
 includes memory, island, instance mapping messages. */
typedef struct _sns_diag_fw_log {
    /* Log ID for the log packet */
    uint32_t log_id;
    /* Timestamp when log packet.was generated */
    uint64_t timestamp;
    pb_size_t which_fw_log_payload;
    union {
        /* Sensor Instance Map message */
        sns_diag_instance_map_log instance_map_payload;
        /* Sensor Island Mode (Legacy) */
        sns_diag_island_transition_log island_mode_payload;
        /* Sensors Island Exit vote
     NOT SUPPORTED YET. */
        sns_diag_island_exit_vote_log island_exit_vote_payload;
        /* Sensors Memory Utilization */
        sns_diag_mem_utilization_log memory_utilization_payload;
        /* Event Service status log */
        sns_diag_event_service_log event_service_payload;
        /* Island related logs */
        sns_diag_island_log island_payload;
    } fw_log_payload;
} sns_diag_fw_log;


#ifdef __cplusplus
extern "C" {
#endif

/* Helper constants for enums */
#define _sns_diag_batch_sample_type_MIN SNS_DIAG_BATCH_SAMPLE_TYPE_ONLY
#define _sns_diag_batch_sample_type_MAX SNS_DIAG_BATCH_SAMPLE_TYPE_LAST
#define _sns_diag_batch_sample_type_ARRAYSIZE ((sns_diag_batch_sample_type)(SNS_DIAG_BATCH_SAMPLE_TYPE_LAST+1))
#define sns_diag_batch_sample_type_SNS_DIAG_BATCH_SAMPLE_TYPE_ONLY SNS_DIAG_BATCH_SAMPLE_TYPE_ONLY
#define sns_diag_batch_sample_type_SNS_DIAG_BATCH_SAMPLE_TYPE_FIRST SNS_DIAG_BATCH_SAMPLE_TYPE_FIRST
#define sns_diag_batch_sample_type_SNS_DIAG_BATCH_SAMPLE_TYPE_INTERMEDIATE SNS_DIAG_BATCH_SAMPLE_TYPE_INTERMEDIATE
#define sns_diag_batch_sample_type_SNS_DIAG_BATCH_SAMPLE_TYPE_LAST SNS_DIAG_BATCH_SAMPLE_TYPE_LAST

#define _sns_diag_interrupt_MIN SNS_DIAG_INTERRUPT_THRESHOLD
#define _sns_diag_interrupt_MAX SNS_DIAG_INTERRUPT_CCD_PPE2
#define _sns_diag_interrupt_ARRAYSIZE ((sns_diag_interrupt)(SNS_DIAG_INTERRUPT_CCD_PPE2+1))
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_THRESHOLD SNS_DIAG_INTERRUPT_THRESHOLD
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_MOTION SNS_DIAG_INTERRUPT_MOTION
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_TILT SNS_DIAG_INTERRUPT_TILT
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_FREE_FALL SNS_DIAG_INTERRUPT_FREE_FALL
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_DOUBLE_TAP SNS_DIAG_INTERRUPT_DOUBLE_TAP
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_SHOCK SNS_DIAG_INTERRUPT_SHOCK
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_AMD SNS_DIAG_INTERRUPT_CCD_AMD
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_WALK SNS_DIAG_INTERRUPT_CCD_WALK
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_TILT SNS_DIAG_INTERRUPT_CCD_TILT
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_TE0 SNS_DIAG_INTERRUPT_CCD_TE0
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_TE1 SNS_DIAG_INTERRUPT_CCD_TE1
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_TE2 SNS_DIAG_INTERRUPT_CCD_TE2
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_TE3 SNS_DIAG_INTERRUPT_CCD_TE3
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_CD0 SNS_DIAG_INTERRUPT_CCD_CD0
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_CD1 SNS_DIAG_INTERRUPT_CCD_CD1
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_CD2 SNS_DIAG_INTERRUPT_CCD_CD2
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_CD3 SNS_DIAG_INTERRUPT_CCD_CD3
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_GBE1 SNS_DIAG_INTERRUPT_CCD_GBE1
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_GBE2 SNS_DIAG_INTERRUPT_CCD_GBE2
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_OGV0 SNS_DIAG_INTERRUPT_CCD_OGV0
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_OGV1 SNS_DIAG_INTERRUPT_CCD_OGV1
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_OGV2 SNS_DIAG_INTERRUPT_CCD_OGV2
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_OGV3 SNS_DIAG_INTERRUPT_CCD_OGV3
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_TE4 SNS_DIAG_INTERRUPT_CCD_TE4
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_PPE SNS_DIAG_INTERRUPT_CCD_PPE
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_PPE1 SNS_DIAG_INTERRUPT_CCD_PPE1
#define sns_diag_interrupt_SNS_DIAG_INTERRUPT_CCD_PPE2 SNS_DIAG_INTERRUPT_CCD_PPE2

#define _sns_diag_island_state_MIN SNS_DIAG_ISLAND_STATE_IN_ISLAND_MODE
#define _sns_diag_island_state_MAX SNS_DIAG_ISLAND_STATE_ISLAND_DISABLED
#define _sns_diag_island_state_ARRAYSIZE ((sns_diag_island_state)(SNS_DIAG_ISLAND_STATE_ISLAND_DISABLED+1))
#define sns_diag_island_state_SNS_DIAG_ISLAND_STATE_IN_ISLAND_MODE SNS_DIAG_ISLAND_STATE_IN_ISLAND_MODE
#define sns_diag_island_state_SNS_DIAG_ISLAND_STATE_NOT_IN_ISLAND_MODE SNS_DIAG_ISLAND_STATE_NOT_IN_ISLAND_MODE
#define sns_diag_island_state_SNS_DIAG_ISLAND_STATE_ISLAND_DISABLED SNS_DIAG_ISLAND_STATE_ISLAND_DISABLED

#define _sns_diag_heap_id_MIN SNS_DIAG_HEAP_ID_HEAP_MAIN
#define _sns_diag_heap_id_MAX SNS_DIAG_HEAP_ID_EVENT_BUFFER
#define _sns_diag_heap_id_ARRAYSIZE ((sns_diag_heap_id)(SNS_DIAG_HEAP_ID_EVENT_BUFFER+1))
#define sns_diag_heap_id_SNS_DIAG_HEAP_ID_HEAP_MAIN SNS_DIAG_HEAP_ID_HEAP_MAIN
#define sns_diag_heap_id_SNS_DIAG_HEAP_ID_HEAP_ISLAND SNS_DIAG_HEAP_ID_HEAP_ISLAND
#define sns_diag_heap_id_SNS_DIAG_HEAP_ID_HEAP_PRAM SNS_DIAG_HEAP_ID_HEAP_PRAM
#define sns_diag_heap_id_SNS_DIAG_HEAP_ID_HEAP_EVENT SNS_DIAG_HEAP_ID_HEAP_EVENT
#define sns_diag_heap_id_SNS_DIAG_HEAP_ID_HEAP_BATCH SNS_DIAG_HEAP_ID_HEAP_BATCH
#define sns_diag_heap_id_SNS_DIAG_HEAP_ID_EVENT_BUFFER SNS_DIAG_HEAP_ID_EVENT_BUFFER

#define _sns_diag_event_service_log_heap_stats_sns_event_service_heap_id_MIN sns_diag_event_service_log_heap_stats_sns_event_service_heap_id_SNS_EVENT_SERVICE_HEAP_ID_ISLAND
#define _sns_diag_event_service_log_heap_stats_sns_event_service_heap_id_MAX sns_diag_event_service_log_heap_stats_sns_event_service_heap_id_SNS_EVENT_SERVICE_HEAP_ID_MAIN
#define _sns_diag_event_service_log_heap_stats_sns_event_service_heap_id_ARRAYSIZE ((sns_diag_event_service_log_heap_stats_sns_event_service_heap_id)(sns_diag_event_service_log_heap_stats_sns_event_service_heap_id_SNS_EVENT_SERVICE_HEAP_ID_MAIN+1))


#define sns_diag_batch_sample_sample_type_ENUMTYPE sns_diag_batch_sample_type
#define sns_diag_batch_sample_status_ENUMTYPE sns_std_sensor_sample_status

#define sns_diag_sensor_state_interrupt_interrupt_ENUMTYPE sns_diag_interrupt


#define sns_diag_client_resp_msg_error_ENUMTYPE sns_std_error





#define sns_diag_island_transition_log_island_state_ENUMTYPE sns_diag_island_state

#define sns_diag_island_tx_log_island_state_ENUMTYPE sns_diag_island_state




#define sns_diag_mem_utilization_log_heap_id_ENUMTYPE sns_diag_heap_id


#define sns_diag_event_service_log_heap_stats_heap_id_ENUMTYPE sns_diag_event_service_log_heap_stats_sns_event_service_heap_id



/* Initializer values for message structs */
#define sns_diag_opaque_payload_init_default     {{{NULL}, NULL}}
#define sns_diag_batch_sample_init_default       {SNS_DIAG_BATCH_SAMPLE_TYPE_ONLY, 0, {{NULL}, NULL}, SNS_STD_SENSOR_SAMPLE_STATUS_UNRELIABLE}
#define sns_diag_sensor_state_interrupt_init_default {_sns_diag_interrupt_MIN, 0}
#define sns_diag_sensor_state_raw_init_default   {{{NULL}, NULL}}
#define sns_diag_client_resp_msg_init_default    {_sns_std_error_MIN}
#define sns_diag_client_api_log_init_default     {0, {{NULL}, NULL}, 0, {sns_client_request_msg_init_default}}
#define sns_diag_sensor_api_log_init_default     {0, 0, false, 0, 0, {sns_diag_opaque_payload_init_default}}
#define sns_diag_sensor_log_init_default         {0, 0, sns_std_suid_init_default, {{NULL}, NULL}, 0, 0, {sns_diag_opaque_payload_init_default}}
#define sns_diag_instance_map_log_init_default   {0, {{NULL}, NULL}, {{NULL}, NULL}}
#define sns_diag_island_transition_log_init_default {0, _sns_diag_island_state_MIN, false, 0, false, 0}
#define sns_diag_island_tx_log_init_default      {false, _sns_diag_island_state_MIN, false, 0, false, 0}
#define sns_diag_island_debug_log_init_default   {false, 0, false, 0, {{NULL}, NULL}}
#define sns_diag_island_log_init_default         {false, 0, 0, {sns_diag_island_tx_log_init_default}}
#define sns_diag_island_exit_vote_log_init_default {0, false, sns_std_suid_init_default}
#define sns_diag_mem_utilization_log_init_default {0, _sns_diag_heap_id_MIN, 0, 0, false, 0}
#define sns_diag_event_service_log_init_default  {0, false, 0, {{NULL}, NULL}}
#define sns_diag_event_service_log_heap_stats_init_default {_sns_diag_event_service_log_heap_stats_sns_event_service_heap_id_MIN, 0, 0, 0, 0, 0, 0, 0, 0}
#define sns_diag_fw_log_init_default             {0, 0, 0, {sns_diag_instance_map_log_init_default}}
#define sns_diag_opaque_payload_init_zero        {{{NULL}, NULL}}
#define sns_diag_batch_sample_init_zero          {_sns_diag_batch_sample_type_MIN, 0, {{NULL}, NULL}, _sns_std_sensor_sample_status_MIN}
#define sns_diag_sensor_state_interrupt_init_zero {_sns_diag_interrupt_MIN, 0}
#define sns_diag_sensor_state_raw_init_zero      {{{NULL}, NULL}}
#define sns_diag_client_resp_msg_init_zero       {_sns_std_error_MIN}
#define sns_diag_client_api_log_init_zero        {0, {{NULL}, NULL}, 0, {sns_client_request_msg_init_zero}}
#define sns_diag_sensor_api_log_init_zero        {0, 0, false, 0, 0, {sns_diag_opaque_payload_init_zero}}
#define sns_diag_sensor_log_init_zero            {0, 0, sns_std_suid_init_zero, {{NULL}, NULL}, 0, 0, {sns_diag_opaque_payload_init_zero}}
#define sns_diag_instance_map_log_init_zero      {0, {{NULL}, NULL}, {{NULL}, NULL}}
#define sns_diag_island_transition_log_init_zero {0, _sns_diag_island_state_MIN, false, 0, false, 0}
#define sns_diag_island_tx_log_init_zero         {false, _sns_diag_island_state_MIN, false, 0, false, 0}
#define sns_diag_island_debug_log_init_zero      {false, 0, false, 0, {{NULL}, NULL}}
#define sns_diag_island_log_init_zero            {false, 0, 0, {sns_diag_island_tx_log_init_zero}}
#define sns_diag_island_exit_vote_log_init_zero  {0, false, sns_std_suid_init_zero}
#define sns_diag_mem_utilization_log_init_zero   {0, _sns_diag_heap_id_MIN, 0, 0, false, 0}
#define sns_diag_event_service_log_init_zero     {0, false, 0, {{NULL}, NULL}}
#define sns_diag_event_service_log_heap_stats_init_zero {_sns_diag_event_service_log_heap_stats_sns_event_service_heap_id_MIN, 0, 0, 0, 0, 0, 0, 0, 0}
#define sns_diag_fw_log_init_zero                {0, 0, 0, {sns_diag_instance_map_log_init_zero}}

/* Field tags (for use in manual encoding/decoding) */
#define sns_diag_opaque_payload_payload_tag      1
#define sns_diag_batch_sample_sample_type_tag    1
#define sns_diag_batch_sample_timestamp_tag      2
#define sns_diag_batch_sample_sample_tag         3
#define sns_diag_batch_sample_status_tag         4
#define sns_diag_sensor_state_interrupt_interrupt_tag 1
#define sns_diag_sensor_state_interrupt_timestamp_tag 2
#define sns_diag_sensor_state_raw_sample_tag     1
#define sns_diag_client_resp_msg_error_tag       1
#define sns_diag_client_api_log_client_id_tag    1
#define sns_diag_client_api_log_src_sensor_type_tag 2
#define sns_diag_client_api_log_request_payload_tag 100
#define sns_diag_client_api_log_event_payload_tag 101
#define sns_diag_client_api_log_resp_payload_tag 102
#define sns_diag_sensor_api_log_message_id_tag   1
#define sns_diag_sensor_api_log_timestamp_tag    2
#define sns_diag_sensor_api_log_stream_id_tag    3
#define sns_diag_sensor_api_log_opaque_payload_tag 100
#define sns_diag_sensor_api_log_request_payload_tag 101
#define sns_diag_sensor_log_log_id_tag           1
#define sns_diag_sensor_log_timestamp_tag        2
#define sns_diag_sensor_log_suid_tag             3
#define sns_diag_sensor_log_sensor_type_tag      4
#define sns_diag_sensor_log_instance_id_tag      5
#define sns_diag_sensor_log_opaque_payload_tag   100
#define sns_diag_sensor_log_sensor_api_payload_tag 101
#define sns_diag_sensor_log_client_api_payload_tag 102
#define sns_diag_sensor_log_sensor_state_raw_payload_tag 103
#define sns_diag_sensor_log_sensor_state_interrupt_payload_tag 104
#define sns_diag_instance_map_log_src_instance_id_tag 1
#define sns_diag_instance_map_log_dest_instance_id_tag 2
#define sns_diag_instance_map_log_stream_id_tag  3
#define sns_diag_island_transition_log_timestamp_tag 1
#define sns_diag_island_transition_log_island_state_tag 2
#define sns_diag_island_transition_log_cookie_tag 3
#define sns_diag_island_transition_log_total_island_time_tag 4
#define sns_diag_island_tx_log_island_state_tag  1
#define sns_diag_island_tx_log_cookie_tag        2
#define sns_diag_island_tx_log_total_island_time_tag 3
#define sns_diag_island_debug_log_previous_island_state_tag 1
#define sns_diag_island_debug_log_current_island_state_tag 2
#define sns_diag_island_debug_log_callers_tag    3
#define sns_diag_island_log_timestamp_tag        1
#define sns_diag_island_log_log_payload_tag      2
#define sns_diag_island_log_dbg_log_payload_tag  3
#define sns_diag_island_exit_vote_log_timestamp_tag 1
#define sns_diag_island_exit_vote_log_sensor_tag 2
#define sns_diag_mem_utilization_log_timestamp_tag 1
#define sns_diag_mem_utilization_log_heap_id_tag 2
#define sns_diag_mem_utilization_log_total_memory_tag 3
#define sns_diag_mem_utilization_log_used_memory_tag 4
#define sns_diag_mem_utilization_log_cookie_tag  5
#define sns_diag_event_service_log_timestamp_tag 1
#define sns_diag_event_service_log_cookie_tag    2
#define sns_diag_event_service_log_stats_tag     3
#define sns_diag_event_service_log_heap_stats_heap_id_tag 1
#define sns_diag_event_service_log_heap_stats_total_memory_tag 2
#define sns_diag_event_service_log_heap_stats_used_memory_tag 3
#define sns_diag_event_service_log_heap_stats_max_memory_tag 4
#define sns_diag_event_service_log_heap_stats_total_clusters_tag 5
#define sns_diag_event_service_log_heap_stats_used_clusters_tag 6
#define sns_diag_event_service_log_heap_stats_max_clusters_tag 7
#define sns_diag_event_service_log_heap_stats_alloc_failures_tag 8
#define sns_diag_event_service_log_heap_stats_max_size_tag 9
#define sns_diag_fw_log_log_id_tag               1
#define sns_diag_fw_log_timestamp_tag            2
#define sns_diag_fw_log_instance_map_payload_tag 100
#define sns_diag_fw_log_island_mode_payload_tag  101
#define sns_diag_fw_log_island_exit_vote_payload_tag 102
#define sns_diag_fw_log_memory_utilization_payload_tag 103
#define sns_diag_fw_log_event_service_payload_tag 104
#define sns_diag_fw_log_island_payload_tag       105

/* Struct field encoding specification for nanopb */
#define sns_diag_opaque_payload_FIELDLIST(X, a) \
X(a, CALLBACK, REQUIRED, BYTES,    payload,           1)
#define sns_diag_opaque_payload_CALLBACK pb_default_field_callback
#define sns_diag_opaque_payload_DEFAULT NULL

#define sns_diag_batch_sample_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, UENUM,    sample_type,       1) \
X(a, STATIC,   REQUIRED, FIXED64,  timestamp,         2) \
X(a, CALLBACK, REPEATED, FLOAT,    sample,            3) \
X(a, STATIC,   REQUIRED, UENUM,    status,            4)
#define sns_diag_batch_sample_CALLBACK pb_default_field_callback
#define sns_diag_batch_sample_DEFAULT NULL

#define sns_diag_sensor_state_interrupt_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, UENUM,    interrupt,         1) \
X(a, STATIC,   REQUIRED, FIXED64,  timestamp,         2)
#define sns_diag_sensor_state_interrupt_CALLBACK NULL
#define sns_diag_sensor_state_interrupt_DEFAULT NULL

#define sns_diag_sensor_state_raw_FIELDLIST(X, a) \
X(a, CALLBACK, REPEATED, MESSAGE,  sample,            1)
#define sns_diag_sensor_state_raw_CALLBACK pb_default_field_callback
#define sns_diag_sensor_state_raw_DEFAULT NULL
#define sns_diag_sensor_state_raw_sample_MSGTYPE sns_diag_batch_sample

#define sns_diag_client_resp_msg_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, UENUM,    error,             1)
#define sns_diag_client_resp_msg_CALLBACK NULL
#define sns_diag_client_resp_msg_DEFAULT NULL

#define sns_diag_client_api_log_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, FIXED64,  client_id,         1) \
X(a, CALLBACK, REQUIRED, STRING,   src_sensor_type,   2) \
X(a, STATIC,   ONEOF,    MESSAGE,  (client_api_log_payload,request_payload,client_api_log_payload.request_payload), 100) \
X(a, STATIC,   ONEOF,    MESSAGE,  (client_api_log_payload,event_payload,client_api_log_payload.event_payload), 101) \
X(a, STATIC,   ONEOF,    MESSAGE,  (client_api_log_payload,resp_payload,client_api_log_payload.resp_payload), 102)
#define sns_diag_client_api_log_CALLBACK pb_default_field_callback
#define sns_diag_client_api_log_DEFAULT NULL
#define sns_diag_client_api_log_client_api_log_payload_request_payload_MSGTYPE sns_client_request_msg
#define sns_diag_client_api_log_client_api_log_payload_event_payload_MSGTYPE sns_client_event_msg
#define sns_diag_client_api_log_client_api_log_payload_resp_payload_MSGTYPE sns_diag_client_resp_msg

#define sns_diag_sensor_api_log_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, FIXED32,  message_id,        1) \
X(a, STATIC,   REQUIRED, FIXED64,  timestamp,         2) \
X(a, STATIC,   OPTIONAL, FIXED64,  stream_id,         3) \
X(a, STATIC,   ONEOF,    MESSAGE,  (sensor_api_log_payload,opaque_payload,sensor_api_log_payload.opaque_payload), 100) \
X(a, STATIC,   ONEOF,    MESSAGE,  (sensor_api_log_payload,request_payload,sensor_api_log_payload.request_payload), 101)
#define sns_diag_sensor_api_log_CALLBACK NULL
#define sns_diag_sensor_api_log_DEFAULT NULL
#define sns_diag_sensor_api_log_sensor_api_log_payload_opaque_payload_MSGTYPE sns_diag_opaque_payload
#define sns_diag_sensor_api_log_sensor_api_log_payload_request_payload_MSGTYPE sns_std_request

#define sns_diag_sensor_log_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, FIXED32,  log_id,            1) \
X(a, STATIC,   REQUIRED, FIXED64,  timestamp,         2) \
X(a, STATIC,   REQUIRED, MESSAGE,  suid,              3) \
X(a, CALLBACK, REQUIRED, STRING,   sensor_type,       4) \
X(a, STATIC,   REQUIRED, FIXED64,  instance_id,       5) \
X(a, STATIC,   ONEOF,    MESSAGE,  (sensor_log_payload,opaque_payload,sensor_log_payload.opaque_payload), 100) \
X(a, STATIC,   ONEOF,    MESSAGE,  (sensor_log_payload,sensor_api_payload,sensor_log_payload.sensor_api_payload), 101) \
X(a, STATIC,   ONEOF,    MESSAGE,  (sensor_log_payload,client_api_payload,sensor_log_payload.client_api_payload), 102) \
X(a, STATIC,   ONEOF,    MESSAGE,  (sensor_log_payload,sensor_state_raw_payload,sensor_log_payload.sensor_state_raw_payload), 103) \
X(a, STATIC,   ONEOF,    MESSAGE,  (sensor_log_payload,sensor_state_interrupt_payload,sensor_log_payload.sensor_state_interrupt_payload), 104)
#define sns_diag_sensor_log_CALLBACK pb_default_field_callback
#define sns_diag_sensor_log_DEFAULT NULL
#define sns_diag_sensor_log_suid_MSGTYPE sns_std_suid
#define sns_diag_sensor_log_sensor_log_payload_opaque_payload_MSGTYPE sns_diag_opaque_payload
#define sns_diag_sensor_log_sensor_log_payload_sensor_api_payload_MSGTYPE sns_diag_sensor_api_log
#define sns_diag_sensor_log_sensor_log_payload_client_api_payload_MSGTYPE sns_diag_client_api_log
#define sns_diag_sensor_log_sensor_log_payload_sensor_state_raw_payload_MSGTYPE sns_diag_sensor_state_raw
#define sns_diag_sensor_log_sensor_log_payload_sensor_state_interrupt_payload_MSGTYPE sns_diag_sensor_state_interrupt

#define sns_diag_instance_map_log_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, FIXED64,  src_instance_id,   1) \
X(a, CALLBACK, REPEATED, FIXED64,  dest_instance_id,   2) \
X(a, CALLBACK, REPEATED, FIXED64,  stream_id,         3)
#define sns_diag_instance_map_log_CALLBACK pb_default_field_callback
#define sns_diag_instance_map_log_DEFAULT NULL

#define sns_diag_island_transition_log_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, FIXED64,  timestamp,         1) \
X(a, STATIC,   REQUIRED, UENUM,    island_state,      2) \
X(a, STATIC,   OPTIONAL, FIXED64,  cookie,            3) \
X(a, STATIC,   OPTIONAL, FIXED64,  total_island_time,   4)
#define sns_diag_island_transition_log_CALLBACK NULL
#define sns_diag_island_transition_log_DEFAULT NULL

#define sns_diag_island_tx_log_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, UENUM,    island_state,      1) \
X(a, STATIC,   OPTIONAL, FIXED64,  cookie,            2) \
X(a, STATIC,   OPTIONAL, FIXED64,  total_island_time,   3)
#define sns_diag_island_tx_log_CALLBACK NULL
#define sns_diag_island_tx_log_DEFAULT NULL

#define sns_diag_island_debug_log_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, FIXED32,  previous_island_state,   1) \
X(a, STATIC,   OPTIONAL, FIXED32,  current_island_state,   2) \
X(a, CALLBACK, REPEATED, FIXED32,  callers,           3)
#define sns_diag_island_debug_log_CALLBACK pb_default_field_callback
#define sns_diag_island_debug_log_DEFAULT NULL

#define sns_diag_island_log_FIELDLIST(X, a) \
X(a, STATIC,   OPTIONAL, FIXED64,  timestamp,         1) \
X(a, STATIC,   ONEOF,    MESSAGE,  (sns_diag_island_log_payloads,log_payload,sns_diag_island_log_payloads.log_payload),   2) \
X(a, STATIC,   ONEOF,    MESSAGE,  (sns_diag_island_log_payloads,dbg_log_payload,sns_diag_island_log_payloads.dbg_log_payload),   3)
#define sns_diag_island_log_CALLBACK NULL
#define sns_diag_island_log_DEFAULT NULL
#define sns_diag_island_log_sns_diag_island_log_payloads_log_payload_MSGTYPE sns_diag_island_tx_log
#define sns_diag_island_log_sns_diag_island_log_payloads_dbg_log_payload_MSGTYPE sns_diag_island_debug_log

#define sns_diag_island_exit_vote_log_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, FIXED64,  timestamp,         1) \
X(a, STATIC,   OPTIONAL, MESSAGE,  sensor,            2)
#define sns_diag_island_exit_vote_log_CALLBACK NULL
#define sns_diag_island_exit_vote_log_DEFAULT NULL
#define sns_diag_island_exit_vote_log_sensor_MSGTYPE sns_std_suid

#define sns_diag_mem_utilization_log_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, FIXED64,  timestamp,         1) \
X(a, STATIC,   REQUIRED, UENUM,    heap_id,           2) \
X(a, STATIC,   REQUIRED, FIXED32,  total_memory,      3) \
X(a, STATIC,   REQUIRED, FIXED32,  used_memory,       4) \
X(a, STATIC,   OPTIONAL, FIXED64,  cookie,            5)
#define sns_diag_mem_utilization_log_CALLBACK NULL
#define sns_diag_mem_utilization_log_DEFAULT NULL

#define sns_diag_event_service_log_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, FIXED64,  timestamp,         1) \
X(a, STATIC,   OPTIONAL, FIXED64,  cookie,            2) \
X(a, CALLBACK, REPEATED, MESSAGE,  stats,             3)
#define sns_diag_event_service_log_CALLBACK pb_default_field_callback
#define sns_diag_event_service_log_DEFAULT NULL
#define sns_diag_event_service_log_stats_MSGTYPE sns_diag_event_service_log_heap_stats

#define sns_diag_event_service_log_heap_stats_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, UENUM,    heap_id,           1) \
X(a, STATIC,   REQUIRED, FIXED32,  total_memory,      2) \
X(a, STATIC,   REQUIRED, FIXED32,  used_memory,       3) \
X(a, STATIC,   REQUIRED, FIXED32,  max_memory,        4) \
X(a, STATIC,   REQUIRED, FIXED32,  total_clusters,    5) \
X(a, STATIC,   REQUIRED, FIXED32,  used_clusters,     6) \
X(a, STATIC,   REQUIRED, FIXED32,  max_clusters,      7) \
X(a, STATIC,   REQUIRED, FIXED32,  alloc_failures,    8) \
X(a, STATIC,   REQUIRED, FIXED32,  max_size,          9)
#define sns_diag_event_service_log_heap_stats_CALLBACK NULL
#define sns_diag_event_service_log_heap_stats_DEFAULT NULL

#define sns_diag_fw_log_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, FIXED32,  log_id,            1) \
X(a, STATIC,   REQUIRED, FIXED64,  timestamp,         2) \
X(a, STATIC,   ONEOF,    MESSAGE,  (fw_log_payload,instance_map_payload,fw_log_payload.instance_map_payload), 100) \
X(a, STATIC,   ONEOF,    MESSAGE,  (fw_log_payload,island_mode_payload,fw_log_payload.island_mode_payload), 101) \
X(a, STATIC,   ONEOF,    MESSAGE,  (fw_log_payload,island_exit_vote_payload,fw_log_payload.island_exit_vote_payload), 102) \
X(a, STATIC,   ONEOF,    MESSAGE,  (fw_log_payload,memory_utilization_payload,fw_log_payload.memory_utilization_payload), 103) \
X(a, STATIC,   ONEOF,    MESSAGE,  (fw_log_payload,event_service_payload,fw_log_payload.event_service_payload), 104) \
X(a, STATIC,   ONEOF,    MESSAGE,  (fw_log_payload,island_payload,fw_log_payload.island_payload), 105)
#define sns_diag_fw_log_CALLBACK NULL
#define sns_diag_fw_log_DEFAULT NULL
#define sns_diag_fw_log_fw_log_payload_instance_map_payload_MSGTYPE sns_diag_instance_map_log
#define sns_diag_fw_log_fw_log_payload_island_mode_payload_MSGTYPE sns_diag_island_transition_log
#define sns_diag_fw_log_fw_log_payload_island_exit_vote_payload_MSGTYPE sns_diag_island_exit_vote_log
#define sns_diag_fw_log_fw_log_payload_memory_utilization_payload_MSGTYPE sns_diag_mem_utilization_log
#define sns_diag_fw_log_fw_log_payload_event_service_payload_MSGTYPE sns_diag_event_service_log
#define sns_diag_fw_log_fw_log_payload_island_payload_MSGTYPE sns_diag_island_log

extern const pb_msgdesc_t sns_diag_opaque_payload_msg;
extern const pb_msgdesc_t sns_diag_batch_sample_msg;
extern const pb_msgdesc_t sns_diag_sensor_state_interrupt_msg;
extern const pb_msgdesc_t sns_diag_sensor_state_raw_msg;
extern const pb_msgdesc_t sns_diag_client_resp_msg_msg;
extern const pb_msgdesc_t sns_diag_client_api_log_msg;
extern const pb_msgdesc_t sns_diag_sensor_api_log_msg;
extern const pb_msgdesc_t sns_diag_sensor_log_msg;
extern const pb_msgdesc_t sns_diag_instance_map_log_msg;
extern const pb_msgdesc_t sns_diag_island_transition_log_msg;
extern const pb_msgdesc_t sns_diag_island_tx_log_msg;
extern const pb_msgdesc_t sns_diag_island_debug_log_msg;
extern const pb_msgdesc_t sns_diag_island_log_msg;
extern const pb_msgdesc_t sns_diag_island_exit_vote_log_msg;
extern const pb_msgdesc_t sns_diag_mem_utilization_log_msg;
extern const pb_msgdesc_t sns_diag_event_service_log_msg;
extern const pb_msgdesc_t sns_diag_event_service_log_heap_stats_msg;
extern const pb_msgdesc_t sns_diag_fw_log_msg;

/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define sns_diag_opaque_payload_fields &sns_diag_opaque_payload_msg
#define sns_diag_batch_sample_fields &sns_diag_batch_sample_msg
#define sns_diag_sensor_state_interrupt_fields &sns_diag_sensor_state_interrupt_msg
#define sns_diag_sensor_state_raw_fields &sns_diag_sensor_state_raw_msg
#define sns_diag_client_resp_msg_fields &sns_diag_client_resp_msg_msg
#define sns_diag_client_api_log_fields &sns_diag_client_api_log_msg
#define sns_diag_sensor_api_log_fields &sns_diag_sensor_api_log_msg
#define sns_diag_sensor_log_fields &sns_diag_sensor_log_msg
#define sns_diag_instance_map_log_fields &sns_diag_instance_map_log_msg
#define sns_diag_island_transition_log_fields &sns_diag_island_transition_log_msg
#define sns_diag_island_tx_log_fields &sns_diag_island_tx_log_msg
#define sns_diag_island_debug_log_fields &sns_diag_island_debug_log_msg
#define sns_diag_island_log_fields &sns_diag_island_log_msg
#define sns_diag_island_exit_vote_log_fields &sns_diag_island_exit_vote_log_msg
#define sns_diag_mem_utilization_log_fields &sns_diag_mem_utilization_log_msg
#define sns_diag_event_service_log_fields &sns_diag_event_service_log_msg
#define sns_diag_event_service_log_heap_stats_fields &sns_diag_event_service_log_heap_stats_msg
#define sns_diag_fw_log_fields &sns_diag_fw_log_msg

/* Maximum encoded size of messages (where known) */
#if defined(sns_client_request_msg_size) && defined(sns_client_event_msg_size)
union sns_diag_client_api_log_client_api_log_payload_size_union {char f100[(7 + sns_client_request_msg_size)]; char f101[(7 + sns_client_event_msg_size)]; char f0[5];};
#endif
/* sns_diag_opaque_payload_size depends on runtime parameters */
/* sns_diag_batch_sample_size depends on runtime parameters */
/* sns_diag_sensor_state_raw_size depends on runtime parameters */
/* sns_diag_client_api_log_size depends on runtime parameters */
/* sns_diag_sensor_api_log_size depends on runtime parameters */
/* sns_diag_sensor_log_size depends on runtime parameters */
/* sns_diag_instance_map_log_size depends on runtime parameters */
/* sns_diag_island_debug_log_size depends on runtime parameters */
/* sns_diag_island_log_size depends on runtime parameters */
/* sns_diag_event_service_log_size depends on runtime parameters */
/* sns_diag_fw_log_size depends on runtime parameters */
#define SNS_DIAG_PB_H_MAX_SIZE                   sns_diag_event_service_log_heap_stats_size
#define sns_diag_client_resp_msg_size            2
#define sns_diag_event_service_log_heap_stats_size 42
#define sns_diag_island_exit_vote_log_size       29
#define sns_diag_island_transition_log_size      29
#define sns_diag_island_tx_log_size              20
#define sns_diag_mem_utilization_log_size        30
#define sns_diag_sensor_state_interrupt_size     11

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

#endif
