Nanopb protobuf learning

Install tool software:

$ sudo apt-get install protoc // Generate .pb file from proto
$ sudo apt-get install python // Use official python The script generates the c and h files that can be used from the pb file

It is best to use the vi compiler under linux to write proto File, the proto file compiled in other compilation environments (such as the text editor of win) may be converted into a c/h file. The error is reported because of the encoding format. Some editing environments will have a special character at the beginning of the file, which may not be recognized.

Generate code

$ protoc -o message.pb message.proto
$ python nanopb/generator/nanopb_generator.py message.pb

Reference Article

nanopb protobuf study notes
Nanopb-protocol buffers with small code size
Using protobuf in embedded devices
Using protobuf in embedded devices
Protobuf installation and nanopb Simple examples
nanopb analysis and instructions for use

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 2473 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.