mirror of
https://github.com/meshtastic/firmware.git
synced 2025-06-21 20:44:47 +00:00
169 lines
7.0 KiB
C
169 lines
7.0 KiB
C
/* Automatically generated nanopb header */
|
|
/* Generated by nanopb-0.4.6 */
|
|
|
|
#ifndef PB_STOREFORWARD_PB_H_INCLUDED
|
|
#define PB_STOREFORWARD_PB_H_INCLUDED
|
|
#include <pb.h>
|
|
|
|
#if PB_PROTO_HEADER_VERSION != 40
|
|
#error Regenerate this file with the current version of nanopb generator.
|
|
#endif
|
|
|
|
/* Enum definitions */
|
|
typedef enum _StoreAndForward_RequestResponse {
|
|
StoreAndForward_RequestResponse_UNSET = 0,
|
|
StoreAndForward_RequestResponse_ROUTER_ERROR = 1,
|
|
StoreAndForward_RequestResponse_ROUTER_HEARTBEAT = 2,
|
|
StoreAndForward_RequestResponse_ROUTER_PING = 3,
|
|
StoreAndForward_RequestResponse_ROUTER_PONG = 4,
|
|
StoreAndForward_RequestResponse_ROUTER_BUSY = 5,
|
|
StoreAndForward_RequestResponse_ROUTER_HISTORY = 6,
|
|
StoreAndForward_RequestResponse_CLIENT_ERROR = 101,
|
|
StoreAndForward_RequestResponse_CLIENT_HISTORY = 102,
|
|
StoreAndForward_RequestResponse_CLIENT_STATS = 103,
|
|
StoreAndForward_RequestResponse_CLIENT_PING = 104,
|
|
StoreAndForward_RequestResponse_CLIENT_PONG = 105,
|
|
StoreAndForward_RequestResponse_CLIENT_ABORT = 106
|
|
} StoreAndForward_RequestResponse;
|
|
|
|
/* Struct definitions */
|
|
typedef struct _StoreAndForward_Heartbeat {
|
|
uint32_t period;
|
|
uint32_t secondary;
|
|
} StoreAndForward_Heartbeat;
|
|
|
|
typedef struct _StoreAndForward_History {
|
|
uint32_t history_messages;
|
|
uint32_t window;
|
|
uint32_t last_request;
|
|
} StoreAndForward_History;
|
|
|
|
typedef struct _StoreAndForward_Statistics {
|
|
uint32_t messages_total;
|
|
uint32_t messages_saved;
|
|
uint32_t messages_max;
|
|
uint32_t up_time;
|
|
uint32_t requests;
|
|
uint32_t requests_history;
|
|
bool heartbeat;
|
|
uint32_t return_max;
|
|
uint32_t return_window;
|
|
} StoreAndForward_Statistics;
|
|
|
|
/* TODO: REPLACE */
|
|
typedef struct _StoreAndForward {
|
|
/* TODO: REPLACE */
|
|
StoreAndForward_RequestResponse rr;
|
|
/* TODO: REPLACE */
|
|
bool has_stats;
|
|
StoreAndForward_Statistics stats;
|
|
/* TODO: REPLACE */
|
|
bool has_history;
|
|
StoreAndForward_History history;
|
|
/* TODO: REPLACE */
|
|
bool has_heartbeat;
|
|
StoreAndForward_Heartbeat heartbeat;
|
|
} StoreAndForward;
|
|
|
|
|
|
/* Helper constants for enums */
|
|
#define _StoreAndForward_RequestResponse_MIN StoreAndForward_RequestResponse_UNSET
|
|
#define _StoreAndForward_RequestResponse_MAX StoreAndForward_RequestResponse_CLIENT_ABORT
|
|
#define _StoreAndForward_RequestResponse_ARRAYSIZE ((StoreAndForward_RequestResponse)(StoreAndForward_RequestResponse_CLIENT_ABORT+1))
|
|
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
/* Initializer values for message structs */
|
|
#define StoreAndForward_init_default {_StoreAndForward_RequestResponse_MIN, false, StoreAndForward_Statistics_init_default, false, StoreAndForward_History_init_default, false, StoreAndForward_Heartbeat_init_default}
|
|
#define StoreAndForward_Statistics_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
|
#define StoreAndForward_History_init_default {0, 0, 0}
|
|
#define StoreAndForward_Heartbeat_init_default {0, 0}
|
|
#define StoreAndForward_init_zero {_StoreAndForward_RequestResponse_MIN, false, StoreAndForward_Statistics_init_zero, false, StoreAndForward_History_init_zero, false, StoreAndForward_Heartbeat_init_zero}
|
|
#define StoreAndForward_Statistics_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0}
|
|
#define StoreAndForward_History_init_zero {0, 0, 0}
|
|
#define StoreAndForward_Heartbeat_init_zero {0, 0}
|
|
|
|
/* Field tags (for use in manual encoding/decoding) */
|
|
#define StoreAndForward_Heartbeat_period_tag 1
|
|
#define StoreAndForward_Heartbeat_secondary_tag 2
|
|
#define StoreAndForward_History_history_messages_tag 1
|
|
#define StoreAndForward_History_window_tag 2
|
|
#define StoreAndForward_History_last_request_tag 3
|
|
#define StoreAndForward_Statistics_messages_total_tag 1
|
|
#define StoreAndForward_Statistics_messages_saved_tag 2
|
|
#define StoreAndForward_Statistics_messages_max_tag 3
|
|
#define StoreAndForward_Statistics_up_time_tag 4
|
|
#define StoreAndForward_Statistics_requests_tag 5
|
|
#define StoreAndForward_Statistics_requests_history_tag 6
|
|
#define StoreAndForward_Statistics_heartbeat_tag 7
|
|
#define StoreAndForward_Statistics_return_max_tag 8
|
|
#define StoreAndForward_Statistics_return_window_tag 9
|
|
#define StoreAndForward_rr_tag 1
|
|
#define StoreAndForward_stats_tag 2
|
|
#define StoreAndForward_history_tag 3
|
|
#define StoreAndForward_heartbeat_tag 4
|
|
|
|
/* Struct field encoding specification for nanopb */
|
|
#define StoreAndForward_FIELDLIST(X, a) \
|
|
X(a, STATIC, SINGULAR, UENUM, rr, 1) \
|
|
X(a, STATIC, OPTIONAL, MESSAGE, stats, 2) \
|
|
X(a, STATIC, OPTIONAL, MESSAGE, history, 3) \
|
|
X(a, STATIC, OPTIONAL, MESSAGE, heartbeat, 4)
|
|
#define StoreAndForward_CALLBACK NULL
|
|
#define StoreAndForward_DEFAULT NULL
|
|
#define StoreAndForward_stats_MSGTYPE StoreAndForward_Statistics
|
|
#define StoreAndForward_history_MSGTYPE StoreAndForward_History
|
|
#define StoreAndForward_heartbeat_MSGTYPE StoreAndForward_Heartbeat
|
|
|
|
#define StoreAndForward_Statistics_FIELDLIST(X, a) \
|
|
X(a, STATIC, SINGULAR, UINT32, messages_total, 1) \
|
|
X(a, STATIC, SINGULAR, UINT32, messages_saved, 2) \
|
|
X(a, STATIC, SINGULAR, UINT32, messages_max, 3) \
|
|
X(a, STATIC, SINGULAR, UINT32, up_time, 4) \
|
|
X(a, STATIC, SINGULAR, UINT32, requests, 5) \
|
|
X(a, STATIC, SINGULAR, UINT32, requests_history, 6) \
|
|
X(a, STATIC, SINGULAR, BOOL, heartbeat, 7) \
|
|
X(a, STATIC, SINGULAR, UINT32, return_max, 8) \
|
|
X(a, STATIC, SINGULAR, UINT32, return_window, 9)
|
|
#define StoreAndForward_Statistics_CALLBACK NULL
|
|
#define StoreAndForward_Statistics_DEFAULT NULL
|
|
|
|
#define StoreAndForward_History_FIELDLIST(X, a) \
|
|
X(a, STATIC, SINGULAR, UINT32, history_messages, 1) \
|
|
X(a, STATIC, SINGULAR, UINT32, window, 2) \
|
|
X(a, STATIC, SINGULAR, UINT32, last_request, 3)
|
|
#define StoreAndForward_History_CALLBACK NULL
|
|
#define StoreAndForward_History_DEFAULT NULL
|
|
|
|
#define StoreAndForward_Heartbeat_FIELDLIST(X, a) \
|
|
X(a, STATIC, SINGULAR, UINT32, period, 1) \
|
|
X(a, STATIC, SINGULAR, UINT32, secondary, 2)
|
|
#define StoreAndForward_Heartbeat_CALLBACK NULL
|
|
#define StoreAndForward_Heartbeat_DEFAULT NULL
|
|
|
|
extern const pb_msgdesc_t StoreAndForward_msg;
|
|
extern const pb_msgdesc_t StoreAndForward_Statistics_msg;
|
|
extern const pb_msgdesc_t StoreAndForward_History_msg;
|
|
extern const pb_msgdesc_t StoreAndForward_Heartbeat_msg;
|
|
|
|
/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
|
#define StoreAndForward_fields &StoreAndForward_msg
|
|
#define StoreAndForward_Statistics_fields &StoreAndForward_Statistics_msg
|
|
#define StoreAndForward_History_fields &StoreAndForward_History_msg
|
|
#define StoreAndForward_Heartbeat_fields &StoreAndForward_Heartbeat_msg
|
|
|
|
/* Maximum encoded size of messages (where known) */
|
|
#define StoreAndForward_Heartbeat_size 12
|
|
#define StoreAndForward_History_size 18
|
|
#define StoreAndForward_Statistics_size 50
|
|
#define StoreAndForward_size 88
|
|
|
|
#ifdef __cplusplus
|
|
} /* extern "C" */
|
|
#endif
|
|
|
|
#endif
|