Closed wanggujin closed 3 months ago
这段代码其实是fastrtps(fastdds)的idl生成工具生成的,可以去fastcdr的git里看看它序列化的原理
Yes, it is true, but I am not sure whether these methods are automatically generated.
Fastdds uses IDL files to define messages, and then generates C++ files through Fast DDS-Gen
If you have time, we can try to reproduce it.
I also don't know if these code are automatically generated and i can't repduce it. Because i don't know which version of the fast-dds-gen to use and there is no idl files in apollo repo. @daohu527
Apollo 使用的是fastrtps-1.5.0 可以根据underlay_message.h反推得到原始idl的内容:
struct UnderlayMessage { long timestamp; long seq; string data; string datatype; };
我尝试使用配套的fastrtpsgen重新生成了代码,内容基本是相同的。
版本: r8.0.0 平台: x86_64
请问,这两个函数中的运算是什么含义?每一次计算,是什么意思?