Add protobuf versioning (#954)

* Add protobuf versioning
* Add protobuf version unit test
* Change pb version providing
* Remove redundant 'call'
This commit is contained in:
Albert Kharisov
2022-01-12 17:12:40 +04:00
committed by GitHub
parent 1d31000516
commit a0c16e8a19
13 changed files with 164 additions and 34 deletions

View File

@@ -96,6 +96,8 @@ typedef struct _PB_Main {
PB_System_GetDateTimeResponse system_get_datetime_response;
PB_System_SetDateTimeRequest system_set_datetime_request;
PB_System_PlayAudiovisualAlertRequest system_play_audiovisual_alert_request;
PB_System_ProtobufVersionRequest system_protobuf_version_request;
PB_System_ProtobufVersionResponse system_protobuf_version_response;
} content;
} PB_Main;
@@ -157,6 +159,8 @@ extern "C" {
#define PB_Main_system_get_datetime_response_tag 36
#define PB_Main_system_set_datetime_request_tag 37
#define PB_Main_system_play_audiovisual_alert_request_tag 38
#define PB_Main_system_protobuf_version_request_tag 39
#define PB_Main_system_protobuf_version_response_tag 40
/* Struct field encoding specification for nanopb */
#define PB_Empty_FIELDLIST(X, a) \
@@ -207,7 +211,9 @@ X(a, STATIC, ONEOF, MSG_W_CB, (content,system_factory_reset_request,content
X(a, STATIC, ONEOF, MSG_W_CB, (content,system_get_datetime_request,content.system_get_datetime_request), 35) \
X(a, STATIC, ONEOF, MSG_W_CB, (content,system_get_datetime_response,content.system_get_datetime_response), 36) \
X(a, STATIC, ONEOF, MSG_W_CB, (content,system_set_datetime_request,content.system_set_datetime_request), 37) \
X(a, STATIC, ONEOF, MSG_W_CB, (content,system_play_audiovisual_alert_request,content.system_play_audiovisual_alert_request), 38)
X(a, STATIC, ONEOF, MSG_W_CB, (content,system_play_audiovisual_alert_request,content.system_play_audiovisual_alert_request), 38) \
X(a, STATIC, ONEOF, MSG_W_CB, (content,system_protobuf_version_request,content.system_protobuf_version_request), 39) \
X(a, STATIC, ONEOF, MSG_W_CB, (content,system_protobuf_version_response,content.system_protobuf_version_response), 40)
#define PB_Main_CALLBACK NULL
#define PB_Main_DEFAULT NULL
#define PB_Main_content_empty_MSGTYPE PB_Empty
@@ -245,6 +251,8 @@ X(a, STATIC, ONEOF, MSG_W_CB, (content,system_play_audiovisual_alert_reques
#define PB_Main_content_system_get_datetime_response_MSGTYPE PB_System_GetDateTimeResponse
#define PB_Main_content_system_set_datetime_request_MSGTYPE PB_System_SetDateTimeRequest
#define PB_Main_content_system_play_audiovisual_alert_request_MSGTYPE PB_System_PlayAudiovisualAlertRequest
#define PB_Main_content_system_protobuf_version_request_MSGTYPE PB_System_ProtobufVersionRequest
#define PB_Main_content_system_protobuf_version_response_MSGTYPE PB_System_ProtobufVersionResponse
extern const pb_msgdesc_t PB_Empty_msg;
extern const pb_msgdesc_t PB_StopSession_msg;