blob: 789b093c6188311325a38b6a4a7f20522c7aa9fd [file] [log] [blame]
Alex Perryb3b50792020-01-18 16:13:45 -08001load("//aos/seasocks:gen_embedded.bzl", "gen_embedded")
Austin Schuhe84c3ed2019-12-14 15:29:48 -08002load("//aos:config.bzl", "aos_config")
Austin Schuh0de30f32020-12-06 12:44:28 -08003load("//aos:flatbuffers.bzl", "cc_static_flatbuffer")
4load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library")
Austin Schuhe84c3ed2019-12-14 15:29:48 -08005
Brian Silverman7a7c24d2018-09-01 17:49:09 -07006package(default_visibility = ["//visibility:public"])
Brian Silverman100534c2015-09-07 15:51:23 -04007
Austin Schuhe84c3ed2019-12-14 15:29:48 -08008flatbuffer_cc_library(
Austin Schuh0de30f32020-12-06 12:44:28 -08009 name = "remote_message_fbs",
10 srcs = ["remote_message.fbs"],
11 gen_reflections = 1,
12)
13
14cc_static_flatbuffer(
15 name = "remote_message_schema",
16 function = "aos::message_bridge::RemoteMessageSchema",
17 target = ":remote_message_fbs_reflection_out",
18)
19
20flatbuffer_cc_library(
Austin Schuhe84c3ed2019-12-14 15:29:48 -080021 name = "connect_fbs",
22 srcs = ["connect.fbs"],
23 gen_reflections = 1,
24 includes = [
25 "//aos:configuration_fbs_includes",
26 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080027 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -080028)
29
Alex Perryd5e13572020-02-22 15:15:08 -080030flatbuffer_ts_library(
31 name = "connect_ts_fbs",
32 srcs = ["connect.fbs"],
33 includes = [
34 "//aos:configuration_fbs_includes",
35 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080036 target_compatible_with = ["@platforms//os:linux"],
Alex Perryd5e13572020-02-22 15:15:08 -080037)
38
Austin Schuhe84c3ed2019-12-14 15:29:48 -080039flatbuffer_cc_library(
Austin Schuh7bc59052020-02-16 23:48:33 -080040 name = "timestamp_fbs",
41 srcs = ["timestamp.fbs"],
42 gen_reflections = 1,
43 includes = [
44 "//aos:configuration_fbs_includes",
45 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080046 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh7bc59052020-02-16 23:48:33 -080047)
48
49flatbuffer_cc_library(
Austin Schuhe84c3ed2019-12-14 15:29:48 -080050 name = "message_bridge_client_fbs",
51 srcs = ["message_bridge_client.fbs"],
52 gen_reflections = 1,
53 includes = [
54 ":message_bridge_server_fbs_includes",
55 "//aos:configuration_fbs_includes",
56 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080057 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -080058)
59
60flatbuffer_cc_library(
61 name = "message_bridge_server_fbs",
62 srcs = ["message_bridge_server.fbs"],
63 gen_reflections = 1,
64 includes = [
65 "//aos:configuration_fbs_includes",
66 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080067 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -080068)
69
Brian Silverman100534c2015-09-07 15:51:23 -040070cc_library(
Brian Silverman7a7c24d2018-09-01 17:49:09 -070071 name = "team_number",
72 srcs = [
73 "team_number.cc",
74 ],
75 hdrs = [
76 "team_number.h",
77 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080078 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7a7c24d2018-09-01 17:49:09 -070079 deps = [
John Park33858a32018-09-28 23:05:48 -070080 "//aos/util:string_to_num",
Brian Silverman3dfbfb12020-02-17 20:35:18 -080081 "@com_github_google_glog//:glog",
Brian Silverman7a7c24d2018-09-01 17:49:09 -070082 ],
Brian Silverman100534c2015-09-07 15:51:23 -040083)
84
Austin Schuhdf5591e2015-12-19 22:36:50 -080085cc_test(
Brian Silverman7a7c24d2018-09-01 17:49:09 -070086 name = "team_number_test",
87 srcs = [
88 "team_number_test.cc",
89 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080090 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7a7c24d2018-09-01 17:49:09 -070091 deps = [
92 ":team_number",
Jim Ostrowski8565b402020-02-29 20:26:53 -080093 "//aos:configuration",
Brian Silverman7a7c24d2018-09-01 17:49:09 -070094 "//aos/testing:googletest",
95 ],
Austin Schuhdf5591e2015-12-19 22:36:50 -080096)
Austin Schuhe84c3ed2019-12-14 15:29:48 -080097
98cc_library(
99 name = "sctp_lib",
100 srcs = [
101 "sctp_lib.cc",
102 ],
103 hdrs = [
104 "sctp_lib.h",
105 ],
106 copts = [
107 # The casts required to read datastructures from sockets trip -Wcast-align.
108 "-Wno-cast-align",
109 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800110 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800111 deps = [
112 "//aos:unique_malloc_ptr",
Austin Schuh2fe4b712020-03-15 14:21:45 -0700113 "//aos/util:file",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800114 "//third_party/lksctp-tools:sctp",
115 "@com_github_google_glog//:glog",
116 ],
117)
118
119cc_library(
120 name = "sctp_server",
121 srcs = [
122 "sctp_server.cc",
123 ],
124 hdrs = [
125 "sctp_server.h",
126 ],
127 copts = [
128 "-Wno-cast-align",
129 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800130 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800131 deps = [
132 ":sctp_lib",
133 "//third_party/lksctp-tools:sctp",
134 ],
135)
136
137cc_library(
138 name = "message_bridge_protocol",
Austin Schuh7bc59052020-02-16 23:48:33 -0800139 srcs = [
140 "message_bridge_protocol.cc",
141 ],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800142 hdrs = [
143 "message_bridge_protocol.h",
144 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800145 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh7bc59052020-02-16 23:48:33 -0800146 deps = [
147 ":connect_fbs",
148 "//aos:configuration",
149 "//aos:flatbuffer_merge",
150 "//aos:flatbuffers",
Austin Schuh4385b142021-03-14 21:31:13 -0700151 "//aos:uuid",
Austin Schuh7bc59052020-02-16 23:48:33 -0800152 "@com_github_google_flatbuffers//:flatbuffers",
153 ],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800154)
155
156cc_library(
Austin Schuhe19b6752020-08-27 23:20:19 -0700157 name = "message_bridge_server_status",
158 srcs = [
159 "message_bridge_server_status.cc",
160 ],
161 hdrs = [
162 "message_bridge_server_status.h",
163 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800164 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe19b6752020-08-27 23:20:19 -0700165 deps = [
166 ":message_bridge_client_fbs",
167 ":message_bridge_server_fbs",
168 ":timestamp_fbs",
169 ":timestamp_filter",
170 "//aos:flatbuffer_merge",
171 "//aos:flatbuffers",
172 "//aos/events:event_loop",
173 "//aos/time",
174 ],
175)
176
177cc_library(
Austin Schuh36a2c3e2021-02-18 22:28:38 -0800178 name = "timestamp_channel",
179 srcs = ["timestamp_channel.cc"],
180 hdrs = ["timestamp_channel.h"],
181 deps = [
182 ":remote_message_fbs",
183 "//aos:configuration",
184 "//aos/events:event_loop",
185 "@com_github_google_glog//:glog",
186 "@com_google_absl//absl/container:btree",
187 "@com_google_absl//absl/strings",
188 ],
189)
190
191cc_library(
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800192 name = "message_bridge_server_lib",
193 srcs = [
194 "message_bridge_server_lib.cc",
195 ],
196 hdrs = [
197 "message_bridge_server_lib.h",
198 ],
199 copts = [
200 "-Wno-cast-align",
201 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800202 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800203 deps = [
204 ":connect_fbs",
Austin Schuh7bc59052020-02-16 23:48:33 -0800205 ":message_bridge_client_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800206 ":message_bridge_protocol",
207 ":message_bridge_server_fbs",
Austin Schuhe19b6752020-08-27 23:20:19 -0700208 ":message_bridge_server_status",
Austin Schuh0de30f32020-12-06 12:44:28 -0800209 ":remote_message_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800210 ":sctp_lib",
211 ":sctp_server",
Austin Schuh36a2c3e2021-02-18 22:28:38 -0800212 ":timestamp_channel",
Austin Schuh7bc59052020-02-16 23:48:33 -0800213 ":timestamp_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800214 "//aos:unique_malloc_ptr",
215 "//aos/events:shm_event_loop",
Austin Schuhb06f03b2021-02-17 22:00:37 -0800216 "//aos/events/logging:log_reader",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800217 "//third_party/lksctp-tools:sctp",
218 ],
219)
220
221cc_binary(
222 name = "message_bridge_server",
223 srcs = [
224 "message_bridge_server.cc",
225 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800226 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800227 deps = [
228 ":message_bridge_server_lib",
229 "//aos:init",
230 "//aos:json_to_flatbuffer",
231 "//aos/events:shm_event_loop",
232 ],
233)
234
235cc_library(
236 name = "sctp_client",
237 srcs = [
238 "sctp_client.cc",
239 ],
240 hdrs = [
241 "sctp_client.h",
242 ],
243 copts = [
244 "-Wno-cast-align",
245 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800246 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800247 deps = [
248 ":sctp_lib",
249 "//third_party/lksctp-tools:sctp",
250 ],
251)
252
253cc_library(
Austin Schuhae2e7bf2020-08-27 23:42:56 -0700254 name = "message_bridge_client_status",
255 srcs = [
256 "message_bridge_client_status.cc",
257 ],
258 hdrs = [
259 "message_bridge_client_status.h",
260 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800261 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhae2e7bf2020-08-27 23:42:56 -0700262 deps = [
263 ":message_bridge_client_fbs",
264 ":message_bridge_server_fbs",
265 ":timestamp_filter",
266 "//aos:flatbuffers",
267 "//aos/events:event_loop",
268 "//aos/time",
269 ],
270)
271
272cc_library(
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800273 name = "message_bridge_client_lib",
274 srcs = [
275 "message_bridge_client_lib.cc",
276 ],
277 hdrs = [
278 "message_bridge_client_lib.h",
279 ],
280 copts = [
281 "-Wno-cast-align",
282 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800283 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800284 deps = [
285 ":connect_fbs",
286 ":message_bridge_client_fbs",
Austin Schuhae2e7bf2020-08-27 23:42:56 -0700287 ":message_bridge_client_status",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800288 ":message_bridge_protocol",
289 ":message_bridge_server_fbs",
Austin Schuh0de30f32020-12-06 12:44:28 -0800290 ":remote_message_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800291 ":sctp_client",
Austin Schuh7bc59052020-02-16 23:48:33 -0800292 ":timestamp_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800293 "//aos/events:shm_event_loop",
Austin Schuhb06f03b2021-02-17 22:00:37 -0800294 "//aos/events/logging:log_reader",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800295 ],
296)
297
298cc_binary(
299 name = "message_bridge_client",
300 srcs = [
301 "message_bridge_client.cc",
302 ],
303 copts = [
304 "-Wno-cast-align",
305 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800306 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800307 deps = [
308 ":message_bridge_client_lib",
309 "//aos:init",
310 "//aos:json_to_flatbuffer",
311 "//aos/events:shm_event_loop",
312 ],
313)
314
315aos_config(
Austin Schuh36a2c3e2021-02-18 22:28:38 -0800316 name = "message_bridge_test_combined_timestamps_common_config",
317 src = "message_bridge_test_combined_timestamps_common.json",
318 flatbuffers = [
319 ":remote_message_fbs",
320 "//aos/events:ping_fbs",
321 "//aos/events:pong_fbs",
322 "//aos/network:message_bridge_client_fbs",
323 "//aos/network:message_bridge_server_fbs",
324 "//aos/network:timestamp_fbs",
325 ],
326 target_compatible_with = ["@platforms//os:linux"],
327 deps = ["//aos/events:config"],
328)
329
330aos_config(
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800331 name = "message_bridge_test_common_config",
332 src = "message_bridge_test_common.json",
333 flatbuffers = [
Austin Schuh0de30f32020-12-06 12:44:28 -0800334 ":remote_message_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800335 "//aos/events:ping_fbs",
336 "//aos/events:pong_fbs",
337 "//aos/network:message_bridge_client_fbs",
338 "//aos/network:message_bridge_server_fbs",
Austin Schuh7bc59052020-02-16 23:48:33 -0800339 "//aos/network:timestamp_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800340 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800341 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800342 deps = ["//aos/events:config"],
343)
344
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800345cc_test(
346 name = "message_bridge_test",
347 srcs = [
348 "message_bridge_test.cc",
349 ],
350 data = [
Austin Schuh36a2c3e2021-02-18 22:28:38 -0800351 ":message_bridge_test_combined_timestamps_common_config",
Austin Schuhf466ab52021-02-16 22:00:38 -0800352 ":message_bridge_test_common_config",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800353 ],
Austin Schuh025ff512021-02-07 23:06:48 -0800354 flaky = True,
Austin Schuh36a2c3e2021-02-18 22:28:38 -0800355 shard_count = 10,
Philipp Schraderdada1072020-11-24 11:34:46 -0800356 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800357 deps = [
358 ":message_bridge_client_lib",
359 ":message_bridge_server_lib",
360 "//aos:json_to_flatbuffer",
361 "//aos/events:ping_fbs",
362 "//aos/events:pong_fbs",
363 "//aos/events:shm_event_loop",
Brian Silverman7b266d92021-02-17 21:24:02 -0800364 "//aos/ipc_lib:event",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800365 "//aos/testing:googletest",
366 ],
367)
Alex Perryb3b50792020-01-18 16:13:45 -0800368
369flatbuffer_cc_library(
370 name = "web_proxy_fbs",
371 srcs = ["web_proxy.fbs"],
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800372 gen_reflections = True,
Alex Perry5f474f22020-02-01 12:14:24 -0800373 includes = [
374 ":connect_fbs_includes",
375 "//aos:configuration_fbs_includes",
376 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800377 target_compatible_with = ["@platforms//os:linux"],
Alex Perryb3b50792020-01-18 16:13:45 -0800378)
379
380flatbuffer_ts_library(
381 name = "web_proxy_ts_fbs",
382 srcs = ["web_proxy.fbs"],
Alex Perry5f474f22020-02-01 12:14:24 -0800383 includes = [
384 ":connect_fbs_includes",
385 "//aos:configuration_fbs_includes",
386 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800387 target_compatible_with = ["@platforms//os:linux"],
Alex Perry5f474f22020-02-01 12:14:24 -0800388)
389
390cc_library(
391 name = "web_proxy_utils",
Alex Perry5f474f22020-02-01 12:14:24 -0800392 srcs = ["web_proxy_utils.cc"],
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800393 hdrs = ["web_proxy_utils.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800394 target_compatible_with = ["@platforms//os:linux"],
Alex Perry5f474f22020-02-01 12:14:24 -0800395 deps = [
396 ":connect_fbs",
397 ":web_proxy_fbs",
398 "//aos:configuration_fbs",
399 "//aos/events:event_loop",
400 "@com_github_google_flatbuffers//:flatbuffers",
401 ],
Alex Perryb3b50792020-01-18 16:13:45 -0800402)
403
404cc_library(
405 name = "web_proxy",
Alex Perryb3b50792020-01-18 16:13:45 -0800406 srcs = ["web_proxy.cc"],
Austin Schuh8bd96322020-02-13 21:18:22 -0800407 hdrs = ["web_proxy.h"],
Alex Perryb3b50792020-01-18 16:13:45 -0800408 copts = [
409 "-DWEBRTC_POSIX",
Alex Perryb3b50792020-01-18 16:13:45 -0800410 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800411 target_compatible_with = ["@platforms//os:linux"],
Alex Perryb3b50792020-01-18 16:13:45 -0800412 deps = [
Alex Perry5f474f22020-02-01 12:14:24 -0800413 ":connect_fbs",
James Kuszmaul48671362020-12-24 13:54:16 -0800414 ":gen_embedded",
Alex Perryb3b50792020-01-18 16:13:45 -0800415 ":web_proxy_fbs",
Alex Perry5f474f22020-02-01 12:14:24 -0800416 ":web_proxy_utils",
417 "//aos/events:shm_event_loop",
James Kuszmaul8d928d02020-12-25 17:47:49 -0800418 "//aos/mutex",
Alex Perryb3b50792020-01-18 16:13:45 -0800419 "//aos/seasocks:seasocks_logger",
Alex Perryb3b50792020-01-18 16:13:45 -0800420 "//third_party:webrtc",
Austin Schuh8bd96322020-02-13 21:18:22 -0800421 "//third_party/seasocks",
Alex Perryb3b50792020-01-18 16:13:45 -0800422 "@com_github_google_glog//:glog",
423 ],
424)
425
426gen_embedded(
427 name = "gen_embedded",
428 srcs = glob(
429 include = ["www_defaults/**/*"],
430 exclude = ["www/**/*"],
431 ),
Philipp Schraderdada1072020-11-24 11:34:46 -0800432 target_compatible_with = ["@platforms//os:linux"],
Alex Perryb3b50792020-01-18 16:13:45 -0800433)
434
435cc_binary(
436 name = "web_proxy_main",
437 srcs = ["web_proxy_main.cc"],
Alex Perryb3b50792020-01-18 16:13:45 -0800438 copts = [
439 "-DWEBRTC_POSIX",
Alex Perryb3b50792020-01-18 16:13:45 -0800440 ],
441 data = [
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800442 "//aos/network/www:files",
Austin Schuhda9d0602019-09-15 17:29:38 -0700443 "//aos/network/www:main_bundle.min.js",
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800444 "@com_github_google_flatbuffers//:flatjs",
445 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800446 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800447 deps = [
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800448 ":web_proxy",
449 "//aos:init",
450 "//aos/events:shm_event_loop",
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800451 "@com_github_google_flatbuffers//:flatbuffers",
Alex Perryb3b50792020-01-18 16:13:45 -0800452 ],
453)
Austin Schuh8bd96322020-02-13 21:18:22 -0800454
James Kuszmaul71a81932020-12-15 21:08:01 -0800455cc_binary(
456 name = "log_web_proxy_main",
457 srcs = ["log_web_proxy_main.cc"],
458 args = [
James Kuszmaul71a81932020-12-15 21:08:01 -0800459 "--data_dir=aos/network/www",
460 ],
461 copts = [
462 "-DWEBRTC_POSIX",
James Kuszmaul71a81932020-12-15 21:08:01 -0800463 ],
James Kuszmaul71a81932020-12-15 21:08:01 -0800464 deps = [
James Kuszmaul71a81932020-12-15 21:08:01 -0800465 ":web_proxy",
466 "//aos:init",
467 "//aos/events:simulated_event_loop",
Austin Schuhb06f03b2021-02-17 22:00:37 -0800468 "//aos/events/logging:log_reader",
James Kuszmaul71a81932020-12-15 21:08:01 -0800469 "@com_github_google_flatbuffers//:flatbuffers",
470 ],
471)
472
Austin Schuh8bd96322020-02-13 21:18:22 -0800473cc_library(
474 name = "timestamp_filter",
Austin Schuh7ee6f722020-08-24 16:19:36 -0700475 srcs = ["timestamp_filter.cc"],
Austin Schuh8bd96322020-02-13 21:18:22 -0800476 hdrs = ["timestamp_filter.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800477 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh8bd96322020-02-13 21:18:22 -0800478 deps = [
Austin Schuh04eccfc2020-08-26 21:08:27 -0700479 "//aos:configuration",
Austin Schuh8bd96322020-02-13 21:18:22 -0800480 "//aos/time",
Austin Schuh85357ee2020-08-24 16:41:42 -0700481 "@com_google_absl//absl/strings",
Austin Schuh8bd96322020-02-13 21:18:22 -0800482 ],
483)
484
Austin Schuh0ca1fd32020-12-18 22:53:05 -0800485cc_library(
486 name = "multinode_timestamp_filter",
487 srcs = ["multinode_timestamp_filter.cc"],
488 hdrs = ["multinode_timestamp_filter.h"],
489 target_compatible_with = ["@platforms//os:linux"],
490 deps = [
491 ":timestamp_filter",
492 "//aos:configuration",
493 "//aos/events:simulated_event_loop",
Austin Schuhe639ea12021-01-25 13:00:22 -0800494 "//aos/events/logging:logfile_utils",
Austin Schuh0ca1fd32020-12-18 22:53:05 -0800495 "//aos/time",
Austin Schuh7466fe12020-12-29 23:01:47 -0800496 "@com_github_stevengj_nlopt//:nlopt",
Austin Schuh0ca1fd32020-12-18 22:53:05 -0800497 "@org_tuxfamily_eigen//:eigen",
498 ],
499)
500
Austin Schuh8bd96322020-02-13 21:18:22 -0800501cc_test(
502 name = "timestamp_filter_test",
503 srcs = [
504 "timestamp_filter_test.cc",
505 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800506 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh8bd96322020-02-13 21:18:22 -0800507 deps = [
508 ":timestamp_filter",
Austin Schuh04eccfc2020-08-26 21:08:27 -0700509 "//aos:json_to_flatbuffer",
Austin Schuh8bd96322020-02-13 21:18:22 -0800510 "//aos/testing:googletest",
511 ],
512)
Austin Schuh7466fe12020-12-29 23:01:47 -0800513
Austin Schuha9abc032021-01-01 16:46:19 -0800514cc_library(
515 name = "testing_time_converter",
516 testonly = True,
517 srcs = ["testing_time_converter.cc"],
518 hdrs = ["testing_time_converter.h"],
519 deps = [
520 ":multinode_timestamp_filter",
521 "//aos/events:simulated_event_loop",
522 "//aos/time",
523 ],
524)
525
Austin Schuh7466fe12020-12-29 23:01:47 -0800526cc_test(
527 name = "multinode_timestamp_filter_test",
528 srcs = [
529 "multinode_timestamp_filter_test.cc",
530 ],
531 target_compatible_with = ["@platforms//os:linux"],
532 deps = [
533 ":multinode_timestamp_filter",
Austin Schuha9abc032021-01-01 16:46:19 -0800534 ":testing_time_converter",
Austin Schuh7466fe12020-12-29 23:01:47 -0800535 ":timestamp_filter",
536 "//aos/testing:googletest",
Austin Schuh87dd3832021-01-01 23:07:31 -0800537 "//third_party/gmp",
Austin Schuh7466fe12020-12-29 23:01:47 -0800538 "@com_github_stevengj_nlopt//:nlopt",
539 ],
540)