Commit 9e93214
committed
feat(LibCarla/ros2): add GenericCdrPubSubType, wire FastDDS middleware to CDR, add 6 tests
Replace 30 fastddsgen-generated PubSubType classes (and FastDDSTypeMap.h) with
a single GenericCdrPubSubType<T> template that implements TopicDataType by
delegating serialize()/deserialize() to CdrSerialization.h, and type_name()/
m_typeSize to CdrTopicInfo<T>.
Rewrite FastDDSPublisherMiddleware and FastDDSSubscriberMiddleware to use
GenericCdrPubSubType instead of FastDDSTypeMap. Remove to_fastdds()/from_fastdds()
conversion calls. Publishers now pass the POD msg pointer directly to
DataWriter::write(); subscribers receive CDR payloads directly into _message_ptr.
Add 6 generic_cdr_pubsubtype tests covering: type name contract, m_typeSize,
serialize/deserialize round-trip via SerializedPayload_t (fixed-size and string
types), createData/deleteData, and getKey(). Update cmake/test/CMakeLists.txt
to also link libfastrtps.a and libfoonathan_memory (required by TopicDataType
static initializers). Server test count: 111 to 117.1 parent 5a9dd3b commit 9e93214
File tree
5 files changed
+118
-239
lines changed- LibCarla
- cmake/test
- source
- carla/ros2/dds/fastdds
- test/server
5 files changed
+118
-239
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
58 | | - | |
59 | | - | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| 63 | + | |
63 | 64 | | |
| 65 | + | |
64 | 66 | | |
65 | 67 | | |
66 | 68 | | |
| |||
Lines changed: 7 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | 41 | | |
45 | 42 | | |
46 | 43 | | |
| |||
108 | 105 | | |
109 | 106 | | |
110 | 107 | | |
111 | | - | |
112 | | - | |
113 | 108 | | |
114 | | - | |
| 109 | + | |
115 | 110 | | |
116 | 111 | | |
117 | 112 | | |
| |||
133 | 128 | | |
134 | 129 | | |
135 | 130 | | |
136 | | - | |
| 131 | + | |
137 | 132 | | |
138 | | - | |
139 | | - | |
140 | | - | |
| 133 | + | |
| 134 | + | |
141 | 135 | | |
142 | 136 | | |
143 | 137 | | |
| |||
Lines changed: 7 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
| 34 | + | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | 42 | | |
46 | 43 | | |
47 | 44 | | |
| |||
51 | 48 | | |
52 | 49 | | |
53 | 50 | | |
54 | | - | |
| 51 | + | |
55 | 52 | | |
56 | | - | |
57 | 53 | | |
58 | 54 | | |
59 | 55 | | |
| |||
137 | 133 | | |
138 | 134 | | |
139 | 135 | | |
140 | | - | |
| 136 | + | |
141 | 137 | | |
142 | | - | |
143 | | - | |
144 | | - | |
| 138 | + | |
| 139 | + | |
145 | 140 | | |
146 | 141 | | |
147 | 142 | | |
| |||
This file was deleted.
0 commit comments