Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 1 | load("//aos/seasocks:gen_embedded.bzl", "gen_embedded") |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 2 | load("//aos:config.bzl", "aos_config") |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 3 | load("//aos:flatbuffers.bzl", "cc_static_flatbuffer") |
| 4 | load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_cc_library", "flatbuffer_ts_library") |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 5 | |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 6 | package(default_visibility = ["//visibility:public"]) |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 7 | |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 8 | flatbuffer_cc_library( |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 9 | name = "remote_message_fbs", |
| 10 | srcs = ["remote_message.fbs"], |
| 11 | gen_reflections = 1, |
| 12 | ) |
| 13 | |
| 14 | cc_static_flatbuffer( |
| 15 | name = "remote_message_schema", |
| 16 | function = "aos::message_bridge::RemoteMessageSchema", |
| 17 | target = ":remote_message_fbs_reflection_out", |
| 18 | ) |
| 19 | |
| 20 | flatbuffer_cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 21 | name = "connect_fbs", |
| 22 | srcs = ["connect.fbs"], |
| 23 | gen_reflections = 1, |
| 24 | includes = [ |
| 25 | "//aos:configuration_fbs_includes", |
| 26 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 27 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 28 | ) |
| 29 | |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 30 | flatbuffer_ts_library( |
| 31 | name = "connect_ts_fbs", |
| 32 | srcs = ["connect.fbs"], |
| 33 | includes = [ |
| 34 | "//aos:configuration_fbs_includes", |
| 35 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 36 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | d5e1357 | 2020-02-22 15:15:08 -0800 | [diff] [blame] | 37 | ) |
| 38 | |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 39 | flatbuffer_cc_library( |
Austin Schuh | f068dca | 2021-03-14 21:38:40 -0700 | [diff] [blame] | 40 | name = "remote_data_fbs", |
| 41 | srcs = ["remote_data.fbs"], |
| 42 | gen_reflections = 1, |
| 43 | target_compatible_with = ["@platforms//os:linux"], |
| 44 | ) |
| 45 | |
| 46 | flatbuffer_cc_library( |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 47 | name = "timestamp_fbs", |
| 48 | srcs = ["timestamp.fbs"], |
| 49 | gen_reflections = 1, |
| 50 | includes = [ |
| 51 | "//aos:configuration_fbs_includes", |
| 52 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 53 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 54 | ) |
| 55 | |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 56 | cc_static_flatbuffer( |
| 57 | name = "timestamp_schema", |
| 58 | function = "aos::message_bridge::TimestampSchema", |
| 59 | target = ":timestamp_fbs_reflection_out", |
| 60 | visibility = ["//visibility:public"], |
| 61 | ) |
| 62 | |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 63 | flatbuffer_cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 64 | name = "message_bridge_client_fbs", |
| 65 | srcs = ["message_bridge_client.fbs"], |
| 66 | gen_reflections = 1, |
| 67 | includes = [ |
| 68 | ":message_bridge_server_fbs_includes", |
| 69 | "//aos:configuration_fbs_includes", |
| 70 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 71 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 72 | ) |
| 73 | |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 74 | cc_static_flatbuffer( |
| 75 | name = "message_bridge_client_schema", |
| 76 | function = "aos::message_bridge::ClientStatisticsSchema", |
| 77 | target = ":message_bridge_client_fbs_reflection_out", |
| 78 | visibility = ["//visibility:public"], |
| 79 | ) |
| 80 | |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 81 | flatbuffer_cc_library( |
| 82 | name = "message_bridge_server_fbs", |
| 83 | srcs = ["message_bridge_server.fbs"], |
| 84 | gen_reflections = 1, |
| 85 | includes = [ |
| 86 | "//aos:configuration_fbs_includes", |
| 87 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 88 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 89 | ) |
| 90 | |
Austin Schuh | a9df9ad | 2021-06-16 14:49:39 -0700 | [diff] [blame] | 91 | cc_static_flatbuffer( |
| 92 | name = "message_bridge_server_schema", |
| 93 | function = "aos::message_bridge::ServerStatisticsSchema", |
| 94 | target = ":message_bridge_server_fbs_reflection_out", |
| 95 | visibility = ["//visibility:public"], |
| 96 | ) |
| 97 | |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 98 | cc_library( |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 99 | name = "team_number", |
| 100 | srcs = [ |
| 101 | "team_number.cc", |
| 102 | ], |
| 103 | hdrs = [ |
| 104 | "team_number.h", |
| 105 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 106 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 107 | deps = [ |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 108 | "@com_github_google_glog//:glog", |
Austin Schuh | 4c84abb | 2021-06-20 18:16:32 -0700 | [diff] [blame] | 109 | "@com_google_absl//absl/strings", |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 110 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 111 | ) |
| 112 | |
Austin Schuh | df5591e | 2015-12-19 22:36:50 -0800 | [diff] [blame] | 113 | cc_test( |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 114 | name = "team_number_test", |
| 115 | srcs = [ |
| 116 | "team_number_test.cc", |
| 117 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 118 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 119 | deps = [ |
| 120 | ":team_number", |
Jim Ostrowski | 8565b40 | 2020-02-29 20:26:53 -0800 | [diff] [blame] | 121 | "//aos:configuration", |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 122 | "//aos/testing:googletest", |
| 123 | ], |
Austin Schuh | df5591e | 2015-12-19 22:36:50 -0800 | [diff] [blame] | 124 | ) |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 125 | |
| 126 | cc_library( |
| 127 | name = "sctp_lib", |
| 128 | srcs = [ |
| 129 | "sctp_lib.cc", |
| 130 | ], |
| 131 | hdrs = [ |
| 132 | "sctp_lib.h", |
| 133 | ], |
| 134 | copts = [ |
| 135 | # The casts required to read datastructures from sockets trip -Wcast-align. |
| 136 | "-Wno-cast-align", |
| 137 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 138 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 139 | deps = [ |
| 140 | "//aos:unique_malloc_ptr", |
Austin Schuh | 2fe4b71 | 2020-03-15 14:21:45 -0700 | [diff] [blame] | 141 | "//aos/util:file", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 142 | "//third_party/lksctp-tools:sctp", |
| 143 | "@com_github_google_glog//:glog", |
| 144 | ], |
| 145 | ) |
| 146 | |
| 147 | cc_library( |
| 148 | name = "sctp_server", |
| 149 | srcs = [ |
| 150 | "sctp_server.cc", |
| 151 | ], |
| 152 | hdrs = [ |
| 153 | "sctp_server.h", |
| 154 | ], |
| 155 | copts = [ |
| 156 | "-Wno-cast-align", |
| 157 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 158 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 159 | deps = [ |
| 160 | ":sctp_lib", |
| 161 | "//third_party/lksctp-tools:sctp", |
| 162 | ], |
| 163 | ) |
| 164 | |
| 165 | cc_library( |
| 166 | name = "message_bridge_protocol", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 167 | srcs = [ |
| 168 | "message_bridge_protocol.cc", |
| 169 | ], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 170 | hdrs = [ |
| 171 | "message_bridge_protocol.h", |
| 172 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 173 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 174 | deps = [ |
| 175 | ":connect_fbs", |
| 176 | "//aos:configuration", |
| 177 | "//aos:flatbuffer_merge", |
| 178 | "//aos:flatbuffers", |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame] | 179 | "//aos:uuid", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 180 | "@com_github_google_flatbuffers//:flatbuffers", |
| 181 | ], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 182 | ) |
| 183 | |
| 184 | cc_library( |
Austin Schuh | e19b675 | 2020-08-27 23:20:19 -0700 | [diff] [blame] | 185 | name = "message_bridge_server_status", |
| 186 | srcs = [ |
| 187 | "message_bridge_server_status.cc", |
| 188 | ], |
| 189 | hdrs = [ |
| 190 | "message_bridge_server_status.h", |
| 191 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 192 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e19b675 | 2020-08-27 23:20:19 -0700 | [diff] [blame] | 193 | deps = [ |
| 194 | ":message_bridge_client_fbs", |
| 195 | ":message_bridge_server_fbs", |
| 196 | ":timestamp_fbs", |
| 197 | ":timestamp_filter", |
| 198 | "//aos:flatbuffer_merge", |
| 199 | "//aos:flatbuffers", |
| 200 | "//aos/events:event_loop", |
| 201 | "//aos/time", |
| 202 | ], |
| 203 | ) |
| 204 | |
| 205 | cc_library( |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 206 | name = "timestamp_channel", |
| 207 | srcs = ["timestamp_channel.cc"], |
| 208 | hdrs = ["timestamp_channel.h"], |
| 209 | deps = [ |
| 210 | ":remote_message_fbs", |
| 211 | "//aos:configuration", |
| 212 | "//aos/events:event_loop", |
| 213 | "@com_github_google_glog//:glog", |
| 214 | "@com_google_absl//absl/container:btree", |
| 215 | "@com_google_absl//absl/strings", |
| 216 | ], |
| 217 | ) |
| 218 | |
| 219 | cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 220 | name = "message_bridge_server_lib", |
| 221 | srcs = [ |
| 222 | "message_bridge_server_lib.cc", |
| 223 | ], |
| 224 | hdrs = [ |
| 225 | "message_bridge_server_lib.h", |
| 226 | ], |
| 227 | copts = [ |
| 228 | "-Wno-cast-align", |
| 229 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 230 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 231 | deps = [ |
| 232 | ":connect_fbs", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 233 | ":message_bridge_client_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 234 | ":message_bridge_protocol", |
| 235 | ":message_bridge_server_fbs", |
Austin Schuh | e19b675 | 2020-08-27 23:20:19 -0700 | [diff] [blame] | 236 | ":message_bridge_server_status", |
Austin Schuh | f068dca | 2021-03-14 21:38:40 -0700 | [diff] [blame] | 237 | ":remote_data_fbs", |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 238 | ":remote_message_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 239 | ":sctp_lib", |
| 240 | ":sctp_server", |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 241 | ":timestamp_channel", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 242 | ":timestamp_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 243 | "//aos:unique_malloc_ptr", |
| 244 | "//aos/events:shm_event_loop", |
Austin Schuh | b06f03b | 2021-02-17 22:00:37 -0800 | [diff] [blame] | 245 | "//aos/events/logging:log_reader", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 246 | "//third_party/lksctp-tools:sctp", |
| 247 | ], |
| 248 | ) |
| 249 | |
| 250 | cc_binary( |
| 251 | name = "message_bridge_server", |
| 252 | srcs = [ |
| 253 | "message_bridge_server.cc", |
| 254 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 255 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 256 | deps = [ |
| 257 | ":message_bridge_server_lib", |
| 258 | "//aos:init", |
| 259 | "//aos:json_to_flatbuffer", |
| 260 | "//aos/events:shm_event_loop", |
| 261 | ], |
| 262 | ) |
| 263 | |
| 264 | cc_library( |
| 265 | name = "sctp_client", |
| 266 | srcs = [ |
| 267 | "sctp_client.cc", |
| 268 | ], |
| 269 | hdrs = [ |
| 270 | "sctp_client.h", |
| 271 | ], |
| 272 | copts = [ |
| 273 | "-Wno-cast-align", |
| 274 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 275 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 276 | deps = [ |
| 277 | ":sctp_lib", |
| 278 | "//third_party/lksctp-tools:sctp", |
| 279 | ], |
| 280 | ) |
| 281 | |
| 282 | cc_library( |
Austin Schuh | ae2e7bf | 2020-08-27 23:42:56 -0700 | [diff] [blame] | 283 | name = "message_bridge_client_status", |
| 284 | srcs = [ |
| 285 | "message_bridge_client_status.cc", |
| 286 | ], |
| 287 | hdrs = [ |
| 288 | "message_bridge_client_status.h", |
| 289 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 290 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | ae2e7bf | 2020-08-27 23:42:56 -0700 | [diff] [blame] | 291 | deps = [ |
| 292 | ":message_bridge_client_fbs", |
| 293 | ":message_bridge_server_fbs", |
| 294 | ":timestamp_filter", |
| 295 | "//aos:flatbuffers", |
| 296 | "//aos/events:event_loop", |
| 297 | "//aos/time", |
| 298 | ], |
| 299 | ) |
| 300 | |
| 301 | cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 302 | name = "message_bridge_client_lib", |
| 303 | srcs = [ |
| 304 | "message_bridge_client_lib.cc", |
| 305 | ], |
| 306 | hdrs = [ |
| 307 | "message_bridge_client_lib.h", |
| 308 | ], |
| 309 | copts = [ |
| 310 | "-Wno-cast-align", |
| 311 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 312 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 313 | deps = [ |
| 314 | ":connect_fbs", |
| 315 | ":message_bridge_client_fbs", |
Austin Schuh | ae2e7bf | 2020-08-27 23:42:56 -0700 | [diff] [blame] | 316 | ":message_bridge_client_status", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 317 | ":message_bridge_protocol", |
| 318 | ":message_bridge_server_fbs", |
Austin Schuh | f068dca | 2021-03-14 21:38:40 -0700 | [diff] [blame] | 319 | ":remote_data_fbs", |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 320 | ":remote_message_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 321 | ":sctp_client", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 322 | ":timestamp_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 323 | "//aos/events:shm_event_loop", |
Austin Schuh | b06f03b | 2021-02-17 22:00:37 -0800 | [diff] [blame] | 324 | "//aos/events/logging:log_reader", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 325 | ], |
| 326 | ) |
| 327 | |
| 328 | cc_binary( |
| 329 | name = "message_bridge_client", |
| 330 | srcs = [ |
| 331 | "message_bridge_client.cc", |
| 332 | ], |
| 333 | copts = [ |
| 334 | "-Wno-cast-align", |
| 335 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 336 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 337 | deps = [ |
| 338 | ":message_bridge_client_lib", |
| 339 | "//aos:init", |
| 340 | "//aos:json_to_flatbuffer", |
| 341 | "//aos/events:shm_event_loop", |
| 342 | ], |
| 343 | ) |
| 344 | |
| 345 | aos_config( |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 346 | name = "message_bridge_test_combined_timestamps_common_config", |
| 347 | src = "message_bridge_test_combined_timestamps_common.json", |
| 348 | flatbuffers = [ |
| 349 | ":remote_message_fbs", |
| 350 | "//aos/events:ping_fbs", |
| 351 | "//aos/events:pong_fbs", |
| 352 | "//aos/network:message_bridge_client_fbs", |
| 353 | "//aos/network:message_bridge_server_fbs", |
| 354 | "//aos/network:timestamp_fbs", |
| 355 | ], |
| 356 | target_compatible_with = ["@platforms//os:linux"], |
| 357 | deps = ["//aos/events:config"], |
| 358 | ) |
| 359 | |
| 360 | aos_config( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 361 | name = "message_bridge_test_common_config", |
| 362 | src = "message_bridge_test_common.json", |
| 363 | flatbuffers = [ |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 364 | ":remote_message_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 365 | "//aos/events:ping_fbs", |
| 366 | "//aos/events:pong_fbs", |
| 367 | "//aos/network:message_bridge_client_fbs", |
| 368 | "//aos/network:message_bridge_server_fbs", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 369 | "//aos/network:timestamp_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 370 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 371 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 372 | deps = ["//aos/events:config"], |
| 373 | ) |
| 374 | |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 375 | cc_test( |
| 376 | name = "message_bridge_test", |
| 377 | srcs = [ |
| 378 | "message_bridge_test.cc", |
| 379 | ], |
| 380 | data = [ |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 381 | ":message_bridge_test_combined_timestamps_common_config", |
Austin Schuh | f466ab5 | 2021-02-16 22:00:38 -0800 | [diff] [blame] | 382 | ":message_bridge_test_common_config", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 383 | ], |
Austin Schuh | 025ff51 | 2021-02-07 23:06:48 -0800 | [diff] [blame] | 384 | flaky = True, |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 385 | shard_count = 10, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 386 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 387 | deps = [ |
| 388 | ":message_bridge_client_lib", |
| 389 | ":message_bridge_server_lib", |
| 390 | "//aos:json_to_flatbuffer", |
| 391 | "//aos/events:ping_fbs", |
| 392 | "//aos/events:pong_fbs", |
| 393 | "//aos/events:shm_event_loop", |
Brian Silverman | 7b266d9 | 2021-02-17 21:24:02 -0800 | [diff] [blame] | 394 | "//aos/ipc_lib:event", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 395 | "//aos/testing:googletest", |
Austin Schuh | 373f176 | 2021-06-02 21:07:09 -0700 | [diff] [blame] | 396 | "//aos/testing:path", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 397 | ], |
| 398 | ) |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 399 | |
| 400 | flatbuffer_cc_library( |
| 401 | name = "web_proxy_fbs", |
| 402 | srcs = ["web_proxy.fbs"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 403 | gen_reflections = True, |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 404 | includes = [ |
| 405 | ":connect_fbs_includes", |
| 406 | "//aos:configuration_fbs_includes", |
| 407 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 408 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 409 | ) |
| 410 | |
| 411 | flatbuffer_ts_library( |
| 412 | name = "web_proxy_ts_fbs", |
| 413 | srcs = ["web_proxy.fbs"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 414 | includes = [ |
| 415 | ":connect_fbs_includes", |
| 416 | "//aos:configuration_fbs_includes", |
| 417 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 418 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 419 | ) |
| 420 | |
| 421 | cc_library( |
| 422 | name = "web_proxy_utils", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 423 | srcs = ["web_proxy_utils.cc"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 424 | hdrs = ["web_proxy_utils.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 425 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 426 | deps = [ |
| 427 | ":connect_fbs", |
| 428 | ":web_proxy_fbs", |
| 429 | "//aos:configuration_fbs", |
| 430 | "//aos/events:event_loop", |
| 431 | "@com_github_google_flatbuffers//:flatbuffers", |
| 432 | ], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 433 | ) |
| 434 | |
| 435 | cc_library( |
| 436 | name = "web_proxy", |
Austin Schuh | 52e5e3a | 2021-04-24 22:30:02 -0700 | [diff] [blame] | 437 | srcs = [ |
| 438 | "rawrtc.cc", |
| 439 | "web_proxy.cc", |
| 440 | ], |
| 441 | hdrs = [ |
| 442 | "rawrtc.h", |
| 443 | "web_proxy.h", |
| 444 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 445 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 446 | deps = [ |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 447 | ":connect_fbs", |
James Kuszmaul | 4867136 | 2020-12-24 13:54:16 -0800 | [diff] [blame] | 448 | ":gen_embedded", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 449 | ":web_proxy_fbs", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 450 | ":web_proxy_utils", |
| 451 | "//aos/events:shm_event_loop", |
James Kuszmaul | 8d928d0 | 2020-12-25 17:47:49 -0800 | [diff] [blame] | 452 | "//aos/mutex", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 453 | "//aos/seasocks:seasocks_logger", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 454 | "//third_party/seasocks", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 455 | "@com_github_google_glog//:glog", |
Austin Schuh | 52e5e3a | 2021-04-24 22:30:02 -0700 | [diff] [blame] | 456 | "@com_github_rawrtc_rawrtc//:rawrtc", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 457 | ], |
| 458 | ) |
| 459 | |
| 460 | gen_embedded( |
| 461 | name = "gen_embedded", |
| 462 | srcs = glob( |
| 463 | include = ["www_defaults/**/*"], |
| 464 | exclude = ["www/**/*"], |
| 465 | ), |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 466 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 467 | ) |
| 468 | |
| 469 | cc_binary( |
| 470 | name = "web_proxy_main", |
| 471 | srcs = ["web_proxy_main.cc"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 472 | data = [ |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 473 | "//aos/network/www:files", |
Austin Schuh | da9d060 | 2019-09-15 17:29:38 -0700 | [diff] [blame] | 474 | "//aos/network/www:main_bundle.min.js", |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 475 | "@com_github_google_flatbuffers//:flatjs", |
| 476 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 477 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 478 | deps = [ |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 479 | ":web_proxy", |
| 480 | "//aos:init", |
| 481 | "//aos/events:shm_event_loop", |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 482 | "@com_github_google_flatbuffers//:flatbuffers", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 483 | ], |
| 484 | ) |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 485 | |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 486 | cc_binary( |
| 487 | name = "log_web_proxy_main", |
| 488 | srcs = ["log_web_proxy_main.cc"], |
| 489 | args = [ |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 490 | "--data_dir=aos/network/www", |
| 491 | ], |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 492 | deps = [ |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 493 | ":web_proxy", |
| 494 | "//aos:init", |
| 495 | "//aos/events:simulated_event_loop", |
Austin Schuh | b06f03b | 2021-02-17 22:00:37 -0800 | [diff] [blame] | 496 | "//aos/events/logging:log_reader", |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 497 | "@com_github_google_flatbuffers//:flatbuffers", |
| 498 | ], |
| 499 | ) |
| 500 | |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 501 | cc_library( |
| 502 | name = "timestamp_filter", |
Austin Schuh | 7ee6f72 | 2020-08-24 16:19:36 -0700 | [diff] [blame] | 503 | srcs = ["timestamp_filter.cc"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 504 | hdrs = ["timestamp_filter.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 505 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 506 | deps = [ |
Austin Schuh | 04eccfc | 2020-08-26 21:08:27 -0700 | [diff] [blame] | 507 | "//aos:configuration", |
Austin Schuh | 6616884 | 2021-08-17 19:42:21 -0700 | [diff] [blame^] | 508 | "//aos/events/logging:boot_timestamp", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 509 | "//aos/time", |
Austin Schuh | 85357ee | 2020-08-24 16:41:42 -0700 | [diff] [blame] | 510 | "@com_google_absl//absl/strings", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 511 | ], |
| 512 | ) |
| 513 | |
Austin Schuh | 0ca1fd3 | 2020-12-18 22:53:05 -0800 | [diff] [blame] | 514 | cc_library( |
| 515 | name = "multinode_timestamp_filter", |
| 516 | srcs = ["multinode_timestamp_filter.cc"], |
| 517 | hdrs = ["multinode_timestamp_filter.h"], |
| 518 | target_compatible_with = ["@platforms//os:linux"], |
| 519 | deps = [ |
| 520 | ":timestamp_filter", |
| 521 | "//aos:configuration", |
| 522 | "//aos/events:simulated_event_loop", |
Austin Schuh | e639ea1 | 2021-01-25 13:00:22 -0800 | [diff] [blame] | 523 | "//aos/events/logging:logfile_utils", |
Austin Schuh | 0ca1fd3 | 2020-12-18 22:53:05 -0800 | [diff] [blame] | 524 | "//aos/time", |
Austin Schuh | 0ca1fd3 | 2020-12-18 22:53:05 -0800 | [diff] [blame] | 525 | "@org_tuxfamily_eigen//:eigen", |
| 526 | ], |
| 527 | ) |
| 528 | |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 529 | cc_test( |
| 530 | name = "timestamp_filter_test", |
| 531 | srcs = [ |
| 532 | "timestamp_filter_test.cc", |
| 533 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 534 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 535 | deps = [ |
| 536 | ":timestamp_filter", |
Austin Schuh | 04eccfc | 2020-08-26 21:08:27 -0700 | [diff] [blame] | 537 | "//aos:json_to_flatbuffer", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 538 | "//aos/testing:googletest", |
| 539 | ], |
| 540 | ) |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 541 | |
Austin Schuh | a9abc03 | 2021-01-01 16:46:19 -0800 | [diff] [blame] | 542 | cc_library( |
| 543 | name = "testing_time_converter", |
| 544 | testonly = True, |
| 545 | srcs = ["testing_time_converter.cc"], |
| 546 | hdrs = ["testing_time_converter.h"], |
| 547 | deps = [ |
| 548 | ":multinode_timestamp_filter", |
| 549 | "//aos/events:simulated_event_loop", |
| 550 | "//aos/time", |
| 551 | ], |
| 552 | ) |
| 553 | |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 554 | cc_test( |
| 555 | name = "multinode_timestamp_filter_test", |
| 556 | srcs = [ |
| 557 | "multinode_timestamp_filter_test.cc", |
| 558 | ], |
| 559 | target_compatible_with = ["@platforms//os:linux"], |
| 560 | deps = [ |
| 561 | ":multinode_timestamp_filter", |
Austin Schuh | a9abc03 | 2021-01-01 16:46:19 -0800 | [diff] [blame] | 562 | ":testing_time_converter", |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 563 | ":timestamp_filter", |
| 564 | "//aos/testing:googletest", |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 565 | ], |
| 566 | ) |