|
@@ -0,0 +1,159 @@
|
|
|
|
|
+/* Automatically generated nanopb header */
|
|
|
|
|
+/* Generated by nanopb-0.4.7-dev */
|
|
|
|
|
+
|
|
|
|
|
+#ifndef PB_PB_SMARTKNOB_PB_H_INCLUDED
|
|
|
|
|
+#define PB_PB_SMARTKNOB_PB_H_INCLUDED
|
|
|
|
|
+#include <pb.h>
|
|
|
|
|
+
|
|
|
|
|
+#if PB_PROTO_HEADER_VERSION != 40
|
|
|
|
|
+#error Regenerate this file with the current version of nanopb generator.
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
+/* Struct definitions */
|
|
|
|
|
+typedef struct _PB_RequestState {
|
|
|
|
|
+ char dummy_field;
|
|
|
|
|
+} PB_RequestState;
|
|
|
|
|
+
|
|
|
|
|
+typedef struct _PB_SmartKnobConfig {
|
|
|
|
|
+ char dummy_field;
|
|
|
|
|
+} PB_SmartKnobConfig;
|
|
|
|
|
+
|
|
|
|
|
+typedef struct _PB_SmartKnobState {
|
|
|
|
|
+ char dummy_field;
|
|
|
|
|
+} PB_SmartKnobState;
|
|
|
|
|
+
|
|
|
|
|
+typedef struct _PB_Ack {
|
|
|
|
|
+ uint32_t nonce;
|
|
|
|
|
+} PB_Ack;
|
|
|
|
|
+
|
|
|
|
|
+typedef struct _PB_Log {
|
|
|
|
|
+ char msg[256];
|
|
|
|
|
+} PB_Log;
|
|
|
|
|
+
|
|
|
|
|
+/* Message TO the Smartknob from the USB host */
|
|
|
|
|
+typedef struct _PB_ToSmartknob {
|
|
|
|
|
+ uint32_t nonce;
|
|
|
|
|
+ pb_size_t which_payload;
|
|
|
|
|
+ union {
|
|
|
|
|
+ PB_RequestState request_state;
|
|
|
|
|
+ PB_SmartKnobConfig smartknob_config;
|
|
|
|
|
+ } payload;
|
|
|
|
|
+} PB_ToSmartknob;
|
|
|
|
|
+
|
|
|
|
|
+/* Message FROM the SmartKnob to USB host */
|
|
|
|
|
+typedef struct _PB_FromSmartKnob {
|
|
|
|
|
+ pb_size_t which_payload;
|
|
|
|
|
+ union {
|
|
|
|
|
+ PB_Ack ack;
|
|
|
|
|
+ PB_Log log;
|
|
|
|
|
+ PB_SmartKnobState smartknob_state;
|
|
|
|
|
+ } payload;
|
|
|
|
|
+} PB_FromSmartKnob;
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+#ifdef __cplusplus
|
|
|
|
|
+extern "C" {
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
+/* Initializer values for message structs */
|
|
|
|
|
+#define PB_FromSmartKnob_init_default {0, {PB_Ack_init_default}}
|
|
|
|
|
+#define PB_Ack_init_default {0}
|
|
|
|
|
+#define PB_Log_init_default {""}
|
|
|
|
|
+#define PB_SmartKnobState_init_default {0}
|
|
|
|
|
+#define PB_ToSmartknob_init_default {0, 0, {PB_RequestState_init_default}}
|
|
|
|
|
+#define PB_SmartKnobConfig_init_default {0}
|
|
|
|
|
+#define PB_RequestState_init_default {0}
|
|
|
|
|
+#define PB_FromSmartKnob_init_zero {0, {PB_Ack_init_zero}}
|
|
|
|
|
+#define PB_Ack_init_zero {0}
|
|
|
|
|
+#define PB_Log_init_zero {""}
|
|
|
|
|
+#define PB_SmartKnobState_init_zero {0}
|
|
|
|
|
+#define PB_ToSmartknob_init_zero {0, 0, {PB_RequestState_init_zero}}
|
|
|
|
|
+#define PB_SmartKnobConfig_init_zero {0}
|
|
|
|
|
+#define PB_RequestState_init_zero {0}
|
|
|
|
|
+
|
|
|
|
|
+/* Field tags (for use in manual encoding/decoding) */
|
|
|
|
|
+#define PB_Ack_nonce_tag 1
|
|
|
|
|
+#define PB_Log_msg_tag 1
|
|
|
|
|
+#define PB_ToSmartknob_nonce_tag 1
|
|
|
|
|
+#define PB_ToSmartknob_request_state_tag 2
|
|
|
|
|
+#define PB_ToSmartknob_smartknob_config_tag 3
|
|
|
|
|
+#define PB_FromSmartKnob_ack_tag 1
|
|
|
|
|
+#define PB_FromSmartKnob_log_tag 2
|
|
|
|
|
+#define PB_FromSmartKnob_smartknob_state_tag 3
|
|
|
|
|
+
|
|
|
|
|
+/* Struct field encoding specification for nanopb */
|
|
|
|
|
+#define PB_FromSmartKnob_FIELDLIST(X, a) \
|
|
|
|
|
+X(a, STATIC, ONEOF, MESSAGE, (payload,ack,payload.ack), 1) \
|
|
|
|
|
+X(a, STATIC, ONEOF, MESSAGE, (payload,log,payload.log), 2) \
|
|
|
|
|
+X(a, STATIC, ONEOF, MESSAGE, (payload,smartknob_state,payload.smartknob_state), 3)
|
|
|
|
|
+#define PB_FromSmartKnob_CALLBACK NULL
|
|
|
|
|
+#define PB_FromSmartKnob_DEFAULT NULL
|
|
|
|
|
+#define PB_FromSmartKnob_payload_ack_MSGTYPE PB_Ack
|
|
|
|
|
+#define PB_FromSmartKnob_payload_log_MSGTYPE PB_Log
|
|
|
|
|
+#define PB_FromSmartKnob_payload_smartknob_state_MSGTYPE PB_SmartKnobState
|
|
|
|
|
+
|
|
|
|
|
+#define PB_Ack_FIELDLIST(X, a) \
|
|
|
|
|
+X(a, STATIC, SINGULAR, UINT32, nonce, 1)
|
|
|
|
|
+#define PB_Ack_CALLBACK NULL
|
|
|
|
|
+#define PB_Ack_DEFAULT NULL
|
|
|
|
|
+
|
|
|
|
|
+#define PB_Log_FIELDLIST(X, a) \
|
|
|
|
|
+X(a, STATIC, SINGULAR, STRING, msg, 1)
|
|
|
|
|
+#define PB_Log_CALLBACK NULL
|
|
|
|
|
+#define PB_Log_DEFAULT NULL
|
|
|
|
|
+
|
|
|
|
|
+#define PB_SmartKnobState_FIELDLIST(X, a) \
|
|
|
|
|
+
|
|
|
|
|
+#define PB_SmartKnobState_CALLBACK NULL
|
|
|
|
|
+#define PB_SmartKnobState_DEFAULT NULL
|
|
|
|
|
+
|
|
|
|
|
+#define PB_ToSmartknob_FIELDLIST(X, a) \
|
|
|
|
|
+X(a, STATIC, SINGULAR, UINT32, nonce, 1) \
|
|
|
|
|
+X(a, STATIC, ONEOF, MESSAGE, (payload,request_state,payload.request_state), 2) \
|
|
|
|
|
+X(a, STATIC, ONEOF, MESSAGE, (payload,smartknob_config,payload.smartknob_config), 3)
|
|
|
|
|
+#define PB_ToSmartknob_CALLBACK NULL
|
|
|
|
|
+#define PB_ToSmartknob_DEFAULT NULL
|
|
|
|
|
+#define PB_ToSmartknob_payload_request_state_MSGTYPE PB_RequestState
|
|
|
|
|
+#define PB_ToSmartknob_payload_smartknob_config_MSGTYPE PB_SmartKnobConfig
|
|
|
|
|
+
|
|
|
|
|
+#define PB_SmartKnobConfig_FIELDLIST(X, a) \
|
|
|
|
|
+
|
|
|
|
|
+#define PB_SmartKnobConfig_CALLBACK NULL
|
|
|
|
|
+#define PB_SmartKnobConfig_DEFAULT NULL
|
|
|
|
|
+
|
|
|
|
|
+#define PB_RequestState_FIELDLIST(X, a) \
|
|
|
|
|
+
|
|
|
|
|
+#define PB_RequestState_CALLBACK NULL
|
|
|
|
|
+#define PB_RequestState_DEFAULT NULL
|
|
|
|
|
+
|
|
|
|
|
+extern const pb_msgdesc_t PB_FromSmartKnob_msg;
|
|
|
|
|
+extern const pb_msgdesc_t PB_Ack_msg;
|
|
|
|
|
+extern const pb_msgdesc_t PB_Log_msg;
|
|
|
|
|
+extern const pb_msgdesc_t PB_SmartKnobState_msg;
|
|
|
|
|
+extern const pb_msgdesc_t PB_ToSmartknob_msg;
|
|
|
|
|
+extern const pb_msgdesc_t PB_SmartKnobConfig_msg;
|
|
|
|
|
+extern const pb_msgdesc_t PB_RequestState_msg;
|
|
|
|
|
+
|
|
|
|
|
+/* Defines for backwards compatibility with code written before nanopb-0.4.0 */
|
|
|
|
|
+#define PB_FromSmartKnob_fields &PB_FromSmartKnob_msg
|
|
|
|
|
+#define PB_Ack_fields &PB_Ack_msg
|
|
|
|
|
+#define PB_Log_fields &PB_Log_msg
|
|
|
|
|
+#define PB_SmartKnobState_fields &PB_SmartKnobState_msg
|
|
|
|
|
+#define PB_ToSmartknob_fields &PB_ToSmartknob_msg
|
|
|
|
|
+#define PB_SmartKnobConfig_fields &PB_SmartKnobConfig_msg
|
|
|
|
|
+#define PB_RequestState_fields &PB_RequestState_msg
|
|
|
|
|
+
|
|
|
|
|
+/* Maximum encoded size of messages (where known) */
|
|
|
|
|
+#define PB_Ack_size 6
|
|
|
|
|
+#define PB_FromSmartKnob_size 261
|
|
|
|
|
+#define PB_Log_size 258
|
|
|
|
|
+#define PB_RequestState_size 0
|
|
|
|
|
+#define PB_SmartKnobConfig_size 0
|
|
|
|
|
+#define PB_SmartKnobState_size 0
|
|
|
|
|
+#define PB_ToSmartknob_size 8
|
|
|
|
|
+
|
|
|
|
|
+#ifdef __cplusplus
|
|
|
|
|
+} /* extern "C" */
|
|
|
|
|
+#endif
|
|
|
|
|
+
|
|
|
|
|
+#endif
|