blob: 49807487c5b1a10651cd95922d16050df123830b [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 Schuhf068dca2021-03-14 21:38:40 -070040 name = "remote_data_fbs",
41 srcs = ["remote_data.fbs"],
42 gen_reflections = 1,
43 target_compatible_with = ["@platforms//os:linux"],
44)
45
46flatbuffer_cc_library(
Austin Schuh7bc59052020-02-16 23:48:33 -080047 name = "timestamp_fbs",
48 srcs = ["timestamp.fbs"],
49 gen_reflections = 1,
50 includes = [
51 "//aos:configuration_fbs_includes",
52 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080053 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh7bc59052020-02-16 23:48:33 -080054)
55
56flatbuffer_cc_library(
Austin Schuhe84c3ed2019-12-14 15:29:48 -080057 name = "message_bridge_client_fbs",
58 srcs = ["message_bridge_client.fbs"],
59 gen_reflections = 1,
60 includes = [
61 ":message_bridge_server_fbs_includes",
62 "//aos:configuration_fbs_includes",
63 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080064 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -080065)
66
67flatbuffer_cc_library(
68 name = "message_bridge_server_fbs",
69 srcs = ["message_bridge_server.fbs"],
70 gen_reflections = 1,
71 includes = [
72 "//aos:configuration_fbs_includes",
73 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080074 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -080075)
76
Brian Silverman100534c2015-09-07 15:51:23 -040077cc_library(
Brian Silverman7a7c24d2018-09-01 17:49:09 -070078 name = "team_number",
79 srcs = [
80 "team_number.cc",
81 ],
82 hdrs = [
83 "team_number.h",
84 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080085 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7a7c24d2018-09-01 17:49:09 -070086 deps = [
John Park33858a32018-09-28 23:05:48 -070087 "//aos/util:string_to_num",
Brian Silverman3dfbfb12020-02-17 20:35:18 -080088 "@com_github_google_glog//:glog",
Brian Silverman7a7c24d2018-09-01 17:49:09 -070089 ],
Brian Silverman100534c2015-09-07 15:51:23 -040090)
91
Austin Schuhdf5591e2015-12-19 22:36:50 -080092cc_test(
Brian Silverman7a7c24d2018-09-01 17:49:09 -070093 name = "team_number_test",
94 srcs = [
95 "team_number_test.cc",
96 ],
Philipp Schraderdada1072020-11-24 11:34:46 -080097 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman7a7c24d2018-09-01 17:49:09 -070098 deps = [
99 ":team_number",
Jim Ostrowski8565b402020-02-29 20:26:53 -0800100 "//aos:configuration",
Brian Silverman7a7c24d2018-09-01 17:49:09 -0700101 "//aos/testing:googletest",
102 ],
Austin Schuhdf5591e2015-12-19 22:36:50 -0800103)
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800104
105cc_library(
106 name = "sctp_lib",
107 srcs = [
108 "sctp_lib.cc",
109 ],
110 hdrs = [
111 "sctp_lib.h",
112 ],
113 copts = [
114 # The casts required to read datastructures from sockets trip -Wcast-align.
115 "-Wno-cast-align",
116 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800117 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800118 deps = [
119 "//aos:unique_malloc_ptr",
Austin Schuh2fe4b712020-03-15 14:21:45 -0700120 "//aos/util:file",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800121 "//third_party/lksctp-tools:sctp",
122 "@com_github_google_glog//:glog",
123 ],
124)
125
126cc_library(
127 name = "sctp_server",
128 srcs = [
129 "sctp_server.cc",
130 ],
131 hdrs = [
132 "sctp_server.h",
133 ],
134 copts = [
135 "-Wno-cast-align",
136 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800137 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800138 deps = [
139 ":sctp_lib",
140 "//third_party/lksctp-tools:sctp",
141 ],
142)
143
144cc_library(
145 name = "message_bridge_protocol",
Austin Schuh7bc59052020-02-16 23:48:33 -0800146 srcs = [
147 "message_bridge_protocol.cc",
148 ],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800149 hdrs = [
150 "message_bridge_protocol.h",
151 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800152 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh7bc59052020-02-16 23:48:33 -0800153 deps = [
154 ":connect_fbs",
155 "//aos:configuration",
156 "//aos:flatbuffer_merge",
157 "//aos:flatbuffers",
Austin Schuh4385b142021-03-14 21:31:13 -0700158 "//aos:uuid",
Austin Schuh7bc59052020-02-16 23:48:33 -0800159 "@com_github_google_flatbuffers//:flatbuffers",
160 ],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800161)
162
163cc_library(
Austin Schuhe19b6752020-08-27 23:20:19 -0700164 name = "message_bridge_server_status",
165 srcs = [
166 "message_bridge_server_status.cc",
167 ],
168 hdrs = [
169 "message_bridge_server_status.h",
170 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800171 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe19b6752020-08-27 23:20:19 -0700172 deps = [
173 ":message_bridge_client_fbs",
174 ":message_bridge_server_fbs",
175 ":timestamp_fbs",
176 ":timestamp_filter",
177 "//aos:flatbuffer_merge",
178 "//aos:flatbuffers",
179 "//aos/events:event_loop",
180 "//aos/time",
181 ],
182)
183
184cc_library(
Austin Schuh36a2c3e2021-02-18 22:28:38 -0800185 name = "timestamp_channel",
186 srcs = ["timestamp_channel.cc"],
187 hdrs = ["timestamp_channel.h"],
188 deps = [
189 ":remote_message_fbs",
190 "//aos:configuration",
191 "//aos/events:event_loop",
192 "@com_github_google_glog//:glog",
193 "@com_google_absl//absl/container:btree",
194 "@com_google_absl//absl/strings",
195 ],
196)
197
198cc_library(
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800199 name = "message_bridge_server_lib",
200 srcs = [
201 "message_bridge_server_lib.cc",
202 ],
203 hdrs = [
204 "message_bridge_server_lib.h",
205 ],
206 copts = [
207 "-Wno-cast-align",
208 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800209 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800210 deps = [
211 ":connect_fbs",
Austin Schuh7bc59052020-02-16 23:48:33 -0800212 ":message_bridge_client_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800213 ":message_bridge_protocol",
214 ":message_bridge_server_fbs",
Austin Schuhe19b6752020-08-27 23:20:19 -0700215 ":message_bridge_server_status",
Austin Schuhf068dca2021-03-14 21:38:40 -0700216 ":remote_data_fbs",
Austin Schuh0de30f32020-12-06 12:44:28 -0800217 ":remote_message_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800218 ":sctp_lib",
219 ":sctp_server",
Austin Schuh36a2c3e2021-02-18 22:28:38 -0800220 ":timestamp_channel",
Austin Schuh7bc59052020-02-16 23:48:33 -0800221 ":timestamp_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800222 "//aos:unique_malloc_ptr",
223 "//aos/events:shm_event_loop",
Austin Schuhb06f03b2021-02-17 22:00:37 -0800224 "//aos/events/logging:log_reader",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800225 "//third_party/lksctp-tools:sctp",
226 ],
227)
228
229cc_binary(
230 name = "message_bridge_server",
231 srcs = [
232 "message_bridge_server.cc",
233 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800234 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800235 deps = [
236 ":message_bridge_server_lib",
237 "//aos:init",
238 "//aos:json_to_flatbuffer",
239 "//aos/events:shm_event_loop",
240 ],
241)
242
243cc_library(
244 name = "sctp_client",
245 srcs = [
246 "sctp_client.cc",
247 ],
248 hdrs = [
249 "sctp_client.h",
250 ],
251 copts = [
252 "-Wno-cast-align",
253 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800254 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800255 deps = [
256 ":sctp_lib",
257 "//third_party/lksctp-tools:sctp",
258 ],
259)
260
261cc_library(
Austin Schuhae2e7bf2020-08-27 23:42:56 -0700262 name = "message_bridge_client_status",
263 srcs = [
264 "message_bridge_client_status.cc",
265 ],
266 hdrs = [
267 "message_bridge_client_status.h",
268 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800269 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhae2e7bf2020-08-27 23:42:56 -0700270 deps = [
271 ":message_bridge_client_fbs",
272 ":message_bridge_server_fbs",
273 ":timestamp_filter",
274 "//aos:flatbuffers",
275 "//aos/events:event_loop",
276 "//aos/time",
277 ],
278)
279
280cc_library(
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800281 name = "message_bridge_client_lib",
282 srcs = [
283 "message_bridge_client_lib.cc",
284 ],
285 hdrs = [
286 "message_bridge_client_lib.h",
287 ],
288 copts = [
289 "-Wno-cast-align",
290 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800291 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800292 deps = [
293 ":connect_fbs",
294 ":message_bridge_client_fbs",
Austin Schuhae2e7bf2020-08-27 23:42:56 -0700295 ":message_bridge_client_status",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800296 ":message_bridge_protocol",
297 ":message_bridge_server_fbs",
Austin Schuhf068dca2021-03-14 21:38:40 -0700298 ":remote_data_fbs",
Austin Schuh0de30f32020-12-06 12:44:28 -0800299 ":remote_message_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800300 ":sctp_client",
Austin Schuh7bc59052020-02-16 23:48:33 -0800301 ":timestamp_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800302 "//aos/events:shm_event_loop",
Austin Schuhb06f03b2021-02-17 22:00:37 -0800303 "//aos/events/logging:log_reader",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800304 ],
305)
306
307cc_binary(
308 name = "message_bridge_client",
309 srcs = [
310 "message_bridge_client.cc",
311 ],
312 copts = [
313 "-Wno-cast-align",
314 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800315 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800316 deps = [
317 ":message_bridge_client_lib",
318 "//aos:init",
319 "//aos:json_to_flatbuffer",
320 "//aos/events:shm_event_loop",
321 ],
322)
323
324aos_config(
Austin Schuh36a2c3e2021-02-18 22:28:38 -0800325 name = "message_bridge_test_combined_timestamps_common_config",
326 src = "message_bridge_test_combined_timestamps_common.json",
327 flatbuffers = [
328 ":remote_message_fbs",
329 "//aos/events:ping_fbs",
330 "//aos/events:pong_fbs",
331 "//aos/network:message_bridge_client_fbs",
332 "//aos/network:message_bridge_server_fbs",
333 "//aos/network:timestamp_fbs",
334 ],
335 target_compatible_with = ["@platforms//os:linux"],
336 deps = ["//aos/events:config"],
337)
338
339aos_config(
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800340 name = "message_bridge_test_common_config",
341 src = "message_bridge_test_common.json",
342 flatbuffers = [
Austin Schuh0de30f32020-12-06 12:44:28 -0800343 ":remote_message_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800344 "//aos/events:ping_fbs",
345 "//aos/events:pong_fbs",
346 "//aos/network:message_bridge_client_fbs",
347 "//aos/network:message_bridge_server_fbs",
Austin Schuh7bc59052020-02-16 23:48:33 -0800348 "//aos/network:timestamp_fbs",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800349 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800350 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800351 deps = ["//aos/events:config"],
352)
353
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800354cc_test(
355 name = "message_bridge_test",
356 srcs = [
357 "message_bridge_test.cc",
358 ],
359 data = [
Austin Schuh36a2c3e2021-02-18 22:28:38 -0800360 ":message_bridge_test_combined_timestamps_common_config",
Austin Schuhf466ab52021-02-16 22:00:38 -0800361 ":message_bridge_test_common_config",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800362 ],
Austin Schuh025ff512021-02-07 23:06:48 -0800363 flaky = True,
Austin Schuh36a2c3e2021-02-18 22:28:38 -0800364 shard_count = 10,
Philipp Schraderdada1072020-11-24 11:34:46 -0800365 target_compatible_with = ["@platforms//os:linux"],
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800366 deps = [
367 ":message_bridge_client_lib",
368 ":message_bridge_server_lib",
369 "//aos:json_to_flatbuffer",
370 "//aos/events:ping_fbs",
371 "//aos/events:pong_fbs",
372 "//aos/events:shm_event_loop",
Brian Silverman7b266d92021-02-17 21:24:02 -0800373 "//aos/ipc_lib:event",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800374 "//aos/testing:googletest",
Austin Schuh373f1762021-06-02 21:07:09 -0700375 "//aos/testing:path",
Austin Schuhe84c3ed2019-12-14 15:29:48 -0800376 ],
377)
Alex Perryb3b50792020-01-18 16:13:45 -0800378
379flatbuffer_cc_library(
380 name = "web_proxy_fbs",
381 srcs = ["web_proxy.fbs"],
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800382 gen_reflections = True,
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 Perryb3b50792020-01-18 16:13:45 -0800388)
389
390flatbuffer_ts_library(
391 name = "web_proxy_ts_fbs",
392 srcs = ["web_proxy.fbs"],
Alex Perry5f474f22020-02-01 12:14:24 -0800393 includes = [
394 ":connect_fbs_includes",
395 "//aos:configuration_fbs_includes",
396 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800397 target_compatible_with = ["@platforms//os:linux"],
Alex Perry5f474f22020-02-01 12:14:24 -0800398)
399
400cc_library(
401 name = "web_proxy_utils",
Alex Perry5f474f22020-02-01 12:14:24 -0800402 srcs = ["web_proxy_utils.cc"],
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800403 hdrs = ["web_proxy_utils.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800404 target_compatible_with = ["@platforms//os:linux"],
Alex Perry5f474f22020-02-01 12:14:24 -0800405 deps = [
406 ":connect_fbs",
407 ":web_proxy_fbs",
408 "//aos:configuration_fbs",
409 "//aos/events:event_loop",
410 "@com_github_google_flatbuffers//:flatbuffers",
411 ],
Alex Perryb3b50792020-01-18 16:13:45 -0800412)
413
414cc_library(
415 name = "web_proxy",
Austin Schuh52e5e3a2021-04-24 22:30:02 -0700416 srcs = [
417 "rawrtc.cc",
418 "web_proxy.cc",
419 ],
420 hdrs = [
421 "rawrtc.h",
422 "web_proxy.h",
423 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800424 target_compatible_with = ["@platforms//os:linux"],
Alex Perryb3b50792020-01-18 16:13:45 -0800425 deps = [
Alex Perry5f474f22020-02-01 12:14:24 -0800426 ":connect_fbs",
James Kuszmaul48671362020-12-24 13:54:16 -0800427 ":gen_embedded",
Alex Perryb3b50792020-01-18 16:13:45 -0800428 ":web_proxy_fbs",
Alex Perry5f474f22020-02-01 12:14:24 -0800429 ":web_proxy_utils",
430 "//aos/events:shm_event_loop",
James Kuszmaul8d928d02020-12-25 17:47:49 -0800431 "//aos/mutex",
Alex Perryb3b50792020-01-18 16:13:45 -0800432 "//aos/seasocks:seasocks_logger",
Austin Schuh8bd96322020-02-13 21:18:22 -0800433 "//third_party/seasocks",
Alex Perryb3b50792020-01-18 16:13:45 -0800434 "@com_github_google_glog//:glog",
Austin Schuh52e5e3a2021-04-24 22:30:02 -0700435 "@com_github_rawrtc_rawrtc//:rawrtc",
Alex Perryb3b50792020-01-18 16:13:45 -0800436 ],
437)
438
439gen_embedded(
440 name = "gen_embedded",
441 srcs = glob(
442 include = ["www_defaults/**/*"],
443 exclude = ["www/**/*"],
444 ),
Philipp Schraderdada1072020-11-24 11:34:46 -0800445 target_compatible_with = ["@platforms//os:linux"],
Alex Perryb3b50792020-01-18 16:13:45 -0800446)
447
448cc_binary(
449 name = "web_proxy_main",
450 srcs = ["web_proxy_main.cc"],
Alex Perryb3b50792020-01-18 16:13:45 -0800451 data = [
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800452 "//aos/network/www:files",
Austin Schuhda9d0602019-09-15 17:29:38 -0700453 "//aos/network/www:main_bundle.min.js",
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800454 "@com_github_google_flatbuffers//:flatjs",
455 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800456 target_compatible_with = ["@platforms//os:linux"],
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800457 deps = [
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800458 ":web_proxy",
459 "//aos:init",
460 "//aos/events:shm_event_loop",
Brian Silverman3dfbfb12020-02-17 20:35:18 -0800461 "@com_github_google_flatbuffers//:flatbuffers",
Alex Perryb3b50792020-01-18 16:13:45 -0800462 ],
463)
Austin Schuh8bd96322020-02-13 21:18:22 -0800464
James Kuszmaul71a81932020-12-15 21:08:01 -0800465cc_binary(
466 name = "log_web_proxy_main",
467 srcs = ["log_web_proxy_main.cc"],
468 args = [
James Kuszmaul71a81932020-12-15 21:08:01 -0800469 "--data_dir=aos/network/www",
470 ],
James Kuszmaul71a81932020-12-15 21:08:01 -0800471 deps = [
James Kuszmaul71a81932020-12-15 21:08:01 -0800472 ":web_proxy",
473 "//aos:init",
474 "//aos/events:simulated_event_loop",
Austin Schuhb06f03b2021-02-17 22:00:37 -0800475 "//aos/events/logging:log_reader",
James Kuszmaul71a81932020-12-15 21:08:01 -0800476 "@com_github_google_flatbuffers//:flatbuffers",
477 ],
478)
479
Austin Schuh8bd96322020-02-13 21:18:22 -0800480cc_library(
481 name = "timestamp_filter",
Austin Schuh7ee6f722020-08-24 16:19:36 -0700482 srcs = ["timestamp_filter.cc"],
Austin Schuh8bd96322020-02-13 21:18:22 -0800483 hdrs = ["timestamp_filter.h"],
Philipp Schraderdada1072020-11-24 11:34:46 -0800484 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh8bd96322020-02-13 21:18:22 -0800485 deps = [
Austin Schuh04eccfc2020-08-26 21:08:27 -0700486 "//aos:configuration",
Austin Schuh8bd96322020-02-13 21:18:22 -0800487 "//aos/time",
Austin Schuh85357ee2020-08-24 16:41:42 -0700488 "@com_google_absl//absl/strings",
Austin Schuh8bd96322020-02-13 21:18:22 -0800489 ],
490)
491
Austin Schuh0ca1fd32020-12-18 22:53:05 -0800492cc_library(
493 name = "multinode_timestamp_filter",
494 srcs = ["multinode_timestamp_filter.cc"],
495 hdrs = ["multinode_timestamp_filter.h"],
496 target_compatible_with = ["@platforms//os:linux"],
497 deps = [
498 ":timestamp_filter",
499 "//aos:configuration",
500 "//aos/events:simulated_event_loop",
Austin Schuhe639ea12021-01-25 13:00:22 -0800501 "//aos/events/logging:logfile_utils",
Austin Schuh0ca1fd32020-12-18 22:53:05 -0800502 "//aos/time",
Austin Schuh0ca1fd32020-12-18 22:53:05 -0800503 "@org_tuxfamily_eigen//:eigen",
504 ],
505)
506
Austin Schuh8bd96322020-02-13 21:18:22 -0800507cc_test(
508 name = "timestamp_filter_test",
509 srcs = [
510 "timestamp_filter_test.cc",
511 ],
Philipp Schraderdada1072020-11-24 11:34:46 -0800512 target_compatible_with = ["@platforms//os:linux"],
Austin Schuh8bd96322020-02-13 21:18:22 -0800513 deps = [
514 ":timestamp_filter",
Austin Schuh04eccfc2020-08-26 21:08:27 -0700515 "//aos:json_to_flatbuffer",
Austin Schuh8bd96322020-02-13 21:18:22 -0800516 "//aos/testing:googletest",
517 ],
518)
Austin Schuh7466fe12020-12-29 23:01:47 -0800519
Austin Schuha9abc032021-01-01 16:46:19 -0800520cc_library(
521 name = "testing_time_converter",
522 testonly = True,
523 srcs = ["testing_time_converter.cc"],
524 hdrs = ["testing_time_converter.h"],
525 deps = [
526 ":multinode_timestamp_filter",
527 "//aos/events:simulated_event_loop",
528 "//aos/time",
529 ],
530)
531
Austin Schuh7466fe12020-12-29 23:01:47 -0800532cc_test(
533 name = "multinode_timestamp_filter_test",
534 srcs = [
535 "multinode_timestamp_filter_test.cc",
536 ],
537 target_compatible_with = ["@platforms//os:linux"],
538 deps = [
539 ":multinode_timestamp_filter",
Austin Schuha9abc032021-01-01 16:46:19 -0800540 ":testing_time_converter",
Austin Schuh7466fe12020-12-29 23:01:47 -0800541 ":timestamp_filter",
542 "//aos/testing:googletest",
Austin Schuh7466fe12020-12-29 23:01:47 -0800543 ],
544)