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 | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 40 | name = "timestamp_fbs", |
| 41 | srcs = ["timestamp.fbs"], |
| 42 | gen_reflections = 1, |
| 43 | includes = [ |
| 44 | "//aos:configuration_fbs_includes", |
| 45 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 46 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 47 | ) |
| 48 | |
| 49 | flatbuffer_cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 50 | 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 Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 57 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 58 | ) |
| 59 | |
| 60 | flatbuffer_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 Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 67 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 68 | ) |
| 69 | |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 70 | cc_library( |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 71 | name = "team_number", |
| 72 | srcs = [ |
| 73 | "team_number.cc", |
| 74 | ], |
| 75 | hdrs = [ |
| 76 | "team_number.h", |
| 77 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 78 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 79 | deps = [ |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 80 | "//aos/util:string_to_num", |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 81 | "@com_github_google_glog//:glog", |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 82 | ], |
Brian Silverman | 100534c | 2015-09-07 15:51:23 -0400 | [diff] [blame] | 83 | ) |
| 84 | |
Austin Schuh | df5591e | 2015-12-19 22:36:50 -0800 | [diff] [blame] | 85 | cc_test( |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 86 | name = "team_number_test", |
| 87 | srcs = [ |
| 88 | "team_number_test.cc", |
| 89 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 90 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 91 | deps = [ |
| 92 | ":team_number", |
Jim Ostrowski | 8565b40 | 2020-02-29 20:26:53 -0800 | [diff] [blame] | 93 | "//aos:configuration", |
Brian Silverman | 7a7c24d | 2018-09-01 17:49:09 -0700 | [diff] [blame] | 94 | "//aos/testing:googletest", |
| 95 | ], |
Austin Schuh | df5591e | 2015-12-19 22:36:50 -0800 | [diff] [blame] | 96 | ) |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 97 | |
| 98 | cc_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 Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 110 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 111 | deps = [ |
| 112 | "//aos:unique_malloc_ptr", |
Austin Schuh | 2fe4b71 | 2020-03-15 14:21:45 -0700 | [diff] [blame] | 113 | "//aos/util:file", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 114 | "//third_party/lksctp-tools:sctp", |
| 115 | "@com_github_google_glog//:glog", |
| 116 | ], |
| 117 | ) |
| 118 | |
| 119 | cc_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 Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 130 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 131 | deps = [ |
| 132 | ":sctp_lib", |
| 133 | "//third_party/lksctp-tools:sctp", |
| 134 | ], |
| 135 | ) |
| 136 | |
| 137 | cc_library( |
| 138 | name = "message_bridge_protocol", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 139 | srcs = [ |
| 140 | "message_bridge_protocol.cc", |
| 141 | ], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 142 | hdrs = [ |
| 143 | "message_bridge_protocol.h", |
| 144 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 145 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 146 | deps = [ |
| 147 | ":connect_fbs", |
| 148 | "//aos:configuration", |
| 149 | "//aos:flatbuffer_merge", |
| 150 | "//aos:flatbuffers", |
Austin Schuh | 4385b14 | 2021-03-14 21:31:13 -0700 | [diff] [blame^] | 151 | "//aos:uuid", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 152 | "@com_github_google_flatbuffers//:flatbuffers", |
| 153 | ], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 154 | ) |
| 155 | |
| 156 | cc_library( |
Austin Schuh | e19b675 | 2020-08-27 23:20:19 -0700 | [diff] [blame] | 157 | name = "message_bridge_server_status", |
| 158 | srcs = [ |
| 159 | "message_bridge_server_status.cc", |
| 160 | ], |
| 161 | hdrs = [ |
| 162 | "message_bridge_server_status.h", |
| 163 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 164 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e19b675 | 2020-08-27 23:20:19 -0700 | [diff] [blame] | 165 | 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 | |
| 177 | cc_library( |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 178 | 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 | |
| 191 | cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 192 | 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 Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 202 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 203 | deps = [ |
| 204 | ":connect_fbs", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 205 | ":message_bridge_client_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 206 | ":message_bridge_protocol", |
| 207 | ":message_bridge_server_fbs", |
Austin Schuh | e19b675 | 2020-08-27 23:20:19 -0700 | [diff] [blame] | 208 | ":message_bridge_server_status", |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 209 | ":remote_message_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 210 | ":sctp_lib", |
| 211 | ":sctp_server", |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 212 | ":timestamp_channel", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 213 | ":timestamp_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 214 | "//aos:unique_malloc_ptr", |
| 215 | "//aos/events:shm_event_loop", |
Austin Schuh | b06f03b | 2021-02-17 22:00:37 -0800 | [diff] [blame] | 216 | "//aos/events/logging:log_reader", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 217 | "//third_party/lksctp-tools:sctp", |
| 218 | ], |
| 219 | ) |
| 220 | |
| 221 | cc_binary( |
| 222 | name = "message_bridge_server", |
| 223 | srcs = [ |
| 224 | "message_bridge_server.cc", |
| 225 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 226 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 227 | deps = [ |
| 228 | ":message_bridge_server_lib", |
| 229 | "//aos:init", |
| 230 | "//aos:json_to_flatbuffer", |
| 231 | "//aos/events:shm_event_loop", |
| 232 | ], |
| 233 | ) |
| 234 | |
| 235 | cc_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 Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 246 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 247 | deps = [ |
| 248 | ":sctp_lib", |
| 249 | "//third_party/lksctp-tools:sctp", |
| 250 | ], |
| 251 | ) |
| 252 | |
| 253 | cc_library( |
Austin Schuh | ae2e7bf | 2020-08-27 23:42:56 -0700 | [diff] [blame] | 254 | name = "message_bridge_client_status", |
| 255 | srcs = [ |
| 256 | "message_bridge_client_status.cc", |
| 257 | ], |
| 258 | hdrs = [ |
| 259 | "message_bridge_client_status.h", |
| 260 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 261 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | ae2e7bf | 2020-08-27 23:42:56 -0700 | [diff] [blame] | 262 | 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 | |
| 272 | cc_library( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 273 | 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 Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 283 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 284 | deps = [ |
| 285 | ":connect_fbs", |
| 286 | ":message_bridge_client_fbs", |
Austin Schuh | ae2e7bf | 2020-08-27 23:42:56 -0700 | [diff] [blame] | 287 | ":message_bridge_client_status", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 288 | ":message_bridge_protocol", |
| 289 | ":message_bridge_server_fbs", |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 290 | ":remote_message_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 291 | ":sctp_client", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 292 | ":timestamp_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 293 | "//aos/events:shm_event_loop", |
Austin Schuh | b06f03b | 2021-02-17 22:00:37 -0800 | [diff] [blame] | 294 | "//aos/events/logging:log_reader", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 295 | ], |
| 296 | ) |
| 297 | |
| 298 | cc_binary( |
| 299 | name = "message_bridge_client", |
| 300 | srcs = [ |
| 301 | "message_bridge_client.cc", |
| 302 | ], |
| 303 | copts = [ |
| 304 | "-Wno-cast-align", |
| 305 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 306 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 307 | deps = [ |
| 308 | ":message_bridge_client_lib", |
| 309 | "//aos:init", |
| 310 | "//aos:json_to_flatbuffer", |
| 311 | "//aos/events:shm_event_loop", |
| 312 | ], |
| 313 | ) |
| 314 | |
| 315 | aos_config( |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 316 | 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 | |
| 330 | aos_config( |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 331 | name = "message_bridge_test_common_config", |
| 332 | src = "message_bridge_test_common.json", |
| 333 | flatbuffers = [ |
Austin Schuh | 0de30f3 | 2020-12-06 12:44:28 -0800 | [diff] [blame] | 334 | ":remote_message_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 335 | "//aos/events:ping_fbs", |
| 336 | "//aos/events:pong_fbs", |
| 337 | "//aos/network:message_bridge_client_fbs", |
| 338 | "//aos/network:message_bridge_server_fbs", |
Austin Schuh | 7bc5905 | 2020-02-16 23:48:33 -0800 | [diff] [blame] | 339 | "//aos/network:timestamp_fbs", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 340 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 341 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 342 | deps = ["//aos/events:config"], |
| 343 | ) |
| 344 | |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 345 | cc_test( |
| 346 | name = "message_bridge_test", |
| 347 | srcs = [ |
| 348 | "message_bridge_test.cc", |
| 349 | ], |
| 350 | data = [ |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 351 | ":message_bridge_test_combined_timestamps_common_config", |
Austin Schuh | f466ab5 | 2021-02-16 22:00:38 -0800 | [diff] [blame] | 352 | ":message_bridge_test_common_config", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 353 | ], |
Austin Schuh | 025ff51 | 2021-02-07 23:06:48 -0800 | [diff] [blame] | 354 | flaky = True, |
Austin Schuh | 36a2c3e | 2021-02-18 22:28:38 -0800 | [diff] [blame] | 355 | shard_count = 10, |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 356 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 357 | 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 Silverman | 7b266d9 | 2021-02-17 21:24:02 -0800 | [diff] [blame] | 364 | "//aos/ipc_lib:event", |
Austin Schuh | e84c3ed | 2019-12-14 15:29:48 -0800 | [diff] [blame] | 365 | "//aos/testing:googletest", |
| 366 | ], |
| 367 | ) |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 368 | |
| 369 | flatbuffer_cc_library( |
| 370 | name = "web_proxy_fbs", |
| 371 | srcs = ["web_proxy.fbs"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 372 | gen_reflections = True, |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 373 | includes = [ |
| 374 | ":connect_fbs_includes", |
| 375 | "//aos:configuration_fbs_includes", |
| 376 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 377 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 378 | ) |
| 379 | |
| 380 | flatbuffer_ts_library( |
| 381 | name = "web_proxy_ts_fbs", |
| 382 | srcs = ["web_proxy.fbs"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 383 | includes = [ |
| 384 | ":connect_fbs_includes", |
| 385 | "//aos:configuration_fbs_includes", |
| 386 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 387 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 388 | ) |
| 389 | |
| 390 | cc_library( |
| 391 | name = "web_proxy_utils", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 392 | srcs = ["web_proxy_utils.cc"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 393 | hdrs = ["web_proxy_utils.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 394 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 395 | 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 Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 402 | ) |
| 403 | |
| 404 | cc_library( |
| 405 | name = "web_proxy", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 406 | srcs = ["web_proxy.cc"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 407 | hdrs = ["web_proxy.h"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 408 | copts = [ |
| 409 | "-DWEBRTC_POSIX", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 410 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 411 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 412 | deps = [ |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 413 | ":connect_fbs", |
James Kuszmaul | 4867136 | 2020-12-24 13:54:16 -0800 | [diff] [blame] | 414 | ":gen_embedded", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 415 | ":web_proxy_fbs", |
Alex Perry | 5f474f2 | 2020-02-01 12:14:24 -0800 | [diff] [blame] | 416 | ":web_proxy_utils", |
| 417 | "//aos/events:shm_event_loop", |
James Kuszmaul | 8d928d0 | 2020-12-25 17:47:49 -0800 | [diff] [blame] | 418 | "//aos/mutex", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 419 | "//aos/seasocks:seasocks_logger", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 420 | "//third_party:webrtc", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 421 | "//third_party/seasocks", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 422 | "@com_github_google_glog//:glog", |
| 423 | ], |
| 424 | ) |
| 425 | |
| 426 | gen_embedded( |
| 427 | name = "gen_embedded", |
| 428 | srcs = glob( |
| 429 | include = ["www_defaults/**/*"], |
| 430 | exclude = ["www/**/*"], |
| 431 | ), |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 432 | target_compatible_with = ["@platforms//os:linux"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 433 | ) |
| 434 | |
| 435 | cc_binary( |
| 436 | name = "web_proxy_main", |
| 437 | srcs = ["web_proxy_main.cc"], |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 438 | copts = [ |
| 439 | "-DWEBRTC_POSIX", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 440 | ], |
| 441 | data = [ |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 442 | "//aos/network/www:files", |
Austin Schuh | da9d060 | 2019-09-15 17:29:38 -0700 | [diff] [blame] | 443 | "//aos/network/www:main_bundle.min.js", |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 444 | "@com_github_google_flatbuffers//:flatjs", |
| 445 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 446 | target_compatible_with = ["@platforms//os:linux"], |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 447 | deps = [ |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 448 | ":web_proxy", |
| 449 | "//aos:init", |
| 450 | "//aos/events:shm_event_loop", |
Brian Silverman | 3dfbfb1 | 2020-02-17 20:35:18 -0800 | [diff] [blame] | 451 | "@com_github_google_flatbuffers//:flatbuffers", |
Alex Perry | b3b5079 | 2020-01-18 16:13:45 -0800 | [diff] [blame] | 452 | ], |
| 453 | ) |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 454 | |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 455 | cc_binary( |
| 456 | name = "log_web_proxy_main", |
| 457 | srcs = ["log_web_proxy_main.cc"], |
| 458 | args = [ |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 459 | "--data_dir=aos/network/www", |
| 460 | ], |
| 461 | copts = [ |
| 462 | "-DWEBRTC_POSIX", |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 463 | ], |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 464 | deps = [ |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 465 | ":web_proxy", |
| 466 | "//aos:init", |
| 467 | "//aos/events:simulated_event_loop", |
Austin Schuh | b06f03b | 2021-02-17 22:00:37 -0800 | [diff] [blame] | 468 | "//aos/events/logging:log_reader", |
James Kuszmaul | 71a8193 | 2020-12-15 21:08:01 -0800 | [diff] [blame] | 469 | "@com_github_google_flatbuffers//:flatbuffers", |
| 470 | ], |
| 471 | ) |
| 472 | |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 473 | cc_library( |
| 474 | name = "timestamp_filter", |
Austin Schuh | 7ee6f72 | 2020-08-24 16:19:36 -0700 | [diff] [blame] | 475 | srcs = ["timestamp_filter.cc"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 476 | hdrs = ["timestamp_filter.h"], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 477 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 478 | deps = [ |
Austin Schuh | 04eccfc | 2020-08-26 21:08:27 -0700 | [diff] [blame] | 479 | "//aos:configuration", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 480 | "//aos/time", |
Austin Schuh | 85357ee | 2020-08-24 16:41:42 -0700 | [diff] [blame] | 481 | "@com_google_absl//absl/strings", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 482 | ], |
| 483 | ) |
| 484 | |
Austin Schuh | 0ca1fd3 | 2020-12-18 22:53:05 -0800 | [diff] [blame] | 485 | cc_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 Schuh | e639ea1 | 2021-01-25 13:00:22 -0800 | [diff] [blame] | 494 | "//aos/events/logging:logfile_utils", |
Austin Schuh | 0ca1fd3 | 2020-12-18 22:53:05 -0800 | [diff] [blame] | 495 | "//aos/time", |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 496 | "@com_github_stevengj_nlopt//:nlopt", |
Austin Schuh | 0ca1fd3 | 2020-12-18 22:53:05 -0800 | [diff] [blame] | 497 | "@org_tuxfamily_eigen//:eigen", |
| 498 | ], |
| 499 | ) |
| 500 | |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 501 | cc_test( |
| 502 | name = "timestamp_filter_test", |
| 503 | srcs = [ |
| 504 | "timestamp_filter_test.cc", |
| 505 | ], |
Philipp Schrader | dada107 | 2020-11-24 11:34:46 -0800 | [diff] [blame] | 506 | target_compatible_with = ["@platforms//os:linux"], |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 507 | deps = [ |
| 508 | ":timestamp_filter", |
Austin Schuh | 04eccfc | 2020-08-26 21:08:27 -0700 | [diff] [blame] | 509 | "//aos:json_to_flatbuffer", |
Austin Schuh | 8bd9632 | 2020-02-13 21:18:22 -0800 | [diff] [blame] | 510 | "//aos/testing:googletest", |
| 511 | ], |
| 512 | ) |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 513 | |
Austin Schuh | a9abc03 | 2021-01-01 16:46:19 -0800 | [diff] [blame] | 514 | cc_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 Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 526 | cc_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 Schuh | a9abc03 | 2021-01-01 16:46:19 -0800 | [diff] [blame] | 534 | ":testing_time_converter", |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 535 | ":timestamp_filter", |
| 536 | "//aos/testing:googletest", |
Austin Schuh | 87dd383 | 2021-01-01 23:07:31 -0800 | [diff] [blame] | 537 | "//third_party/gmp", |
Austin Schuh | 7466fe1 | 2020-12-29 23:01:47 -0800 | [diff] [blame] | 538 | "@com_github_stevengj_nlopt//:nlopt", |
| 539 | ], |
| 540 | ) |