BUILD 10.0 KB
Newer Older
H
hewei03 已提交
1 2
load("//tools:cpplint.bzl", "cpplint")

A
Aaron Xiao 已提交
3
package(default_visibility = ["//visibility:public"])
H
hewei03 已提交
4 5

cc_library(
6 7
    name = "transport",
    srcs = [
8
        "transport.cc",
9 10
    ],
    hdrs = [
11
        "transport.h",
12
    ],
H
hewei03 已提交
13
    deps = [
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
        ":attributes_filler",
        ":history",
        ":hybrid_receiver",
        ":hybrid_transmitter",
        ":intra_dispatcher",
        ":intra_receiver",
        ":intra_transmitter",
        ":participant",
        ":qos_profile_conf",
        ":rtps_dispatcher",
        ":rtps_receiver",
        ":rtps_transmitter",
        ":shm_dispatcher",
        ":shm_receiver",
        ":shm_transmitter",
        ":sub_listener",
        ":underlay_message",
        ":underlay_message_type",
32
        "//cyber/service_discovery:role",
A
Aaron Xiao 已提交
33
        "//cyber/task",
A
Aaron Xiao 已提交
34
        "@fastrtps",
H
hewei03 已提交
35 36 37
    ],
)

38
cc_test(
39
    name = "transport_test",
40
    size = "small",
A
Aaron Xiao 已提交
41
    srcs = ["transport_test.cc"],
42
    deps = [
A
Aaron Xiao 已提交
43
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
44
        "//cyber/proto:unit_test_cc_proto",
45 46 47 48 49 50
        "@gtest",
    ],
)

cc_library(
    name = "endpoint",
A
Aaron Xiao 已提交
51 52
    srcs = ["common/endpoint.cc"],
    hdrs = ["common/endpoint.h"],
53
    deps = [
54
        ":identity",
55 56 57 58 59 60 61
        "//cyber/common:global_data",
        "//cyber/proto:role_attributes_cc_proto",
    ],
)

cc_library(
    name = "identity",
A
Aaron Xiao 已提交
62 63
    srcs = ["common/identity.cc"],
    hdrs = ["common/identity.h"],
64 65 66 67 68
    deps = [
        "//cyber/common:util",
    ],
)

69
cc_test(
70
    name = "common_test",
71 72
    size = "small",
    srcs = [
73
        "common/common_test.cc",
74 75
    ],
    deps = [
G
GoLancer 已提交
76
        "//cyber:cyber_core",
77 78 79 80 81 82
        "@gtest//:main",
    ],
)

cc_library(
    name = "dispatcher",
A
Aaron Xiao 已提交
83 84
    srcs = ["dispatcher/dispatcher.cc"],
    hdrs = ["dispatcher/dispatcher.h"],
85
    deps = [
86 87
        ":listener_handler",
        ":message_info",
88
        "//cyber/proto:role_attributes_cc_proto",
89 90 91 92
    ],
)

cc_test(
93
    name = "dispatcher_test",
94 95
    size = "small",
    srcs = [
96
        "dispatcher/dispatcher_test.cc",
97 98
    ],
    deps = [
A
Aaron Xiao 已提交
99
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
100
        "//cyber/proto:unit_test_cc_proto",
101 102 103 104
        "@gtest//:main",
    ],
)

105 106
cc_library(
    name = "intra_dispatcher",
A
Aaron Xiao 已提交
107 108
    srcs = ["dispatcher/intra_dispatcher.cc"],
    hdrs = ["dispatcher/intra_dispatcher.h"],
109
    deps = [
110
        ":dispatcher",
111
        "//cyber/message:message_traits",
112 113 114 115
        "//cyber/proto:role_attributes_cc_proto",
    ],
)

116
cc_test(
117
    name = "intra_dispatcher_test",
118 119
    size = "small",
    srcs = [
120
        "dispatcher/intra_dispatcher_test.cc",
121 122
    ],
    deps = [
A
Aaron Xiao 已提交
123
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
124
        "//cyber/proto:unit_test_cc_proto",
125 126 127 128
        "@gtest//:main",
    ],
)

129 130
cc_library(
    name = "rtps_dispatcher",
A
Aaron Xiao 已提交
131 132
    srcs = ["dispatcher/rtps_dispatcher.cc"],
    hdrs = ["dispatcher/rtps_dispatcher.h"],
133
    deps = [
134 135 136 137
        ":attributes_filler",
        ":dispatcher",
        ":participant",
        ":sub_listener",
A
Aaron Xiao 已提交
138 139
        "//cyber/message:message_traits",
        "//cyber/proto:role_attributes_cc_proto",
140 141 142
    ],
)

143
cc_test(
144
    name = "rtps_dispatcher_test",
145 146
    size = "small",
    srcs = [
147
        "dispatcher/rtps_dispatcher_test.cc",
148 149
    ],
    deps = [
A
Aaron Xiao 已提交
150
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
151
        "//cyber/proto:unit_test_cc_proto",
152
        "@gtest",
153 154 155
    ],
)

156 157
cc_library(
    name = "shm_dispatcher",
A
Aaron Xiao 已提交
158 159
    srcs = ["dispatcher/shm_dispatcher.cc"],
    hdrs = ["dispatcher/shm_dispatcher.h"],
160
    deps = [
161 162 163 164
        ":dispatcher",
        ":notifier_factory",
        ":readable_info",
        ":segment",
165
        "//cyber/message:message_traits",
A
Aaron Xiao 已提交
166 167
        "//cyber/proto:proto_desc_cc_proto",
        "//cyber/scheduler:scheduler_factory",
168 169 170
    ],
)

171
cc_test(
172
    name = "shm_dispatcher_test",
173
    size = "small",
174 175 176
    srcs = [
        "dispatcher/shm_dispatcher_test.cc",
    ],
177
    deps = [
A
Aaron Xiao 已提交
178
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
179
        "//cyber/proto:unit_test_cc_proto",
180 181 182 183
        "@gtest//:main",
    ],
)

184 185
cc_library(
    name = "history_attributes",
A
Aaron Xiao 已提交
186
    hdrs = ["message/history_attributes.h"],
187 188 189 190
)

cc_library(
    name = "history",
A
Aaron Xiao 已提交
191
    hdrs = ["message/history.h"],
192
    deps = [
193
        ":history_attributes",
194 195 196 197 198
    ],
)

cc_library(
    name = "listener_handler",
A
Aaron Xiao 已提交
199
    hdrs = ["message/listener_handler.h"],
200 201 202 203
)

cc_library(
    name = "message_info",
A
Aaron Xiao 已提交
204 205
    srcs = ["message/message_info.cc"],
    hdrs = ["message/message_info.h"],
206 207
    deps = [
        "//cyber/base:signal",
A
Aaron Xiao 已提交
208
        "//cyber/common",
209 210 211 212 213
        "//cyber/message:raw_message",
        "//cyber/transport:identity",
    ],
)

214
cc_test(
215
    name = "message_test",
216 217
    size = "small",
    srcs = [
218
        "message/message_test.cc",
219 220
    ],
    deps = [
G
GoLancer 已提交
221
        "//cyber:cyber_core",
222 223 224 225
        "@gtest//:main",
    ],
)

226 227
cc_library(
    name = "qos_profile_conf",
A
Aaron Xiao 已提交
228 229
    srcs = ["qos/qos_profile_conf.cc"],
    hdrs = ["qos/qos_profile_conf.h"],
230
    deps = [
231
        ":history",
232 233 234 235 236 237
        "//cyber/proto:qos_profile_cc_proto",
    ],
)

cc_library(
    name = "hybrid_receiver",
A
Aaron Xiao 已提交
238
    hdrs = ["receiver/hybrid_receiver.h"],
239
    deps = [
240
        ":receiver",
241 242 243 244 245
    ],
)

cc_library(
    name = "intra_receiver",
A
Aaron Xiao 已提交
246
    hdrs = ["receiver/intra_receiver.h"],
247
    deps = [
248
        ":receiver",
249 250 251 252 253
    ],
)

cc_library(
    name = "receiver",
A
Aaron Xiao 已提交
254
    hdrs = ["receiver/receiver.h"],
255
    deps = [
256 257 258
        ":endpoint",
        ":history",
        ":message_info",
259 260 261 262 263
    ],
)

cc_library(
    name = "rtps_receiver",
A
Aaron Xiao 已提交
264
    hdrs = ["receiver/rtps_receiver.h"],
265
    deps = [
266
        ":receiver",
267 268 269 270 271
    ],
)

cc_library(
    name = "shm_receiver",
A
Aaron Xiao 已提交
272
    hdrs = ["receiver/shm_receiver.h"],
273
    deps = [
274 275 276
        ":readable_info",
        ":receiver",
        ":segment",
277 278 279 280 281
    ],
)

cc_library(
    name = "attributes_filler",
A
Aaron Xiao 已提交
282 283
    srcs = ["rtps/attributes_filler.cc"],
    hdrs = ["rtps/attributes_filler.h"],
284
    deps = [
285
        ":qos_profile_conf",
286
        "//cyber/common:log",
A
Aaron Xiao 已提交
287
        "@fastrtps",
288 289 290 291 292
    ],
)

cc_library(
    name = "underlay_message",
A
Aaron Xiao 已提交
293 294
    srcs = ["rtps/underlay_message.cc"],
    hdrs = ["rtps/underlay_message.h"],
295
    deps = [
A
Aaron Xiao 已提交
296
        "@fastrtps",
297 298 299 300 301
    ],
)

cc_library(
    name = "participant",
A
Aaron Xiao 已提交
302 303
    srcs = ["rtps/participant.cc"],
    hdrs = ["rtps/participant.h"],
304
    deps = [
305 306
        ":underlay_message",
        ":underlay_message_type",
307 308 309 310 311 312
        "//cyber/common:global_data",
    ],
)

cc_library(
    name = "sub_listener",
A
Aaron Xiao 已提交
313 314
    srcs = ["rtps/sub_listener.cc"],
    hdrs = ["rtps/sub_listener.h"],
315
    deps = [
316 317 318
        ":message_info",
        ":underlay_message",
        ":underlay_message_type",
319 320 321 322 323
    ],
)

cc_library(
    name = "underlay_message_type",
A
Aaron Xiao 已提交
324 325
    srcs = ["rtps/underlay_message_type.cc"],
    hdrs = ["rtps/underlay_message_type.h"],
326
    deps = [
327
        ":underlay_message",
A
Aaron Xiao 已提交
328
        "@fastrtps",
329 330 331
    ],
)

332 333 334
cc_test(
    name = "rtps_test",
    size = "small",
A
Aaron Xiao 已提交
335
    srcs = ["rtps/rtps_test.cc"],
336
    deps = [
G
GoLancer 已提交
337
        "//cyber:cyber_core",
338 339 340 341
        "@gtest//:main",
    ],
)

342 343
cc_library(
    name = "block",
A
Aaron Xiao 已提交
344 345
    srcs = ["shm/block.cc"],
    hdrs = ["shm/block.h"],
346 347 348 349 350 351
    deps = [
        "//cyber/base:atomic_rw_lock",
        "//cyber/common:log",
    ],
)

352 353
cc_library(
    name = "condition_notifier",
A
Aaron Xiao 已提交
354 355
    srcs = ["shm/condition_notifier.cc"],
    hdrs = ["shm/condition_notifier.h"],
356
    deps = [
357
        ":notifier_base",
358 359 360 361 362 363 364 365
        "//cyber/common:global_data",
        "//cyber/common:log",
        "//cyber/common:util",
    ],
)

cc_library(
    name = "multicast_notifier",
A
Aaron Xiao 已提交
366 367
    srcs = ["shm/multicast_notifier.cc"],
    hdrs = ["shm/multicast_notifier.h"],
368
    deps = [
369
        ":notifier_base",
370 371 372 373 374 375 376 377
        "//cyber/common:global_data",
        "//cyber/common:log",
        "//cyber/common:macros",
    ],
)

cc_library(
    name = "notifier_base",
A
Aaron Xiao 已提交
378
    hdrs = ["shm/notifier_base.h"],
379
    deps = [
380
        ":readable_info",
381 382 383 384 385
    ],
)

cc_library(
    name = "notifier_factory",
A
Aaron Xiao 已提交
386 387
    srcs = ["shm/notifier_factory.cc"],
    hdrs = ["shm/notifier_factory.h"],
388
    deps = [
389 390 391
        ":condition_notifier",
        ":multicast_notifier",
        ":notifier_base",
392 393 394 395 396
        "//cyber/common:global_data",
        "//cyber/common:log",
    ],
)

397 398
cc_library(
    name = "readable_info",
A
Aaron Xiao 已提交
399 400
    srcs = ["shm/readable_info.cc"],
    hdrs = ["shm/readable_info.h"],
401 402 403 404 405 406 407
    deps = [
        "//cyber/common:log",
    ],
)

cc_library(
    name = "segment",
A
Aaron Xiao 已提交
408 409
    srcs = ["shm/segment.cc"],
    hdrs = ["shm/segment.h"],
410
    deps = [
411 412 413
        ":block",
        ":shm_conf",
        ":state",
414 415 416 417 418 419 420
        "//cyber/common:log",
        "//cyber/common:util",
    ],
)

cc_library(
    name = "shm_conf",
A
Aaron Xiao 已提交
421 422
    srcs = ["shm/shm_conf.cc"],
    hdrs = ["shm/shm_conf.h"],
423 424 425 426 427 428 429
    deps = [
        "//cyber/common:log",
    ],
)

cc_library(
    name = "state",
A
Aaron Xiao 已提交
430 431
    srcs = ["shm/state.cc"],
    hdrs = ["shm/state.h"],
432 433 434 435
)

cc_library(
    name = "hybrid_transmitter",
A
Aaron Xiao 已提交
436
    hdrs = ["transmitter/hybrid_transmitter.h"],
437
    deps = [
438
        ":transmitter",
439 440 441 442 443
    ],
)

cc_library(
    name = "intra_transmitter",
A
Aaron Xiao 已提交
444
    hdrs = ["transmitter/intra_transmitter.h"],
445
    deps = [
446
        ":transmitter",
447 448 449 450 451
    ],
)

cc_library(
    name = "transmitter",
A
Aaron Xiao 已提交
452
    hdrs = ["transmitter/transmitter.h"],
453
    deps = [
454 455
        ":endpoint",
        ":message_info",
456 457 458 459 460 461
        "//cyber/event:perf_event_cache",
    ],
)

cc_library(
    name = "rtps_transmitter",
A
Aaron Xiao 已提交
462
    hdrs = ["transmitter/rtps_transmitter.h"],
463
    deps = [
464
        ":transmitter",
465 466 467 468 469
    ],
)

cc_library(
    name = "shm_transmitter",
A
Aaron Xiao 已提交
470
    hdrs = ["transmitter/shm_transmitter.h"],
471
    deps = [
472
        ":transmitter",
473 474 475
    ],
)

476
cc_test(
477
    name = "hybrid_transceiver_test",
478
    size = "small",
A
Aaron Xiao 已提交
479
    srcs = ["transceiver/hybrid_transceiver_test.cc"],
480
    deps = [
A
Aaron Xiao 已提交
481
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
482
        "//cyber/proto:unit_test_cc_proto",
483
        "@gtest",
484 485 486 487
    ],
)

cc_test(
488
    name = "intra_transceiver_test",
489
    size = "small",
A
Aaron Xiao 已提交
490
    srcs = ["transceiver/intra_transceiver_test.cc"],
491
    deps = [
A
Aaron Xiao 已提交
492
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
493
        "//cyber/proto:unit_test_cc_proto",
494 495 496 497 498
        "@gtest//:main",
    ],
)

cc_test(
499
    name = "rtps_transceiver_test",
500
    size = "small",
A
Aaron Xiao 已提交
501
    srcs = ["transceiver/rtps_transceiver_test.cc"],
502
    deps = [
A
Aaron Xiao 已提交
503
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
504
        "//cyber/proto:unit_test_cc_proto",
505
        "@gtest",
506 507 508 509
    ],
)

cc_test(
510
    name = "shm_transceiver_test",
511
    size = "small",
A
Aaron Xiao 已提交
512
    srcs = ["transceiver/shm_transceiver_test.cc"],
513
    deps = [
A
Aaron Xiao 已提交
514
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
515
        "//cyber/proto:unit_test_cc_proto",
516
        "@gtest//:main",
517 518 519
    ],
)

H
hewei03 已提交
520
cpplint()