BUILD 11.8 KB
Newer Older
1
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
H
hewei03 已提交
2 3
load("//tools:cpplint.bzl", "cpplint")

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

cc_library(
7
    name = "transport",
8 9
    srcs = ["transport.cc"],
    hdrs = ["transport.h"],
H
hewei03 已提交
10
    deps = [
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
        ":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",
29
        "//cyber/service_discovery:role",
A
Aaron Xiao 已提交
30
        "//cyber/task",
A
Aaron Xiao 已提交
31
        "@fastrtps",
H
hewei03 已提交
32 33 34
    ],
)

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

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

57 58 59 60 61 62
cc_test(
    name = "endpoint_test",
    size = "small",
    srcs = ["common/endpoint_test.cc"],
    deps = [
        "//cyber:cyber_core",
63
        "@com_google_googletest//:gtest_main",
64 65 66
    ],
)

67 68
cc_library(
    name = "identity",
A
Aaron Xiao 已提交
69 70
    srcs = ["common/identity.cc"],
    hdrs = ["common/identity.h"],
71 72 73 74 75
    deps = [
        "//cyber/common:util",
    ],
)

76 77 78 79 80 81
cc_test(
    name = "identity_test",
    size = "small",
    srcs = ["common/identity_test.cc"],
    deps = [
        "//cyber:cyber_core",
82
        "@com_google_googletest//:gtest_main",
83 84 85
    ],
)

86
cc_test(
87
    name = "common_test",
88
    size = "small",
89
    srcs = ["common/common_test.cc"],
90
    deps = [
G
GoLancer 已提交
91
        "//cyber:cyber_core",
92
        "@com_google_googletest//:gtest_main",
93 94 95 96 97
    ],
)

cc_library(
    name = "dispatcher",
A
Aaron Xiao 已提交
98 99
    srcs = ["dispatcher/dispatcher.cc"],
    hdrs = ["dispatcher/dispatcher.h"],
100
    deps = [
101 102
        ":listener_handler",
        ":message_info",
103
        "//cyber/message:message_traits",
X
Xiangquan Xiao 已提交
104
        "//cyber/proto:role_attributes_cc_proto",
105 106 107 108
    ],
)

cc_test(
109
    name = "dispatcher_test",
110
    size = "small",
111
    srcs = ["dispatcher/dispatcher_test.cc"],
112
    deps = [
A
Aaron Xiao 已提交
113
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
114
        "//cyber/proto:unit_test_cc_proto",
115
        "@com_google_googletest//:gtest_main",
116 117 118
    ],
)

119 120
cc_library(
    name = "intra_dispatcher",
A
Aaron Xiao 已提交
121 122
    srcs = ["dispatcher/intra_dispatcher.cc"],
    hdrs = ["dispatcher/intra_dispatcher.h"],
123
    deps = [
124
        ":dispatcher",
125
        "//cyber/message:message_traits",
126 127 128 129
        "//cyber/proto:role_attributes_cc_proto",
    ],
)

130
cc_test(
131
    name = "intra_dispatcher_test",
132
    size = "small",
133
    srcs = ["dispatcher/intra_dispatcher_test.cc"],
134
    deps = [
A
Aaron Xiao 已提交
135
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
136
        "//cyber/proto:unit_test_cc_proto",
137
        "@com_google_googletest//:gtest_main",
138 139 140
    ],
)

141 142
cc_library(
    name = "rtps_dispatcher",
A
Aaron Xiao 已提交
143 144
    srcs = ["dispatcher/rtps_dispatcher.cc"],
    hdrs = ["dispatcher/rtps_dispatcher.h"],
145
    deps = [
146 147 148 149
        ":attributes_filler",
        ":dispatcher",
        ":participant",
        ":sub_listener",
A
Aaron Xiao 已提交
150 151
        "//cyber/message:message_traits",
        "//cyber/proto:role_attributes_cc_proto",
152 153 154
    ],
)

155
cc_test(
156
    name = "rtps_dispatcher_test",
157
    size = "small",
158
    srcs = ["dispatcher/rtps_dispatcher_test.cc"],
159
    deps = [
A
Aaron Xiao 已提交
160
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
161
        "//cyber/proto:unit_test_cc_proto",
162
        "@com_google_googletest//:gtest",
163 164 165
    ],
)

166 167
cc_library(
    name = "shm_dispatcher",
A
Aaron Xiao 已提交
168 169
    srcs = ["dispatcher/shm_dispatcher.cc"],
    hdrs = ["dispatcher/shm_dispatcher.h"],
170
    deps = [
171 172 173
        ":dispatcher",
        ":notifier_factory",
        ":readable_info",
C
ctwfei 已提交
174
        ":segment_factory",
175
        "//cyber/message:message_traits",
A
Aaron Xiao 已提交
176 177
        "//cyber/proto:proto_desc_cc_proto",
        "//cyber/scheduler:scheduler_factory",
178 179 180
    ],
)

181
cc_test(
182
    name = "shm_dispatcher_test",
183
    size = "small",
184
    srcs = ["dispatcher/shm_dispatcher_test.cc"],
185
    deps = [
A
Aaron Xiao 已提交
186
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
187
        "//cyber/proto:unit_test_cc_proto",
188
        "@com_google_googletest//:gtest_main",
189 190 191
    ],
)

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

cc_library(
    name = "history",
A
Aaron Xiao 已提交
199
    hdrs = ["message/history.h"],
200
    deps = [
201
        ":history_attributes",
202 203 204 205 206
    ],
)

cc_library(
    name = "listener_handler",
A
Aaron Xiao 已提交
207
    hdrs = ["message/listener_handler.h"],
208 209 210 211
)

cc_library(
    name = "message_info",
A
Aaron Xiao 已提交
212 213
    srcs = ["message/message_info.cc"],
    hdrs = ["message/message_info.h"],
214 215
    deps = [
        "//cyber/base:signal",
A
Aaron Xiao 已提交
216
        "//cyber/common",
217 218 219 220 221
        "//cyber/message:raw_message",
        "//cyber/transport:identity",
    ],
)

222 223 224
cc_test(
    name = "message_info_test",
    size = "small",
225
    srcs = ["message/message_info_test.cc"],
226 227
    deps = [
        "//cyber:cyber_core",
228
        "@com_google_googletest//:gtest_main",
229 230 231
    ],
)

232
cc_test(
233
    name = "message_test",
234
    size = "small",
235
    srcs = ["message/message_test.cc"],
236
    deps = [
G
GoLancer 已提交
237
        "//cyber:cyber_core",
238
        "@com_google_googletest//:gtest_main",
239 240 241
    ],
)

242 243
cc_library(
    name = "qos_profile_conf",
A
Aaron Xiao 已提交
244 245
    srcs = ["qos/qos_profile_conf.cc"],
    hdrs = ["qos/qos_profile_conf.h"],
246
    deps = [
247
        ":history",
248 249 250 251 252 253
        "//cyber/proto:qos_profile_cc_proto",
    ],
)

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

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

cc_library(
    name = "receiver",
A
Aaron Xiao 已提交
270
    hdrs = ["receiver/receiver.h"],
271
    deps = [
272 273 274
        ":endpoint",
        ":history",
        ":message_info",
275 276 277 278 279
    ],
)

cc_library(
    name = "rtps_receiver",
A
Aaron Xiao 已提交
280
    hdrs = ["receiver/rtps_receiver.h"],
281
    deps = [
282
        ":receiver",
283 284 285 286 287
    ],
)

cc_library(
    name = "shm_receiver",
A
Aaron Xiao 已提交
288
    hdrs = ["receiver/shm_receiver.h"],
289
    deps = [
290 291
        ":readable_info",
        ":receiver",
292 293 294 295 296
    ],
)

cc_library(
    name = "attributes_filler",
A
Aaron Xiao 已提交
297 298
    srcs = ["rtps/attributes_filler.cc"],
    hdrs = ["rtps/attributes_filler.h"],
299
    deps = [
300
        ":qos_profile_conf",
301
        "//cyber/common:log",
A
Aaron Xiao 已提交
302
        "@fastrtps",
303 304 305 306 307
    ],
)

cc_library(
    name = "underlay_message",
A
Aaron Xiao 已提交
308 309
    srcs = ["rtps/underlay_message.cc"],
    hdrs = ["rtps/underlay_message.h"],
310
    deps = [
311
        "//cyber/common:log",
A
Aaron Xiao 已提交
312
        "@fastrtps",
313 314 315 316 317
    ],
)

cc_library(
    name = "participant",
A
Aaron Xiao 已提交
318 319
    srcs = ["rtps/participant.cc"],
    hdrs = ["rtps/participant.h"],
320
    deps = [
321 322
        ":underlay_message",
        ":underlay_message_type",
323 324 325 326 327 328
        "//cyber/common:global_data",
    ],
)

cc_library(
    name = "sub_listener",
A
Aaron Xiao 已提交
329 330
    srcs = ["rtps/sub_listener.cc"],
    hdrs = ["rtps/sub_listener.h"],
331
    deps = [
332 333 334
        ":message_info",
        ":underlay_message",
        ":underlay_message_type",
335 336 337 338 339
    ],
)

cc_library(
    name = "underlay_message_type",
A
Aaron Xiao 已提交
340 341
    srcs = ["rtps/underlay_message_type.cc"],
    hdrs = ["rtps/underlay_message_type.h"],
342
    deps = [
343
        ":underlay_message",
A
Aaron Xiao 已提交
344
        "@fastrtps",
345 346 347
    ],
)

348 349 350
cc_test(
    name = "rtps_test",
    size = "small",
A
Aaron Xiao 已提交
351
    srcs = ["rtps/rtps_test.cc"],
352
    deps = [
G
GoLancer 已提交
353
        "//cyber:cyber_core",
354
        "@com_google_googletest//:gtest_main",
355 356 357
    ],
)

358 359
cc_library(
    name = "block",
A
Aaron Xiao 已提交
360 361
    srcs = ["shm/block.cc"],
    hdrs = ["shm/block.h"],
362 363 364 365 366 367
    deps = [
        "//cyber/base:atomic_rw_lock",
        "//cyber/common:log",
    ],
)

368 369
cc_library(
    name = "condition_notifier",
A
Aaron Xiao 已提交
370 371
    srcs = ["shm/condition_notifier.cc"],
    hdrs = ["shm/condition_notifier.h"],
372
    deps = [
373
        ":notifier_base",
374 375 376 377 378 379 380 381
        "//cyber/common:global_data",
        "//cyber/common:log",
        "//cyber/common:util",
    ],
)

cc_library(
    name = "multicast_notifier",
A
Aaron Xiao 已提交
382 383
    srcs = ["shm/multicast_notifier.cc"],
    hdrs = ["shm/multicast_notifier.h"],
384
    deps = [
385
        ":notifier_base",
386 387 388 389 390 391 392 393
        "//cyber/common:global_data",
        "//cyber/common:log",
        "//cyber/common:macros",
    ],
)

cc_library(
    name = "notifier_base",
A
Aaron Xiao 已提交
394
    hdrs = ["shm/notifier_base.h"],
395
    deps = [
396
        ":readable_info",
397 398 399 400 401
    ],
)

cc_library(
    name = "notifier_factory",
A
Aaron Xiao 已提交
402 403
    srcs = ["shm/notifier_factory.cc"],
    hdrs = ["shm/notifier_factory.h"],
404
    deps = [
405 406 407
        ":condition_notifier",
        ":multicast_notifier",
        ":notifier_base",
408 409 410 411 412
        "//cyber/common:global_data",
        "//cyber/common:log",
    ],
)

413 414
cc_library(
    name = "readable_info",
A
Aaron Xiao 已提交
415 416
    srcs = ["shm/readable_info.cc"],
    hdrs = ["shm/readable_info.h"],
417 418 419 420 421
    deps = [
        "//cyber/common:log",
    ],
)

C
ctwfei 已提交
422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443
cc_library(
    name = "xsi_segment",
    srcs = ["shm/xsi_segment.cc"],
    hdrs = ["shm/xsi_segment.h"],
    deps = [
        ":segment",
        "//cyber/common:log",
        "//cyber/common:util",
    ],
)

cc_library(
    name = "posix_segment",
    srcs = ["shm/posix_segment.cc"],
    hdrs = ["shm/posix_segment.h"],
    deps = [
        ":segment",
        "//cyber/common:log",
        "//cyber/common:util",
    ],
)

444 445
cc_library(
    name = "segment",
A
Aaron Xiao 已提交
446 447
    srcs = ["shm/segment.cc"],
    hdrs = ["shm/segment.h"],
448
    deps = [
449 450 451
        ":block",
        ":shm_conf",
        ":state",
452 453 454 455 456
        "//cyber/common:log",
        "//cyber/common:util",
    ],
)

C
ctwfei 已提交
457 458 459 460 461 462 463
cc_library(
    name = "segment_factory",
    srcs = ["shm/segment_factory.cc"],
    hdrs = ["shm/segment_factory.h"],
    deps = [
        ":posix_segment",
        ":segment",
X
Xiangquan Xiao 已提交
464 465
        ":xsi_segment",
        "//cyber/common:global_data",
C
ctwfei 已提交
466 467 468 469
        "//cyber/common:log",
    ],
)

470 471
cc_library(
    name = "shm_conf",
A
Aaron Xiao 已提交
472 473
    srcs = ["shm/shm_conf.cc"],
    hdrs = ["shm/shm_conf.h"],
474 475 476 477 478 479 480
    deps = [
        "//cyber/common:log",
    ],
)

cc_library(
    name = "state",
A
Aaron Xiao 已提交
481 482
    srcs = ["shm/state.cc"],
    hdrs = ["shm/state.h"],
483 484 485 486
)

cc_library(
    name = "hybrid_transmitter",
A
Aaron Xiao 已提交
487
    hdrs = ["transmitter/hybrid_transmitter.h"],
488
    deps = [
489
        ":transmitter",
490 491 492 493 494
    ],
)

cc_library(
    name = "intra_transmitter",
A
Aaron Xiao 已提交
495
    hdrs = ["transmitter/intra_transmitter.h"],
496
    deps = [
497
        ":transmitter",
498 499 500 501 502
    ],
)

cc_library(
    name = "transmitter",
A
Aaron Xiao 已提交
503
    hdrs = ["transmitter/transmitter.h"],
504
    deps = [
505 506
        ":endpoint",
        ":message_info",
507 508 509 510 511 512
        "//cyber/event:perf_event_cache",
    ],
)

cc_library(
    name = "rtps_transmitter",
A
Aaron Xiao 已提交
513
    hdrs = ["transmitter/rtps_transmitter.h"],
514
    deps = [
515
        ":transmitter",
516 517 518 519 520
    ],
)

cc_library(
    name = "shm_transmitter",
A
Aaron Xiao 已提交
521
    hdrs = ["transmitter/shm_transmitter.h"],
522
    deps = [
523
        ":transmitter",
524 525 526
    ],
)

527
cc_test(
528
    name = "hybrid_transceiver_test",
529
    size = "small",
A
Aaron Xiao 已提交
530
    srcs = ["transceiver/hybrid_transceiver_test.cc"],
531
    deps = [
A
Aaron Xiao 已提交
532
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
533
        "//cyber/proto:unit_test_cc_proto",
534
        "@com_google_googletest//:gtest",
535 536 537 538
    ],
)

cc_test(
539
    name = "intra_transceiver_test",
540
    size = "small",
A
Aaron Xiao 已提交
541
    srcs = ["transceiver/intra_transceiver_test.cc"],
542
    deps = [
A
Aaron Xiao 已提交
543
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
544
        "//cyber/proto:unit_test_cc_proto",
545
        "@com_google_googletest//:gtest_main",
546 547 548 549
    ],
)

cc_test(
550
    name = "rtps_transceiver_test",
551
    size = "small",
A
Aaron Xiao 已提交
552
    srcs = ["transceiver/rtps_transceiver_test.cc"],
553
    deps = [
A
Aaron Xiao 已提交
554
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
555
        "//cyber/proto:unit_test_cc_proto",
556
        "@com_google_googletest//:gtest",
557 558 559 560
    ],
)

cc_test(
561
    name = "shm_transceiver_test",
562
    size = "small",
A
Aaron Xiao 已提交
563
    srcs = ["transceiver/shm_transceiver_test.cc"],
564
    deps = [
A
Aaron Xiao 已提交
565
        "//cyber:cyber_core",
A
Aaron Xiao 已提交
566
        "//cyber/proto:unit_test_cc_proto",
567
        "@com_google_googletest//:gtest",
568 569 570
    ],
)

571 572 573 574 575 576
cc_test(
    name = "condition_notifier_test",
    size = "small",
    srcs = ["shm/condition_notifier_test.cc"],
    deps = [
        "//cyber:cyber_core",
577
        "@com_google_googletest//:gtest_main",
578 579 580
    ],
)

H
hewei03 已提交
581
cpplint()