proto.sh 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # $SRC_DIR: .proto 所在的源目录
  2. # --cpp_out: 生成 c++ 代码
  3. # $DST_DIR: 生成代码的目标目录
  4. # xxx.proto: 要针对哪个 proto 文件生成接口代码
  5. # protoc -I=$SRC_DIR --cpp_out=$DST_DIR $SRC_DIR/xxx.proto
  6. if [ -z "$1" ]; then
  7. echo "usage: $0 no $1"
  8. exit 0
  9. fi
  10. # exit 0
  11. echo "proto run path: ""$1"
  12. # include 基础类mqtt配置
  13. protoc -I="$1/include/pahoc" mqtt_async.proto --cpp_out="$1/include/pahoc"
  14. # # 算法优化的相关定义
  15. # protoc -I="$1/Modules/AlgWheelDetect" define.proto --cpp_out="$1/Modules/AlgWheelDetect"
  16. # # 算法测试的相关定义
  17. # protoc -I="$1/Modules/AlgAddTest" define.proto --cpp_out="$1/Modules/AlgAddTest"
  18. # message
  19. protoc -I="$1/include/message" measure_message.proto --cpp_out="$1/include/message"
  20. protoc -I="$1/include/message" message.proto --cpp_out="$1/include/message"
  21. protoc -I="$1/include/message" message_base.proto --cpp_out="$1/include/message"
  22. protoc -I="$1/include/message" central_control_message.proto --cpp_out="$1/include/message"
  23. protoc -I="$1/include/message" dispatch_control.proto --cpp_out="$1/include/message"
  24. protoc -I="$1/include/message" dispatch_message.proto --cpp_out="$1/include/message"
  25. protoc -I="$1/include/message" log_process.proto --cpp_out="$1/include/message"
  26. protoc -I="$1/include/message" measure_message.proto --cpp_out="$1/include/message"
  27. protoc -I="$1/include/message" message.proto --cpp_out="$1/include/message"
  28. protoc -I="$1/include/message" notify_message.proto --cpp_out="$1/include/message"
  29. protoc -I="$1/include/message" parkspace_allocation_message.proto --cpp_out="$1/include/message"
  30. protoc -I="$1/include/message" process_message.proto --cpp_out="$1/include/message"
  31. protoc -I="$1/include/message" singlechip_msg.proto --cpp_out="$1/include/message"
  32. protoc -I="$1/include/message" terminal_message.proto --cpp_out="$1/include/message"
  33. protoc -I="$1/include/message" UnNormalized_module_message.proto --cpp_out="$1/include/message"
  34. # rabbitmq
  35. protoc -I="$1/include/rabbitmq" rabbitmq.proto --cpp_out="$1/include/rabbitmq"
  36. # 测量节点
  37. protoc -I="$1/Modules/MeasureNode/velodyne_lidar" velodyne_config.proto --cpp_out="$1/Modules/MeasureNode/velodyne_lidar"
  38. protoc -I="$1/Modules/MeasureNode/communication" communication.proto --cpp_out="$1/Modules/MeasureNode/communication"
  39. protoc -I="$1/Modules/MeasureNode/rabbitmq" rabbitmq.proto --cpp_out="$1/Modules/MeasureNode/rabbitmq"
  40. protoc -I="$1/Modules/MeasureNode/verify" hardware_limit.proto --cpp_out="$1/Modules/MeasureNode/verify"
  41. protoc -I="$1/Modules/MeasureNode/wanji_lidar" wj_lidar_conf.proto --cpp_out="$1/Modules/MeasureNode/wanji_lidar"
  42. # 测量节点测试
  43. protoc -I="$1/Modules/MeasureNode/velodyne_lidar" velodyne_config.proto --cpp_out="$1/Modules/MeasureNodeAlgTest"