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

#ifndef PB_SNS_DA_TEST_PB_H_INCLUDED
#define PB_SNS_DA_TEST_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 Message IDs for DA test sensor */
typedef enum _sns_da_test_msgid {
    /* @brief DA test sensor request message ID */
    SNS_DA_TEST_MSGID_SNS_DA_TEST_REQ = 512,
    /* @brief DA test sensor log message ID */
    SNS_DA_TEST_MSGID_SNS_DA_TEST_LOG = 768,
    /* @brief DA test sensor broadcast event message ID */
    SNS_DA_TEST_MSGID_SNS_DA_TEST_BROADCAST_EVENT = 967,
    /* @brief DA test sensor event message ID */
    SNS_DA_TEST_MSGID_SNS_DA_TEST_EVENT = 1024
} sns_da_test_msgid;

/* Struct definitions */
/* @brief DA test sensor request message
 @details This message is used by the client to send a request to the
 DA test sensor for configuring the sensor under test. */
typedef struct _sns_da_test_req {
    /* @brief This field contains the test parameters as a string.
 @details The parameters are in the "-key=value " format.
 For example:
 -sensor=<sensor type>
 -sample_rate=<positive value in Hz>
 -duration=<positive value in seconds> */
    pb_callback_t test_args;
} sns_da_test_req;

/* @brief DA test sensor event message
 @details This message is used by the DA test sensor to send the test status
 to the client. This includes PASS/FAIL status and any relevant explanations,
 if applicable. */
typedef struct _sns_da_test_event {
    /* @brief This field contains the status returned from the DA test sensor. */
    pb_callback_t test_event;
} sns_da_test_event;

/* @brief DA test sensor log message
 @details This message is used by DA test sensor to log all test related
 statistics at the end of a test. */
typedef struct _sns_da_test_log {
    /* @brief Time elapsed between the start streaming request time and the time
 when the first sample was received. */
    uint64_t time_to_first_event;
    /* @brief Time elapsed between the streaming stop request time and the time
 when the last sample was received. */
    int32_t time_to_last_event;
    /* @brief Timestamp when the last sample was received. */
    uint64_t sample_ts;
    /* @brief Total number of samples received. */
    uint32_t total_samples;
    /* @brief Average time delta between samples. */
    uint32_t avg_delta;
    /* @brief This is a deprecated field. The sample rate received in the
 SNS_STD_SENSOR_PHYSICAL_CONFIG_EVENT config event. */
    int32_t recvd_phy_config_sample_rate;
    /* @brief Random seed used by the DA test sensor. */
    bool has_random_seed_used;
    uint64_t random_seed_used;
    /* @brief The number of requests sent out by the DA test sensor. */
    bool has_num_request_sent;
    uint32_t num_request_sent;
    /* @brief Timestamp when the first sample was received. */
    bool has_first_sample_timestamp;
    uint64_t first_sample_timestamp;
    /* @brief The sample rate received in the SNS_STD_SENSOR_PHYSICAL_CONFIG_EVENT
 config event. */
    bool has_phy_config_sample_rate;
    float phy_config_sample_rate;
} sns_da_test_log;

/* @brief Opaque Payload
 @details This message defines the fields for an encoded payload. */
typedef struct _sns_da_test_opaque_payload {
    pb_callback_t payload;
} sns_da_test_opaque_payload;

/* @brief DA test sensor broadcast event message
 @details This message is used by the DA test sensor to broadcast the request
 sent to the sensor under test, or the event received from the sensor under test. */
typedef struct _sns_da_test_broadcast_event {
    /* @brief SUID of sensor under test */
    sns_std_suid suid;
    /* @brief Message ID of the sensor request or event. */
    uint32_t message_id;
    /* @brief Timestamp associated with the sensor request or event. */
    uint64_t timestamp;
    /* @brief Data stream associated with the sensor request or event. */
    uint64_t stream_id;
    /* @brief Encoded event from the sensor under test, as defined in the
 sensor's API. */
    bool has_opaque_payload;
    sns_da_test_opaque_payload opaque_payload;
    /* @brief Request sent to the sensor under test, as defined in sns_std.proto. */
    bool has_request_payload;
    sns_std_request request_payload;
} sns_da_test_broadcast_event;


#ifdef __cplusplus
extern "C" {
#endif

/* Helper constants for enums */
#define _sns_da_test_msgid_MIN SNS_DA_TEST_MSGID_SNS_DA_TEST_REQ
#define _sns_da_test_msgid_MAX SNS_DA_TEST_MSGID_SNS_DA_TEST_EVENT
#define _sns_da_test_msgid_ARRAYSIZE ((sns_da_test_msgid)(SNS_DA_TEST_MSGID_SNS_DA_TEST_EVENT+1))
#define sns_da_test_msgid_SNS_DA_TEST_MSGID_SNS_DA_TEST_REQ SNS_DA_TEST_MSGID_SNS_DA_TEST_REQ
#define sns_da_test_msgid_SNS_DA_TEST_MSGID_SNS_DA_TEST_LOG SNS_DA_TEST_MSGID_SNS_DA_TEST_LOG
#define sns_da_test_msgid_SNS_DA_TEST_MSGID_SNS_DA_TEST_BROADCAST_EVENT SNS_DA_TEST_MSGID_SNS_DA_TEST_BROADCAST_EVENT
#define sns_da_test_msgid_SNS_DA_TEST_MSGID_SNS_DA_TEST_EVENT SNS_DA_TEST_MSGID_SNS_DA_TEST_EVENT







/* Initializer values for message structs */
#define sns_da_test_req_init_default             {{{NULL}, NULL}}
#define sns_da_test_event_init_default           {{{NULL}, NULL}}
#define sns_da_test_log_init_default             {0, 0, 0, 0, 0, 0, false, 0, false, 0, false, 0, false, 0}
#define sns_da_test_opaque_payload_init_default  {{{NULL}, NULL}}
#define sns_da_test_broadcast_event_init_default {sns_std_suid_init_default, 0, 0, 0, false, sns_da_test_opaque_payload_init_default, false, sns_std_request_init_default}
#define sns_da_test_req_init_zero                {{{NULL}, NULL}}
#define sns_da_test_event_init_zero              {{{NULL}, NULL}}
#define sns_da_test_log_init_zero                {0, 0, 0, 0, 0, 0, false, 0, false, 0, false, 0, false, 0}
#define sns_da_test_opaque_payload_init_zero     {{{NULL}, NULL}}
#define sns_da_test_broadcast_event_init_zero    {sns_std_suid_init_zero, 0, 0, 0, false, sns_da_test_opaque_payload_init_zero, false, sns_std_request_init_zero}

/* Field tags (for use in manual encoding/decoding) */
#define sns_da_test_req_test_args_tag            1
#define sns_da_test_event_test_event_tag         1
#define sns_da_test_log_time_to_first_event_tag  1
#define sns_da_test_log_time_to_last_event_tag   2
#define sns_da_test_log_sample_ts_tag            3
#define sns_da_test_log_total_samples_tag        4
#define sns_da_test_log_avg_delta_tag            5
#define sns_da_test_log_recvd_phy_config_sample_rate_tag 6
#define sns_da_test_log_random_seed_used_tag     7
#define sns_da_test_log_num_request_sent_tag     8
#define sns_da_test_log_first_sample_timestamp_tag 9
#define sns_da_test_log_phy_config_sample_rate_tag 10
#define sns_da_test_opaque_payload_payload_tag   1
#define sns_da_test_broadcast_event_suid_tag     1
#define sns_da_test_broadcast_event_message_id_tag 2
#define sns_da_test_broadcast_event_timestamp_tag 3
#define sns_da_test_broadcast_event_stream_id_tag 4
#define sns_da_test_broadcast_event_opaque_payload_tag 100
#define sns_da_test_broadcast_event_request_payload_tag 101

/* Struct field encoding specification for nanopb */
#define sns_da_test_req_FIELDLIST(X, a) \
X(a, CALLBACK, OPTIONAL, STRING,   test_args,         1)
#define sns_da_test_req_CALLBACK pb_default_field_callback
#define sns_da_test_req_DEFAULT NULL

#define sns_da_test_event_FIELDLIST(X, a) \
X(a, CALLBACK, OPTIONAL, STRING,   test_event,        1)
#define sns_da_test_event_CALLBACK pb_default_field_callback
#define sns_da_test_event_DEFAULT NULL

#define sns_da_test_log_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, UINT64,   time_to_first_event,   1) \
X(a, STATIC,   REQUIRED, SFIXED32, time_to_last_event,   2) \
X(a, STATIC,   REQUIRED, UINT64,   sample_ts,         3) \
X(a, STATIC,   REQUIRED, UINT32,   total_samples,     4) \
X(a, STATIC,   REQUIRED, UINT32,   avg_delta,         5) \
X(a, STATIC,   REQUIRED, SFIXED32, recvd_phy_config_sample_rate,   6) \
X(a, STATIC,   OPTIONAL, UINT64,   random_seed_used,   7) \
X(a, STATIC,   OPTIONAL, UINT32,   num_request_sent,   8) \
X(a, STATIC,   OPTIONAL, UINT64,   first_sample_timestamp,   9) \
X(a, STATIC,   OPTIONAL, FLOAT,    phy_config_sample_rate,  10)
#define sns_da_test_log_CALLBACK NULL
#define sns_da_test_log_DEFAULT NULL

#define sns_da_test_opaque_payload_FIELDLIST(X, a) \
X(a, CALLBACK, REQUIRED, BYTES,    payload,           1)
#define sns_da_test_opaque_payload_CALLBACK pb_default_field_callback
#define sns_da_test_opaque_payload_DEFAULT NULL

#define sns_da_test_broadcast_event_FIELDLIST(X, a) \
X(a, STATIC,   REQUIRED, MESSAGE,  suid,              1) \
X(a, STATIC,   REQUIRED, FIXED32,  message_id,        2) \
X(a, STATIC,   REQUIRED, FIXED64,  timestamp,         3) \
X(a, STATIC,   REQUIRED, FIXED64,  stream_id,         4) \
X(a, STATIC,   OPTIONAL, MESSAGE,  opaque_payload,  100) \
X(a, STATIC,   OPTIONAL, MESSAGE,  request_payload, 101)
#define sns_da_test_broadcast_event_CALLBACK NULL
#define sns_da_test_broadcast_event_DEFAULT NULL
#define sns_da_test_broadcast_event_suid_MSGTYPE sns_std_suid
#define sns_da_test_broadcast_event_opaque_payload_MSGTYPE sns_da_test_opaque_payload
#define sns_da_test_broadcast_event_request_payload_MSGTYPE sns_std_request

extern const pb_msgdesc_t sns_da_test_req_msg;
extern const pb_msgdesc_t sns_da_test_event_msg;
extern const pb_msgdesc_t sns_da_test_log_msg;
extern const pb_msgdesc_t sns_da_test_opaque_payload_msg;
extern const pb_msgdesc_t sns_da_test_broadcast_event_msg;

/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
#define sns_da_test_req_fields &sns_da_test_req_msg
#define sns_da_test_event_fields &sns_da_test_event_msg
#define sns_da_test_log_fields &sns_da_test_log_msg
#define sns_da_test_opaque_payload_fields &sns_da_test_opaque_payload_msg
#define sns_da_test_broadcast_event_fields &sns_da_test_broadcast_event_msg

/* Maximum encoded size of messages (where known) */
/* sns_da_test_req_size depends on runtime parameters */
/* sns_da_test_event_size depends on runtime parameters */
/* sns_da_test_opaque_payload_size depends on runtime parameters */
/* sns_da_test_broadcast_event_size depends on runtime parameters */
#define SNS_DA_TEST_PB_H_MAX_SIZE                sns_da_test_log_size
#define sns_da_test_log_size                     77

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

#endif
