how to add custom message type
HuangVictorAuto opened this issue · 2 comments
HuangVictorAuto commented
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?
daohu527 commented
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
- create a proto file for the custom message
- compile the proto file to python
protoc -I=$SRC_DIR --python_out=$DST_DIR $SRC_DIR/your_message.proto
- Fill data into messages in python and use the api provided by
cyber_record
to write messages
HuangVictorAuto commented
thanks for your quick reply, after some thought, I also choose your proposed method to write custom message to cyber_record.