daohu527/cyber_record

how to add custom message type

HuangVictorAuto opened this issue · 2 comments

Hi, thanks for your great work on the offline cyber record. I want to add some custom message type, how can I make it work?

what do you mean by custom message type?

read

the message metadata are in the record file itself, if you want to read the message, cyber_record has already done this part of the work.

write

If you want to write some custom messages to create a record file, you can follow these steps

  1. create a proto file for the custom message
  2. compile the proto file to python protoc -I=$SRC_DIR --python_out=$DST_DIR $SRC_DIR/your_message.proto
  3. Fill data into messages in python and use the api provided by cyber_record to write messages

thanks for your quick reply, after some thought, I also choose your proposed method to write custom message to cyber_record.