Removed Common
Change-Id: I01ea8f07220375c2ad9bc0092281d4f27c642303
diff --git a/aos/BUILD b/aos/BUILD
index 8aa274c..dd4c04b 100644
--- a/aos/BUILD
+++ b/aos/BUILD
@@ -1,8 +1,10 @@
+load("//tools:environments.bzl", "mcu_cpus")
+load("//aos/build:queues.bzl", "queue_library")
filegroup(
name = "prime_binaries",
srcs = [
- "//aos/common/logging:log_displayer",
- "//aos/common/logging:log_streamer",
+ "//aos/logging:log_displayer",
+ "//aos/logging:log_streamer",
"//aos/linux_code:core",
"//aos/linux_code/starter",
],
@@ -12,7 +14,7 @@
filegroup(
name = "prime_start_binaries",
srcs = [
- "//aos/common/logging:binary_log_writer",
+ "//aos/logging:binary_log_writer",
],
visibility = ["//visibility:public"],
)
@@ -22,8 +24,8 @@
srcs = [
# starter is hard coded to look for a non-stripped core...
"//aos/linux_code:core",
- "//aos/common/logging:log_streamer.stripped",
- "//aos/common/logging:log_displayer.stripped",
+ "//aos/logging:log_streamer.stripped",
+ "//aos/logging:log_displayer.stripped",
"//aos/linux_code/starter",
],
visibility = ["//visibility:public"],
@@ -32,12 +34,21 @@
filegroup(
name = "prime_start_binaries_stripped",
srcs = [
- "//aos/common/logging:binary_log_writer.stripped",
+ "//aos/logging:binary_log_writer.stripped",
],
visibility = ["//visibility:public"],
)
cc_library(
+ name = "math",
+ hdrs = [
+ "commonmath.h",
+ ],
+ compatible_with = mcu_cpus,
+ visibility = ["//visibility:public"],
+)
+
+cc_library(
name = "once",
srcs = [
"once-tmpl.h",
@@ -50,11 +61,22 @@
],
visibility = ["//visibility:public"],
deps = [
- "//aos/common:gtest_prod",
- "//aos/common:type_traits",
+ "//aos:gtest_prod",
+ "//aos/type_traits:type_traits",
],
)
+cc_library(
+ name = "byteorder",
+ hdrs = [
+ "byteorder.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ visibility = ["//visibility:public"],
+)
+
cc_test(
name = "once_test",
srcs = [
@@ -72,3 +94,251 @@
srcs = ["__init__.py"],
visibility = ["//visibility:public"],
)
+
+cc_library(
+ name="macros",
+ hdrs=(
+ "macros.h",
+ ),
+ compatible_with = mcu_cpus + [
+ "//tools:armhf-debian",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+cc_library(
+ name = "gtest_prod",
+ hdrs = [
+ "gtest_prod.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+cc_library(
+ name = "network_port",
+ hdrs = [
+ "network_port.h",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+genrule(
+ name = "gen_print_field",
+ outs = ["print_field.cc"],
+ cmd = "$(location //aos/build/queues:print_field) $@",
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ tools = ["//aos/build/queues:print_field"],
+ visibility = ["//visibility:private"],
+)
+
+cc_library(
+ name = "queue_types",
+ srcs = [
+ "print_field_helpers.h",
+ "queue_types.cc",
+ ":gen_print_field",
+ ],
+ hdrs = [
+ "queue_types.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ deps = [
+ "//aos:byteorder",
+ ":generated_queue_headers",
+ "//aos/mutex:mutex",
+ "//aos/time:time",
+ "//aos/logging:printf_formats",
+ "//aos/linux_code/ipc_lib:core_lib",
+ "//aos/linux_code/ipc_lib:shared_mem",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+cc_test(
+ name = "queue_types_test",
+ srcs = [
+ "queue_types_test.cc",
+ ],
+ deps = [
+ ":queue_types",
+ ":test_queue",
+ "//aos/logging",
+ "//aos/testing:googletest",
+ "//aos/testing:test_logging",
+ ],
+)
+
+cc_library(
+ name = "queues",
+ hdrs = [
+ "queue.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ deps = [
+ "//aos/messages:messages",
+ "//aos/linux_code:queue",
+ "//aos/linux_code/ipc_lib:queue",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+queue_library(
+ name = "test_queue",
+ srcs = [
+ "test_queue.q",
+ ],
+)
+
+genrule(
+ name = "gen_queue_primitives",
+ outs = ["queue_primitives.h"],
+ cmd = "$(location //aos/build/queues:queue_primitives) $@",
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ tools = ["//aos/build/queues:queue_primitives"],
+ visibility = ["//visibility:private"],
+)
+
+cc_library(
+ name = "generated_queue_headers",
+ hdrs = [
+ ":gen_queue_primitives",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ visibility = ["//aos/logging:__pkg__"],
+)
+
+cc_test(
+ name = "queue_test",
+ srcs = [
+ "queue_test.cc",
+ ],
+ deps = [
+ "//aos:die",
+ ":test_queue",
+ "//aos/util:thread",
+ "//aos/testing:googletest",
+ "//aos/testing:test_shm",
+ ],
+)
+
+cc_library(
+ name = "unique_malloc_ptr",
+ hdrs = [
+ "unique_malloc_ptr.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+cc_library(
+ name = "condition",
+ srcs = [
+ "condition.cc",
+ ],
+ hdrs = [
+ "condition.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ deps = [
+ "//aos/mutex:mutex",
+ "//aos/logging",
+ "//aos/linux_code/ipc_lib:aos_sync",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+cc_test(
+ name = "condition_test",
+ srcs = [
+ "condition_test.cc",
+ ],
+ deps = [
+ ":condition",
+ "//aos:die",
+ "//aos/mutex:mutex",
+ "//aos/time:time",
+ "//aos/logging",
+ "//aos/util:thread",
+ "//aos/linux_code/ipc_lib:aos_sync",
+ "//aos/linux_code/ipc_lib:core_lib",
+ "//aos/testing:googletest",
+ "//aos/testing:prevent_exit",
+ "//aos/testing:test_shm",
+ ],
+)
+
+cc_library(
+ name = "die",
+ srcs = [
+ "die.cc",
+ ],
+ hdrs = [
+ "die.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ deps = [
+ "//aos:macros",
+ "//aos/libc:aos_strerror",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+
+cc_test(
+ name = "die_test",
+ srcs = [
+ "die_test.cc",
+ ],
+ deps = [
+ ":die",
+ "//aos/testing:googletest",
+ ],
+)
+
+cc_library(
+ name = "event",
+ srcs = [
+ "event.cc",
+ ],
+ hdrs = [
+ "event.h",
+ ],
+ deps = [
+ "//aos/time:time",
+ "//aos/logging",
+ "//aos/linux_code/ipc_lib:aos_sync",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+cc_test(
+ name = "event_test",
+ srcs = [
+ "event_test.cc",
+ ],
+ deps = [
+ ":event",
+ "//aos/time:time",
+ "//aos/testing:googletest",
+ "//aos/testing:test_logging",
+ ],
+)
diff --git a/aos/common/actions/BUILD b/aos/actions/BUILD
similarity index 65%
rename from aos/common/actions/BUILD
rename to aos/actions/BUILD
index 191d4cf..c4082ab 100644
--- a/aos/common/actions/BUILD
+++ b/aos/actions/BUILD
@@ -13,12 +13,12 @@
'actor.h',
],
deps = [
- '//aos/common/logging',
- '//aos/common:queues',
- '//aos/common/logging:queue_logging',
- '//aos/common:time',
- '//aos/common/controls:control_loop',
- '//aos/common/util:phased_loop',
+ '//aos/logging',
+ '//aos:queues',
+ '//aos/logging:queue_logging',
+ '//aos/time:time',
+ '//aos/controls:control_loop',
+ '//aos/util:phased_loop',
],
)
@@ -49,11 +49,11 @@
':action_lib',
':test_action_queue',
'//aos/testing:test_shm',
- '//aos/common/logging',
- '//aos/common/logging:queue_logging',
- '//aos/common:queues',
- '//aos/common:time',
+ '//aos/logging',
+ '//aos/logging:queue_logging',
+ '//aos:queues',
+ '//aos/time:time',
':action_queue',
- '//aos/common:event',
+ '//aos:event',
],
)
diff --git a/aos/common/actions/action_test.cc b/aos/actions/action_test.cc
similarity index 98%
rename from aos/common/actions/action_test.cc
rename to aos/actions/action_test.cc
index 1538d03..09e279c 100644
--- a/aos/common/actions/action_test.cc
+++ b/aos/actions/action_test.cc
@@ -6,12 +6,12 @@
#include "gtest/gtest.h"
-#include "aos/common/queue.h"
-#include "aos/common/actions/actor.h"
-#include "aos/common/actions/actions.h"
-#include "aos/common/actions/actions.q.h"
-#include "aos/common/actions/test_action.q.h"
-#include "aos/common/event.h"
+#include "aos/queue.h"
+#include "aos/actions/actor.h"
+#include "aos/actions/actions.h"
+#include "aos/actions/actions.q.h"
+#include "aos/actions/test_action.q.h"
+#include "aos/event.h"
#include "aos/testing/test_shm.h"
namespace aos {
diff --git a/aos/common/actions/actions.cc b/aos/actions/actions.cc
similarity index 97%
rename from aos/common/actions/actions.cc
rename to aos/actions/actions.cc
index ff3f386..11a7f03 100644
--- a/aos/common/actions/actions.cc
+++ b/aos/actions/actions.cc
@@ -1,4 +1,4 @@
-#include "aos/common/actions/actions.h"
+#include "aos/actions/actions.h"
namespace aos {
namespace common {
diff --git a/aos/common/actions/actions.h b/aos/actions/actions.h
similarity index 97%
rename from aos/common/actions/actions.h
rename to aos/actions/actions.h
index 07e569e..55dcd26 100644
--- a/aos/common/actions/actions.h
+++ b/aos/actions/actions.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_ACTIONS_ACTIONS_H_
-#define AOS_COMMON_ACTIONS_ACTIONS_H_
+#ifndef AOS_ACTIONS_ACTIONS_H_
+#define AOS_ACTIONS_ACTIONS_H_
#include <inttypes.h>
#include <sys/types.h>
@@ -9,9 +9,9 @@
#include <atomic>
#include <memory>
-#include "aos/common/logging/logging.h"
-#include "aos/common/queue.h"
-#include "aos/common/logging/queue_logging.h"
+#include "aos/logging/logging.h"
+#include "aos/queue.h"
+#include "aos/logging/queue_logging.h"
namespace aos {
namespace common {
@@ -355,4 +355,4 @@
} // namespace common
} // namespace aos
-#endif // AOS_COMMON_ACTIONS_ACTIONS_H_
+#endif // AOS_ACTIONS_ACTIONS_H_
diff --git a/aos/common/actions/actions.q b/aos/actions/actions.q
similarity index 100%
rename from aos/common/actions/actions.q
rename to aos/actions/actions.q
diff --git a/aos/common/actions/actor.cc b/aos/actions/actor.cc
similarity index 76%
rename from aos/common/actions/actor.cc
rename to aos/actions/actor.cc
index 6c6bef7..7b2264d 100644
--- a/aos/common/actions/actor.cc
+++ b/aos/actions/actor.cc
@@ -1,4 +1,4 @@
-#include "aos/common/actions/actor.h"
+#include "aos/actions/actor.h"
namespace aos {
namespace common {
diff --git a/aos/common/actions/actor.h b/aos/actions/actor.h
similarity index 95%
rename from aos/common/actions/actor.h
rename to aos/actions/actor.h
index d2d05fc..5c4ebf6 100644
--- a/aos/common/actions/actor.h
+++ b/aos/actions/actor.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_ACTIONS_ACTOR_H_
-#define AOS_COMMON_ACTIONS_ACTOR_H_
+#ifndef AOS_ACTIONS_ACTOR_H_
+#define AOS_ACTIONS_ACTOR_H_
#include <stdio.h>
#include <inttypes.h>
@@ -7,11 +7,11 @@
#include <chrono>
#include <functional>
-#include "aos/common/controls/control_loop.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/logging/queue_logging.h"
-#include "aos/common/time.h"
-#include "aos/common/util/phased_loop.h"
+#include "aos/controls/control_loop.h"
+#include "aos/logging/logging.h"
+#include "aos/logging/queue_logging.h"
+#include "aos/time/time.h"
+#include "aos/util/phased_loop.h"
namespace aos {
namespace common {
@@ -248,4 +248,4 @@
} // namespace common
} // namespace aos
-#endif // AOS_COMMON_ACTIONS_ACTOR_H_
+#endif // AOS_ACTIONS_ACTOR_H_
diff --git a/aos/common/actions/test_action.q b/aos/actions/test_action.q
similarity index 93%
rename from aos/common/actions/test_action.q
rename to aos/actions/test_action.q
index 3451c04..2ed3b4a 100644
--- a/aos/common/actions/test_action.q
+++ b/aos/actions/test_action.q
@@ -1,6 +1,6 @@
package aos.common.actions;
-import "aos/common/actions/actions.q";
+import "aos/actions/actions.q";
queue_group TestActionQueueGroup {
implements aos.common.actions.ActionQueueGroup;
diff --git a/aos/build/queues.bzl b/aos/build/queues.bzl
index 840b4fe..26c2cf8 100644
--- a/aos/build/queues.bzl
+++ b/aos/build/queues.bzl
@@ -107,9 +107,9 @@
hdrs = [src + '.h' for src in srcs],
deps = deps + [
'//aos:once',
- '//aos/common:queues',
- '//aos/common:queue_types',
- '//aos/common/logging:printf_formats',
+ '//aos:queues',
+ '//aos:queue_types',
+ '//aos/logging:printf_formats',
],
visibility = visibility,
compatible_with = compatible_with,
diff --git a/aos/build/queues/compiler.rb b/aos/build/queues/compiler.rb
index f47763d..6ca141d 100644
--- a/aos/build/queues/compiler.rb
+++ b/aos/build/queues/compiler.rb
@@ -105,11 +105,11 @@
cpp_tree = output_file.make_cpp_tree($src_filename)
cpp_tree.add_cc_include(($src_filename + ".h").inspect)
- cpp_tree.add_cc_include("aos/common/byteorder.h".inspect)
+ cpp_tree.add_cc_include("aos/byteorder.h".inspect)
cpp_tree.add_cc_include("<inttypes.h>")
- cpp_tree.add_cc_include("aos/common/queue_types.h".inspect)
+ cpp_tree.add_cc_include("aos/queue_types.h".inspect)
cpp_tree.add_cc_include("aos/once.h".inspect)
- cpp_tree.add_cc_include("aos/common/logging/printf_formats.h".inspect)
+ cpp_tree.add_cc_include("aos/logging/printf_formats.h".inspect)
cpp_tree.add_cc_using("::aos::to_network")
cpp_tree.add_cc_using("::aos::to_host")
diff --git a/aos/build/queues/output/q_file.rb b/aos/build/queues/output/q_file.rb
index a2f438d..1e39247 100644
--- a/aos/build/queues/output/q_file.rb
+++ b/aos/build/queues/output/q_file.rb
@@ -37,8 +37,8 @@
def make_cpp_tree(rel_path)
cpp_tree = DepFilePair.new(rel_path)
cpp_tree.add_header_include("<array>")
- cpp_tree.add_header_include("\"aos/common/macros.h\"")
- cpp_tree.add_header_include("\"aos/common/queue.h\"")
+ cpp_tree.add_header_include("\"aos/macros.h\"")
+ cpp_tree.add_header_include("\"aos/queue.h\"")
@class_types.each do |type|
cpp_tree.get(type)
end
diff --git a/aos/build/queues/print_field.rb b/aos/build/queues/print_field.rb
index 65837ee..4f26d04 100644
--- a/aos/build/queues/print_field.rb
+++ b/aos/build/queues/print_field.rb
@@ -15,10 +15,10 @@
#include <inttypes.h>
#include <stdio.h>
-#include "aos/common/byteorder.h"
-#include "aos/common/time.h"
-#include "aos/common/print_field_helpers.h"
-#include "aos/common/logging/printf_formats.h"
+#include "aos/byteorder.h"
+#include "aos/time/time.h"
+#include "aos/print_field_helpers.h"
+#include "aos/logging/printf_formats.h"
namespace aos {
diff --git a/aos/build/queues/queue_primitives.rb b/aos/build/queues/queue_primitives.rb
index 45687ea..a5f6624 100644
--- a/aos/build/queues/queue_primitives.rb
+++ b/aos/build/queues/queue_primitives.rb
@@ -14,7 +14,7 @@
#include <stdint.h>
-#include "aos/common/time.h"
+#include "aos/time/time.h"
namespace aos {
namespace queue_primitive_types {
diff --git a/aos/common/byteorder.h b/aos/byteorder.h
similarity index 98%
rename from aos/common/byteorder.h
rename to aos/byteorder.h
index ae6ecf4..4a0fd8c 100644
--- a/aos/common/byteorder.h
+++ b/aos/byteorder.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_BYTEORDER_H_
-#define AOS_COMMON_BYTEORDER_H_
+#ifndef AOS_BYTEORDER_H_
+#define AOS_BYTEORDER_H_
#ifndef __VXWORKS__
#include <endian.h> // endian(3)
diff --git a/aos/common/BUILD b/aos/common/BUILD
deleted file mode 100644
index f9ef264..0000000
--- a/aos/common/BUILD
+++ /dev/null
@@ -1,455 +0,0 @@
-package(default_visibility = ["//visibility:public"])
-
-load("//aos/build:queues.bzl", "queue_library")
-load("//tools:environments.bzl", "mcu_cpus")
-
-queue_library(
- name = "test_queue",
- srcs = [
- "test_queue.q",
- ],
-)
-
-cc_library(
- name = "math",
- hdrs = [
- "commonmath.h",
- ],
- compatible_with = mcu_cpus,
-)
-
-cc_library(
- name = "macros",
- hdrs = [
- "macros.h",
- ],
- compatible_with = mcu_cpus + [
- "//tools:armhf-debian",
- ],
-)
-
-cc_library(
- name = "type_traits",
- hdrs = [
- "type_traits.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
-)
-
-cc_library(
- name = "time",
- srcs = [
- "time.cc",
- ],
- hdrs = [
- "time.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
- deps = [
- ":macros",
- ":mutex",
- "//aos/common/logging",
- "//aos/linux_code/ipc_lib:shared_mem",
- ],
-)
-
-genrule(
- name = "gen_queue_primitives",
- outs = ["queue_primitives.h"],
- cmd = "$(location //aos/build/queues:queue_primitives) $@",
- compatible_with = [
- "//tools:armhf-debian",
- ],
- tools = ["//aos/build/queues:queue_primitives"],
- visibility = ["//visibility:private"],
-)
-
-genrule(
- name = "gen_print_field",
- outs = ["print_field.cc"],
- cmd = "$(location //aos/build/queues:print_field) $@",
- compatible_with = [
- "//tools:armhf-debian",
- ],
- tools = ["//aos/build/queues:print_field"],
- visibility = ["//visibility:private"],
-)
-
-cc_library(
- name = "generated_queue_headers",
- hdrs = [
- ":gen_queue_primitives",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
- visibility = ["//aos/common/logging:__pkg__"],
-)
-
-cc_library(
- name = "event",
- srcs = [
- "event.cc",
- ],
- hdrs = [
- "event.h",
- ],
- deps = [
- ":time",
- "//aos/common/logging",
- "//aos/linux_code/ipc_lib:aos_sync",
- ],
-)
-
-cc_library(
- name = "unique_malloc_ptr",
- hdrs = [
- "unique_malloc_ptr.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
-)
-
-cc_library(
- name = "queue_types",
- srcs = [
- "print_field_helpers.h",
- "queue_types.cc",
- ":gen_print_field",
- ],
- hdrs = [
- "queue_types.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
- deps = [
- ":byteorder",
- ":generated_queue_headers",
- ":mutex",
- ":time",
- "//aos/common/logging:printf_formats",
- "//aos/linux_code/ipc_lib:core_lib",
- "//aos/linux_code/ipc_lib:shared_mem",
- ],
-)
-
-cc_test(
- name = "queue_types_test",
- srcs = [
- "queue_types_test.cc",
- ],
- deps = [
- ":queue_types",
- ":test_queue",
- "//aos/common/logging",
- "//aos/testing:googletest",
- "//aos/testing:test_logging",
- ],
-)
-
-cc_library(
- name = "network_port",
- hdrs = [
- "network_port.h",
- ],
-)
-
-cc_library(
- name = "byteorder",
- hdrs = [
- "byteorder.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
-)
-
-cc_library(
- name = "messages",
- srcs = [
- "message.cc",
- ],
- hdrs = [
- "message.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
- deps = [
- ":byteorder",
- ":macros",
- ":time",
- ],
-)
-
-cc_library(
- name = "queues",
- hdrs = [
- "queue.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
- deps = [
- ":messages",
- "//aos/linux_code:queue",
- "//aos/linux_code/ipc_lib:queue",
- ],
-)
-
-cc_library(
- name = "scoped_fd",
- hdrs = [
- "scoped_fd.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
- deps = [
- "//aos/common/logging",
- ],
-)
-
-cc_test(
- name = "queue_test",
- srcs = [
- "queue_test.cc",
- ],
- deps = [
- ":die",
- ":test_queue",
- "//aos/common/util:thread",
- "//aos/testing:googletest",
- "//aos/testing:test_shm",
- ],
-)
-
-cc_test(
- name = "type_traits_test",
- srcs = [
- "type_traits_test.cpp",
- ],
- deps = [
- ":type_traits",
- "//aos/testing:googletest",
- ],
-)
-
-cc_library(
- name = "gtest_prod",
- hdrs = [
- "gtest_prod.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
-)
-
-cc_test(
- name = "time_test",
- srcs = [
- "time_test.cc",
- ],
- deps = [
- ":time",
- "//aos/common/logging",
- "//aos/common/util:death_test_log_implementation",
- "//aos/testing:googletest",
- ],
-)
-
-cc_library(
- name = "die",
- srcs = [
- "die.cc",
- ],
- hdrs = [
- "die.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
- deps = [
- ":macros",
- "//aos/common/libc:aos_strerror",
- ],
-)
-
-cc_test(
- name = "mutex_test",
- srcs = [
- "mutex_test.cc",
- ],
- deps = [
- ":die",
- ":mutex",
- "//aos/common:time",
- "//aos/common/logging",
- "//aos/common/util:death_test_log_implementation",
- "//aos/common/util:thread",
- "//aos/testing:googletest",
- "//aos/testing:test_logging",
- "//aos/testing:test_shm",
- ],
-)
-
-cc_test(
- name = "event_test",
- srcs = [
- "event_test.cc",
- ],
- deps = [
- ":event",
- ":time",
- "//aos/testing:googletest",
- "//aos/testing:test_logging",
- ],
-)
-
-cc_library(
- name = "condition",
- srcs = [
- "condition.cc",
- ],
- hdrs = [
- "condition.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
- deps = [
- ":mutex",
- "//aos/common/logging",
- "//aos/linux_code/ipc_lib:aos_sync",
- ],
-)
-
-cc_test(
- name = "condition_test",
- srcs = [
- "condition_test.cc",
- ],
- deps = [
- ":condition",
- ":die",
- ":mutex",
- ":time",
- "//aos/common/logging",
- "//aos/common/util:thread",
- "//aos/linux_code/ipc_lib:aos_sync",
- "//aos/linux_code/ipc_lib:core_lib",
- "//aos/testing:googletest",
- "//aos/testing:prevent_exit",
- "//aos/testing:test_shm",
- ],
-)
-
-cc_test(
- name = "die_test",
- srcs = [
- "die_test.cc",
- ],
- deps = [
- ":die",
- "//aos/testing:googletest",
- ],
-)
-
-cc_library(
- name = "stl_mutex",
- hdrs = [
- "stl_mutex.h",
- ],
- deps = [
- "//aos/common/logging",
- "//aos/linux_code/ipc_lib:aos_sync",
- ],
-)
-
-cc_library(
- name = "mutex",
- srcs = [
- "mutex.cc",
- ],
- hdrs = [
- "mutex.h",
- ],
- compatible_with = [
- "//tools:armhf-debian",
- ],
- deps = [
- ":die",
- ":type_traits",
- "//aos/common/logging",
- "//aos/linux_code/ipc_lib:aos_sync",
- ],
-)
-
-cc_test(
- name = "stl_mutex_test",
- srcs = [
- "stl_mutex_test.cc",
- ],
- deps = [
- ":die",
- ":stl_mutex",
- "//aos/common/util:thread",
- "//aos/testing:googletest",
- "//aos/testing:test_logging",
- ],
-)
-
-cc_library(
- name = "transaction",
- hdrs = [
- "transaction.h",
- ],
- deps = [
- "//aos/common/logging",
- "//aos/common/util:compiler_memory_barrier",
- ],
-)
-
-cc_test(
- name = "transaction_test",
- srcs = [
- "transaction_test.cc",
- ],
- deps = [
- ":transaction",
- "//aos/common/logging",
- "//aos/common/util:death_test_log_implementation",
- "//aos/testing:googletest",
- ],
-)
-
-cc_library(
- name = "ring_buffer",
- hdrs = [
- "ring_buffer.h",
- ],
-)
-
-cc_test(
- name = "ring_buffer_test",
- srcs = [
- "ring_buffer_test.cc",
- ],
- deps = [
- ":ring_buffer",
- "//aos/testing:googletest",
- ],
-)
-
-py_library(
- name = "python_init",
- srcs = ["__init__.py"],
- visibility = ["//visibility:public"],
- deps = ["//aos:python_init"],
-)
diff --git a/aos/common/__init__.py b/aos/common/__init__.py
deleted file mode 100644
index e69de29..0000000
--- a/aos/common/__init__.py
+++ /dev/null
diff --git a/aos/common/input/BUILD b/aos/common/input/BUILD
deleted file mode 100644
index 2539f55..0000000
--- a/aos/common/input/BUILD
+++ /dev/null
@@ -1,14 +0,0 @@
-package(default_visibility = ['//visibility:public'])
-
-cc_library(
- name = 'driver_station_data',
- srcs = [
- 'driver_station_data.cc',
- ],
- hdrs = [
- 'driver_station_data.h',
- ],
- deps = [
- '//aos/common/messages:robot_state',
- ],
-)
diff --git a/aos/common/logging/sizes.h b/aos/common/logging/sizes.h
deleted file mode 100644
index 0aae90b..0000000
--- a/aos/common/logging/sizes.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef AOS_COMMON_LOGGING_SIZES_H_
-#define AOS_COMMON_LOGGING_SIZES_H_
-
-// This file exists so C code and context.h can both get at these constants...
-
-#define LOG_MESSAGE_LEN 500
-#define LOG_MESSAGE_NAME_LEN 100
-
-#endif // AOS_COMMON_LOGGING_SIZES_H_
diff --git a/aos/common/commonmath.h b/aos/commonmath.h
similarity index 91%
rename from aos/common/commonmath.h
rename to aos/commonmath.h
index acbcb1c..0130992 100644
--- a/aos/common/commonmath.h
+++ b/aos/commonmath.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_MATH_H_
-#define AOS_COMMON_MATH_H_
+#ifndef AOS_MATH_H_
+#define AOS_MATH_H_
#include <cmath>
@@ -40,4 +40,4 @@
}
} // namespace aos
-#endif // AOS_COMMON_MATH_H_
+#endif // AOS_MATH_H_
diff --git a/aos/common/condition.cc b/aos/condition.cc
similarity index 83%
rename from aos/common/condition.cc
rename to aos/condition.cc
index 62ede1c..d1ad3a9 100644
--- a/aos/common/condition.cc
+++ b/aos/condition.cc
@@ -1,10 +1,10 @@
-#include "aos/common/condition.h"
+#include "aos/condition.h"
#include <inttypes.h>
#include <assert.h>
-#include "aos/common/type_traits.h"
-#include "aos/common/mutex.h"
+#include "aos/type_traits/type_traits.h"
+#include "aos/mutex/mutex.h"
namespace aos {
diff --git a/aos/common/condition.h b/aos/condition.h
similarity index 96%
rename from aos/common/condition.h
rename to aos/condition.h
index 84f0542..d846ab1 100644
--- a/aos/common/condition.h
+++ b/aos/condition.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_CONDITION_H_
-#define AOS_COMMON_CONDITION_H_
+#ifndef AOS_CONDITION_H_
+#define AOS_CONDITION_H_
#include "aos/linux_code/ipc_lib/aos_sync.h"
@@ -80,4 +80,4 @@
} // namespace aos
-#endif // AOS_COMMON_CONDITION_H_
+#endif // AOS_CONDITION_H_
diff --git a/aos/common/condition_test.cc b/aos/condition_test.cc
similarity index 97%
rename from aos/common/condition_test.cc
rename to aos/condition_test.cc
index f8e4e65..15b948e 100644
--- a/aos/common/condition_test.cc
+++ b/aos/condition_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/condition.h"
+#include "aos/condition.h"
#include <unistd.h>
#include <sys/types.h>
@@ -10,16 +10,16 @@
#include "gtest/gtest.h"
-#include "aos/common/time.h"
-#include "aos/common/mutex.h"
+#include "aos/time/time.h"
+#include "aos/mutex/mutex.h"
#include "aos/testing/test_shm.h"
-#include "aos/common/type_traits.h"
+#include "aos/type_traits/type_traits.h"
#include "aos/linux_code/ipc_lib/core_lib.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/macros.h"
+#include "aos/logging/logging.h"
+#include "aos/macros.h"
#include "aos/linux_code/ipc_lib/aos_sync.h"
-#include "aos/common/die.h"
-#include "aos/common/util/thread.h"
+#include "aos/die.h"
+#include "aos/util/thread.h"
#include "aos/testing/prevent_exit.h"
namespace aos {
diff --git a/aos/common/controls/BUILD b/aos/controls/BUILD
similarity index 73%
rename from aos/common/controls/BUILD
rename to aos/controls/BUILD
index 7ca2e60..d529f04 100644
--- a/aos/common/controls/BUILD
+++ b/aos/controls/BUILD
@@ -10,10 +10,10 @@
],
deps = [
":control_loop",
- "//aos/common:queues",
- "//aos/common:time",
- "//aos/common/logging:queue_logging",
- "//aos/common/logging:replay",
+ "//aos:queues",
+ "//aos/time:time",
+ "//aos/logging:queue_logging",
+ "//aos/logging:replay",
],
)
@@ -27,9 +27,9 @@
"control_loop_test.h",
],
deps = [
- "//aos/common:time",
- "//aos/common/logging:queue_logging",
- "//aos/common/messages:robot_state",
+ "//aos/time:time",
+ "//aos/logging:queue_logging",
+ "//aos/robot_state:robot_state",
"//aos/testing:googletest",
"//aos/testing:test_shm",
],
@@ -52,8 +52,8 @@
"polytope.h",
],
deps = [
- "//aos/common/logging",
- "//aos/common/logging:matrix_logging",
+ "//aos/logging",
+ "//aos/logging:matrix_logging",
"//third_party/cddlib",
"//third_party/eigen",
],
@@ -94,11 +94,11 @@
],
deps = [
":control_loop_queues",
- "//aos/common:queues",
- "//aos/common:time",
- "//aos/common/logging",
- "//aos/common/logging:queue_logging",
- "//aos/common/messages:robot_state",
- "//aos/common/util:log_interval",
+ "//aos:queues",
+ "//aos/time:time",
+ "//aos/logging",
+ "//aos/logging:queue_logging",
+ "//aos/robot_state:robot_state",
+ "//aos/util:log_interval",
],
)
diff --git a/aos/common/controls/control_loop-tmpl.h b/aos/controls/control_loop-tmpl.h
similarity index 95%
rename from aos/common/controls/control_loop-tmpl.h
rename to aos/controls/control_loop-tmpl.h
index b2f85e7..1834728 100644
--- a/aos/common/controls/control_loop-tmpl.h
+++ b/aos/controls/control_loop-tmpl.h
@@ -1,9 +1,9 @@
#include <stddef.h>
#include <inttypes.h>
-#include "aos/common/logging/logging.h"
-#include "aos/common/logging/queue_logging.h"
-#include "aos/common/messages/robot_state.q.h"
+#include "aos/logging/logging.h"
+#include "aos/logging/queue_logging.h"
+#include "aos/robot_state/robot_state.q.h"
namespace aos {
namespace controls {
diff --git a/aos/common/controls/control_loop.cc b/aos/controls/control_loop.cc
similarity index 64%
rename from aos/common/controls/control_loop.cc
rename to aos/controls/control_loop.cc
index c314254..17e5d7e 100644
--- a/aos/common/controls/control_loop.cc
+++ b/aos/controls/control_loop.cc
@@ -1,4 +1,4 @@
-#include "aos/common/controls/control_loop.h"
+#include "aos/controls/control_loop.h"
namespace aos {
namespace controls {
diff --git a/aos/common/controls/control_loop.h b/aos/controls/control_loop.h
similarity index 96%
rename from aos/common/controls/control_loop.h
rename to aos/controls/control_loop.h
index 70e87f8..fd63e3f 100644
--- a/aos/common/controls/control_loop.h
+++ b/aos/controls/control_loop.h
@@ -4,10 +4,10 @@
#include <string.h>
#include <atomic>
-#include "aos/common/queue.h"
-#include "aos/common/time.h"
-#include "aos/common/type_traits.h"
-#include "aos/common/util/log_interval.h"
+#include "aos/queue.h"
+#include "aos/time/time.h"
+#include "aos/type_traits/type_traits.h"
+#include "aos/util/log_interval.h"
namespace aos {
namespace controls {
@@ -172,6 +172,6 @@
} // namespace controls
} // namespace aos
-#include "aos/common/controls/control_loop-tmpl.h" // IWYU pragma: export
+#include "aos/controls/control_loop-tmpl.h" // IWYU pragma: export
#endif
diff --git a/aos/common/controls/control_loop_test.cc b/aos/controls/control_loop_test.cc
similarity index 90%
rename from aos/common/controls/control_loop_test.cc
rename to aos/controls/control_loop_test.cc
index 4e29062..61c2fe0 100644
--- a/aos/common/controls/control_loop_test.cc
+++ b/aos/controls/control_loop_test.cc
@@ -1,7 +1,7 @@
-#include "aos/common/controls/control_loop_test.h"
+#include "aos/controls/control_loop_test.h"
-#include "aos/common/messages/robot_state.q.h"
-#include "aos/common/logging/queue_logging.h"
+#include "aos/robot_state/robot_state.q.h"
+#include "aos/logging/queue_logging.h"
namespace aos {
namespace testing {
diff --git a/aos/common/controls/control_loop_test.h b/aos/controls/control_loop_test.h
similarity index 90%
rename from aos/common/controls/control_loop_test.h
rename to aos/controls/control_loop_test.h
index 6fae706..1633daf 100644
--- a/aos/common/controls/control_loop_test.h
+++ b/aos/controls/control_loop_test.h
@@ -1,10 +1,10 @@
-#ifndef AOS_COMMON_CONTROLS_CONTROL_LOOP_TEST_H_
-#define AOS_COMMON_CONTROLS_CONTROL_LOOP_TEST_H_
+#ifndef AOS_CONTROLS_CONTROL_LOOP_TEST_H_
+#define AOS_CONTROLS_CONTROL_LOOP_TEST_H_
#include "gtest/gtest.h"
#include "aos/testing/test_shm.h"
-#include "aos/common/time.h"
+#include "aos/time/time.h"
namespace aos {
namespace testing {
@@ -67,4 +67,4 @@
} // namespace testing
} // namespace aos
-#endif // AOS_COMMON_CONTROLS_CONTROL_LOOP_TEST_H_
+#endif // AOS_CONTROLS_CONTROL_LOOP_TEST_H_
diff --git a/aos/common/controls/control_loops.q b/aos/controls/control_loops.q
similarity index 100%
rename from aos/common/controls/control_loops.q
rename to aos/controls/control_loops.q
diff --git a/aos/common/controls/polytope.h b/aos/controls/polytope.h
similarity index 97%
rename from aos/common/controls/polytope.h
rename to aos/controls/polytope.h
index 03d8fcd..145b904 100644
--- a/aos/common/controls/polytope.h
+++ b/aos/controls/polytope.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_CONTROLS_POLYTOPE_H_
-#define AOS_COMMON_CONTROLS_POLYTOPE_H_
+#ifndef AOS_CONTROLS_POLYTOPE_H_
+#define AOS_CONTROLS_POLYTOPE_H_
#include "Eigen/Dense"
@@ -7,8 +7,8 @@
#include "third_party/cddlib/lib-src/setoper.h"
#include "third_party/cddlib/lib-src/cdd.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/logging/matrix_logging.h"
+#include "aos/logging/logging.h"
+#include "aos/logging/matrix_logging.h"
#endif // __linux__
namespace aos {
@@ -234,4 +234,4 @@
} // namespace controls
} // namespace aos
-#endif // AOS_COMMON_CONTROLS_POLYTOPE_H_
+#endif // AOS_CONTROLS_POLYTOPE_H_
diff --git a/aos/common/controls/polytope_test.cc b/aos/controls/polytope_test.cc
similarity index 98%
rename from aos/common/controls/polytope_test.cc
rename to aos/controls/polytope_test.cc
index a43b056..d7ec5e5 100644
--- a/aos/common/controls/polytope_test.cc
+++ b/aos/controls/polytope_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/controls/polytope.h"
+#include "aos/controls/polytope.h"
#include <vector>
diff --git a/aos/common/controls/replay_control_loop.h b/aos/controls/replay_control_loop.h
similarity index 94%
rename from aos/common/controls/replay_control_loop.h
rename to aos/controls/replay_control_loop.h
index 6921a0e..d1436dd 100644
--- a/aos/common/controls/replay_control_loop.h
+++ b/aos/controls/replay_control_loop.h
@@ -1,14 +1,14 @@
-#ifndef AOS_COMMON_CONTROLS_REPLAY_CONTROL_LOOP_H_
-#define AOS_COMMON_CONTROLS_REPLAY_CONTROL_LOOP_H_
+#ifndef AOS_CONTROLS_REPLAY_CONTROL_LOOP_H_
+#define AOS_CONTROLS_REPLAY_CONTROL_LOOP_H_
#include <fcntl.h>
-#include "aos/common/queue.h"
-#include "aos/common/controls/control_loop.h"
-#include "aos/common/logging/replay.h"
-#include "aos/common/logging/queue_logging.h"
-#include "aos/common/time.h"
-#include "aos/common/macros.h"
+#include "aos/queue.h"
+#include "aos/controls/control_loop.h"
+#include "aos/logging/replay.h"
+#include "aos/logging/queue_logging.h"
+#include "aos/time/time.h"
+#include "aos/macros.h"
namespace aos {
namespace controls {
@@ -189,4 +189,4 @@
} // namespace controls
} // namespace aos
-#endif // AOS_COMMON_CONTROLS_REPLAY_CONTROL_LOOP_H_
+#endif // AOS_CONTROLS_REPLAY_CONTROL_LOOP_H_
diff --git a/aos/common/debugging-tips.txt b/aos/debugging-tips.txt
similarity index 100%
rename from aos/common/debugging-tips.txt
rename to aos/debugging-tips.txt
diff --git a/aos/common/die.cc b/aos/die.cc
similarity index 98%
rename from aos/common/die.cc
rename to aos/die.cc
index 69b2aef..ad5f2a8 100644
--- a/aos/common/die.cc
+++ b/aos/die.cc
@@ -1,4 +1,4 @@
-#include "aos/common/die.h"
+#include "aos/die.h"
#include <stdlib.h>
#include <stdio.h>
diff --git a/aos/common/die.h b/aos/die.h
similarity index 91%
rename from aos/common/die.h
rename to aos/die.h
index f9ff457..4296881 100644
--- a/aos/common/die.h
+++ b/aos/die.h
@@ -1,10 +1,10 @@
-#ifndef AOS_COMMON_DIE_H_
-#define AOS_COMMON_DIE_H_
+#ifndef AOS_DIE_H_
+#define AOS_DIE_H_
#include <stdarg.h>
-#include "aos/common/macros.h"
-#include "aos/common/libc/aos_strerror.h"
+#include "aos/macros.h"
+#include "aos/libc/aos_strerror.h"
namespace aos {
@@ -48,4 +48,4 @@
} // namespace aos
-#endif // AOS_COMMON_DIE_H_
+#endif // AOS_DIE_H_
diff --git a/aos/common/die_test.cc b/aos/die_test.cc
similarity index 89%
rename from aos/common/die_test.cc
rename to aos/die_test.cc
index 687543c..8c0a703 100644
--- a/aos/common/die_test.cc
+++ b/aos/die_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/die.h"
+#include "aos/die.h"
#include "gtest/gtest.h"
diff --git a/aos/common/event.cc b/aos/event.cc
similarity index 92%
rename from aos/common/event.cc
rename to aos/event.cc
index ffb62b4..dd43dc8 100644
--- a/aos/common/event.cc
+++ b/aos/event.cc
@@ -1,9 +1,9 @@
-#include "aos/common/event.h"
+#include "aos/event.h"
#include <chrono>
-#include "aos/common/type_traits.h"
-#include "aos/common/logging/logging.h"
+#include "aos/type_traits/type_traits.h"
+#include "aos/logging/logging.h"
namespace aos {
diff --git a/aos/common/event.h b/aos/event.h
similarity index 94%
rename from aos/common/event.h
rename to aos/event.h
index 559aad5..c2ad1bc 100644
--- a/aos/common/event.h
+++ b/aos/event.h
@@ -1,7 +1,7 @@
-#ifndef AOS_COMMON_EVENT_H_
-#define AOS_COMMON_EVENT_H_
+#ifndef AOS_EVENT_H_
+#define AOS_EVENT_H_
-#include "aos/common/time.h"
+#include "aos/time/time.h"
#include "aos/linux_code/ipc_lib/aos_sync.h"
@@ -57,4 +57,4 @@
} // namespace aos
-#endif // AOS_COMMON_EVENT_H_
+#endif // AOS_EVENT_H_
diff --git a/aos/common/event_test.cc b/aos/event_test.cc
similarity index 97%
rename from aos/common/event_test.cc
rename to aos/event_test.cc
index 764dd49..7fe573d 100644
--- a/aos/common/event_test.cc
+++ b/aos/event_test.cc
@@ -1,11 +1,11 @@
-#include "aos/common/event.h"
+#include "aos/event.h"
#include <chrono>
#include <thread>
#include "gtest/gtest.h"
-#include "aos/common/time.h"
+#include "aos/time/time.h"
#include "aos/testing/test_logging.h"
namespace aos {
diff --git a/aos/events/BUILD b/aos/events/BUILD
index d2108a8..ad888f6 100644
--- a/aos/events/BUILD
+++ b/aos/events/BUILD
@@ -3,8 +3,8 @@
name = "raw-event-loop",
hdrs = ["raw-event-loop.h"],
deps = [
- "//aos/common:time",
- "//aos/common:queues",
+ "//aos/time:time",
+ "//aos:queues",
],
)
@@ -14,8 +14,8 @@
srcs = ["event-loop-tmpl.h"],
deps = [
":raw-event-loop",
- "//aos/common:time",
- "//aos/common:queues",
+ "//aos/time:time",
+ "//aos:queues",
],
)
@@ -25,8 +25,8 @@
srcs = ["shm-event-loop.cc"],
deps = [
":event-loop",
- "//aos/common:queues",
- "//aos/common/logging:logging",
+ "//aos:queues",
+ "//aos/logging:logging",
],
)
@@ -68,7 +68,7 @@
srcs = ["simulated-event-loop.cc"],
deps = [
":event-loop",
- "//aos/common:queues",
+ "//aos:queues",
],
)
diff --git a/aos/events/event-loop.h b/aos/events/event-loop.h
index d3cbf3f..57ff49b 100644
--- a/aos/events/event-loop.h
+++ b/aos/events/event-loop.h
@@ -2,8 +2,8 @@
#define _AOS_EVENTS_EVENT_LOOP_H_
#include <string>
-#include "aos/common/queue.h"
-#include "aos/common/time.h"
+#include "aos/queue.h"
+#include "aos/time/time.h"
#include "aos/events/raw-event-loop.h"
namespace aos {
diff --git a/aos/events/raw-event-loop.h b/aos/events/raw-event-loop.h
index 9b1408d..ffc894b 100644
--- a/aos/events/raw-event-loop.h
+++ b/aos/events/raw-event-loop.h
@@ -4,8 +4,8 @@
#include <atomic>
#include <memory>
#include <string>
-#include "aos/common/queue.h"
-#include "aos/common/time.h"
+#include "aos/queue.h"
+#include "aos/time/time.h"
// This file contains raw versions of the classes in event-loop.h.
//
diff --git a/aos/events/shm-event-loop.cc b/aos/events/shm-event-loop.cc
index 832b27b..6231df2 100644
--- a/aos/events/shm-event-loop.cc
+++ b/aos/events/shm-event-loop.cc
@@ -1,6 +1,6 @@
#include "aos/events/shm-event-loop.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/queue.h"
+#include "aos/logging/logging.h"
+#include "aos/queue.h"
#include <sys/timerfd.h>
#include <atomic>
diff --git a/aos/events/shm-event-loop.h b/aos/events/shm-event-loop.h
index 3b36f40..9bbdb42 100644
--- a/aos/events/shm-event-loop.h
+++ b/aos/events/shm-event-loop.h
@@ -1,7 +1,7 @@
#include <unordered_set>
#include <vector>
-#include "aos/common/condition.h"
-#include "aos/common/mutex.h"
+#include "aos/condition.h"
+#include "aos/mutex/mutex.h"
#include "aos/events/event-loop.h"
namespace aos {
@@ -13,7 +13,7 @@
} // namespace internal
// Specialization of EventLoop that is built from queues running out of shared
-// memory. See more details at aos/common/queue.h
+// memory. See more details at aos/queue.h
class ShmEventLoop : public EventLoop {
public:
ShmEventLoop();
diff --git a/aos/events/simulated-event-loop.cc b/aos/events/simulated-event-loop.cc
index 90b78cd..efce9ab 100644
--- a/aos/events/simulated-event-loop.cc
+++ b/aos/events/simulated-event-loop.cc
@@ -1,5 +1,5 @@
#include "aos/events/simulated-event-loop.h"
-#include "aos/common/queue.h"
+#include "aos/queue.h"
namespace aos {
namespace {
diff --git a/aos/common/gtest_prod.h b/aos/gtest_prod.h
similarity index 90%
rename from aos/common/gtest_prod.h
rename to aos/gtest_prod.h
index 6c7d96e..3050ae7 100644
--- a/aos/common/gtest_prod.h
+++ b/aos/gtest_prod.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_GTEST_PROD_H_
-#define AOS_COMMON_GTEST_PROD_H_
+#ifndef AOS_GTEST_PROD_H_
+#define AOS_GTEST_PROD_H_
// These macros replace gtest's FRIEND_TEST if the test is in a different
// namespace than the code that needs to make it a friend.
@@ -36,4 +36,4 @@
#define FRIEND_TEST(test_case_name, test_name) \
friend class test_case_name##_##test_name##_Test
-#endif // AOS_COMMON_GTEST_PROD_H_
+#endif // AOS_GTEST_PROD_H_
diff --git a/aos/input/BUILD b/aos/input/BUILD
index b3c5b53..f27bf98 100644
--- a/aos/input/BUILD
+++ b/aos/input/BUILD
@@ -9,10 +9,10 @@
'joystick_input.h',
],
deps = [
- '//aos/common/input:driver_station_data',
- '//aos/common/messages:robot_state',
- '//aos/common/logging',
- '//aos/common/logging:queue_logging',
+ '//aos/input:driver_station_data',
+ '//aos/robot_state:robot_state',
+ '//aos/logging',
+ '//aos/logging:queue_logging',
],
)
@@ -25,12 +25,25 @@
'drivetrain_input.h',
],
deps = [
- '//aos/common/input:driver_station_data',
- '//aos/common/logging',
- '//aos/common/logging:queue_logging',
- '//aos/common/messages:robot_state',
- '//aos/common:math',
+ '//aos/input:driver_station_data',
+ '//aos/logging',
+ '//aos/logging:queue_logging',
+ '//aos/robot_state:robot_state',
+ '//aos:math',
'//frc971/control_loops/drivetrain:drivetrain_queue',
'//frc971/control_loops/drivetrain:drivetrain_config',
],
)
+
+cc_library(
+ name = 'driver_station_data',
+ srcs = [
+ 'driver_station_data.cc',
+ ],
+ hdrs = [
+ 'driver_station_data.h',
+ ],
+ deps = [
+ '//aos/robot_state:robot_state',
+ ],
+)
diff --git a/aos/common/input/driver_station_data.cc b/aos/input/driver_station_data.cc
similarity index 97%
rename from aos/common/input/driver_station_data.cc
rename to aos/input/driver_station_data.cc
index 2df98be..75d9149 100644
--- a/aos/common/input/driver_station_data.cc
+++ b/aos/input/driver_station_data.cc
@@ -1,4 +1,4 @@
-#include "aos/common/input/driver_station_data.h"
+#include "aos/input/driver_station_data.h"
namespace aos {
namespace input {
diff --git a/aos/common/input/driver_station_data.h b/aos/input/driver_station_data.h
similarity index 93%
rename from aos/common/input/driver_station_data.h
rename to aos/input/driver_station_data.h
index 874b90c..6a52248 100644
--- a/aos/common/input/driver_station_data.h
+++ b/aos/input/driver_station_data.h
@@ -1,12 +1,12 @@
-#ifndef AOS_COMMON_INPUT_DRIVER_STATION_DATA_H_
-#define AOS_COMMON_INPUT_DRIVER_STATION_DATA_H_
+#ifndef AOS_INPUT_DRIVER_STATION_DATA_H_
+#define AOS_INPUT_DRIVER_STATION_DATA_H_
// This file defines several types to support nicely looking at the data
// received from the driver's station.
#include <memory>
-#include "aos/common/messages/robot_state.q.h"
+#include "aos/robot_state/robot_state.q.h"
namespace aos {
namespace input {
@@ -108,4 +108,4 @@
} // namespace input
} // namespace aos
-#endif // AOS_COMMON_INPUT_DRIVER_STATION_DATA_H_
+#endif // AOS_INPUT_DRIVER_STATION_DATA_H_
diff --git a/aos/input/drivetrain_input.cc b/aos/input/drivetrain_input.cc
index 852b94e..23bb8c1 100644
--- a/aos/input/drivetrain_input.cc
+++ b/aos/input/drivetrain_input.cc
@@ -5,9 +5,9 @@
#include <string.h>
#include <cmath>
-#include "aos/common/commonmath.h"
-#include "aos/common/input/driver_station_data.h"
-#include "aos/common/logging/logging.h"
+#include "aos/commonmath.h"
+#include "aos/input/driver_station_data.h"
+#include "aos/logging/logging.h"
#include "frc971/control_loops/drivetrain/drivetrain.q.h"
using ::frc971::control_loops::drivetrain_queue;
diff --git a/aos/input/drivetrain_input.h b/aos/input/drivetrain_input.h
index e38320c..5274cfa 100644
--- a/aos/input/drivetrain_input.h
+++ b/aos/input/drivetrain_input.h
@@ -7,8 +7,8 @@
#include <cmath>
#include <memory>
-#include "aos/common/input/driver_station_data.h"
-#include "aos/common/logging/logging.h"
+#include "aos/input/driver_station_data.h"
+#include "aos/logging/logging.h"
#include "frc971/control_loops/drivetrain/drivetrain.q.h"
#include "frc971/control_loops/drivetrain/drivetrain_config.h"
diff --git a/aos/input/joystick_input.cc b/aos/input/joystick_input.cc
index 7508c3c..1620fdb 100644
--- a/aos/input/joystick_input.cc
+++ b/aos/input/joystick_input.cc
@@ -3,9 +3,9 @@
#include <string.h>
#include <atomic>
-#include "aos/common/messages/robot_state.q.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/logging/queue_logging.h"
+#include "aos/robot_state/robot_state.q.h"
+#include "aos/logging/logging.h"
+#include "aos/logging/queue_logging.h"
namespace aos {
namespace input {
diff --git a/aos/input/joystick_input.h b/aos/input/joystick_input.h
index b10b1ba..4b5c5a6 100644
--- a/aos/input/joystick_input.h
+++ b/aos/input/joystick_input.h
@@ -3,7 +3,7 @@
#include <atomic>
-#include "aos/common/input/driver_station_data.h"
+#include "aos/input/driver_station_data.h"
namespace aos {
namespace input {
diff --git a/aos/common/libc/BUILD b/aos/libc/BUILD
similarity index 93%
rename from aos/common/libc/BUILD
rename to aos/libc/BUILD
index 74a4c70..c2fb6ab 100644
--- a/aos/common/libc/BUILD
+++ b/aos/libc/BUILD
@@ -9,7 +9,7 @@
"aos_strsignal.h",
],
deps = [
- "//aos/common/logging",
+ "//aos/logging",
],
)
@@ -20,7 +20,7 @@
],
deps = [
":aos_strsignal",
- "//aos/common/logging",
+ "//aos/logging",
"//aos/testing:googletest",
],
)
diff --git a/aos/common/libc/README b/aos/libc/README
similarity index 100%
rename from aos/common/libc/README
rename to aos/libc/README
diff --git a/aos/common/libc/aos_strerror.cc b/aos/libc/aos_strerror.cc
similarity index 96%
rename from aos/common/libc/aos_strerror.cc
rename to aos/libc/aos_strerror.cc
index c91fd00..1353242 100644
--- a/aos/common/libc/aos_strerror.cc
+++ b/aos/libc/aos_strerror.cc
@@ -1,4 +1,4 @@
-#include "aos/common/libc/aos_strerror.h"
+#include "aos/libc/aos_strerror.h"
#include <assert.h>
#include <sys/types.h>
diff --git a/aos/common/libc/aos_strerror.h b/aos/libc/aos_strerror.h
similarity index 82%
rename from aos/common/libc/aos_strerror.h
rename to aos/libc/aos_strerror.h
index acce427..cce4502 100644
--- a/aos/common/libc/aos_strerror.h
+++ b/aos/libc/aos_strerror.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_LIBC_AOS_STRERROR_H_
-#define AOS_COMMON_LIBC_AOS_STRERROR_H_
+#ifndef AOS_LIBC_AOS_STRERROR_H_
+#define AOS_LIBC_AOS_STRERROR_H_
#ifdef __cplusplus
extern "C" {
@@ -20,4 +20,4 @@
}
#endif
-#endif // AOS_COMMON_LIBC_AOS_STRERROR_H_
+#endif // AOS_LIBC_AOS_STRERROR_H_
diff --git a/aos/common/libc/aos_strerror_test.cc b/aos/libc/aos_strerror_test.cc
similarity index 93%
rename from aos/common/libc/aos_strerror_test.cc
rename to aos/libc/aos_strerror_test.cc
index c4574fe..65781bc 100644
--- a/aos/common/libc/aos_strerror_test.cc
+++ b/aos/libc/aos_strerror_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/libc/aos_strerror.h"
+#include "aos/libc/aos_strerror.h"
#include <errno.h>
diff --git a/aos/common/libc/aos_strsignal.cc b/aos/libc/aos_strsignal.cc
similarity index 85%
rename from aos/common/libc/aos_strsignal.cc
rename to aos/libc/aos_strsignal.cc
index 2321a07..77f0b90 100644
--- a/aos/common/libc/aos_strsignal.cc
+++ b/aos/libc/aos_strsignal.cc
@@ -1,8 +1,8 @@
-#include "aos/common/libc/aos_strsignal.h"
+#include "aos/libc/aos_strsignal.h"
#include <signal.h>
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
const char *aos_strsignal(int signal) {
static thread_local char buffer[512];
diff --git a/aos/common/libc/aos_strsignal.h b/aos/libc/aos_strsignal.h
similarity index 66%
rename from aos/common/libc/aos_strsignal.h
rename to aos/libc/aos_strsignal.h
index ef6795c..9b33df3 100644
--- a/aos/common/libc/aos_strsignal.h
+++ b/aos/libc/aos_strsignal.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_LIBC_AOS_STRSIGNAL_H_
-#define AOS_COMMON_LIBC_AOS_STRSIGNAL_H_
+#ifndef AOS_LIBC_AOS_STRSIGNAL_H_
+#define AOS_LIBC_AOS_STRSIGNAL_H_
#ifdef __cplusplus
extern "C" {
@@ -14,4 +14,4 @@
}
#endif
-#endif // AOS_COMMON_LIBC_AOS_STRSIGNAL_H_
+#endif // AOS_LIBC_AOS_STRSIGNAL_H_
diff --git a/aos/common/libc/aos_strsignal_test.cc b/aos/libc/aos_strsignal_test.cc
similarity index 96%
rename from aos/common/libc/aos_strsignal_test.cc
rename to aos/libc/aos_strsignal_test.cc
index 3d90b21..7520985 100644
--- a/aos/common/libc/aos_strsignal_test.cc
+++ b/aos/libc/aos_strsignal_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/libc/aos_strsignal.h"
+#include "aos/libc/aos_strsignal.h"
#include <signal.h>
#include <thread>
diff --git a/aos/common/libc/dirname.cc b/aos/libc/dirname.cc
similarity index 95%
rename from aos/common/libc/dirname.cc
rename to aos/libc/dirname.cc
index c843898..bc34496 100644
--- a/aos/common/libc/dirname.cc
+++ b/aos/libc/dirname.cc
@@ -1,4 +1,4 @@
-#include "aos/common/libc/dirname.h"
+#include "aos/libc/dirname.h"
namespace aos {
namespace libc {
diff --git a/aos/common/libc/dirname.h b/aos/libc/dirname.h
similarity index 63%
rename from aos/common/libc/dirname.h
rename to aos/libc/dirname.h
index f05f8f1..fa733d7 100644
--- a/aos/common/libc/dirname.h
+++ b/aos/libc/dirname.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_LIBC_DIRNAME_H_
-#define AOS_COMMON_LIBC_DIRNAME_H_
+#ifndef AOS_LIBC_DIRNAME_H_
+#define AOS_LIBC_DIRNAME_H_
#include <string>
@@ -12,4 +12,4 @@
} // namespace libc
} // namespace aos
-#endif // AOS_COMMON_LIBC_DIRNAME_H_
+#endif // AOS_LIBC_DIRNAME_H_
diff --git a/aos/common/libc/dirname_test.cc b/aos/libc/dirname_test.cc
similarity index 98%
rename from aos/common/libc/dirname_test.cc
rename to aos/libc/dirname_test.cc
index 0207961..d003936 100644
--- a/aos/common/libc/dirname_test.cc
+++ b/aos/libc/dirname_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/libc/dirname.h"
+#include "aos/libc/dirname.h"
#include <libgen.h>
diff --git a/aos/linux_code/BUILD b/aos/linux_code/BUILD
index b572a25..7cc22d0 100644
--- a/aos/linux_code/BUILD
+++ b/aos/linux_code/BUILD
@@ -6,9 +6,9 @@
"dump_rtprio.cc",
],
deps = [
- "//aos/common:time",
- "//aos/common/logging",
- "//aos/common/logging:implementations",
+ "//aos/time:time",
+ "//aos/logging",
+ "//aos/logging:implementations",
],
)
@@ -20,7 +20,7 @@
compatible_with = [
"//tools:armhf-debian",
],
- visibility = ["//aos/common:__pkg__"],
+ visibility = ["//aos:__pkg__"],
)
cc_library(
@@ -39,7 +39,7 @@
],
deps = [
"//aos:once",
- "//aos/common:die",
+ "//aos:die",
],
)
@@ -50,8 +50,8 @@
],
deps = [
":complex_thread_local",
- "//aos/common/logging",
- "//aos/common/util:thread",
+ "//aos/logging",
+ "//aos/util:thread",
"//aos/testing:googletest",
],
)
@@ -68,8 +68,8 @@
"//tools:armhf-debian",
],
deps = [
- "//aos/common:die",
- "//aos/common/logging:implementations",
+ "//aos:die",
+ "//aos/logging:implementations",
"//aos/linux_code/ipc_lib:shared_mem",
],
)
@@ -87,8 +87,8 @@
],
deps = [
"//aos:once",
- "//aos/common:unique_malloc_ptr",
- "//aos/common/logging",
+ "//aos:unique_malloc_ptr",
+ "//aos/logging",
],
)
@@ -99,6 +99,6 @@
],
deps = [
":init",
- "//aos/common/util:run_command",
+ "//aos/util:run_command",
],
)
diff --git a/aos/linux_code/complex_thread_local.cc b/aos/linux_code/complex_thread_local.cc
index f5ddc9c..fbfe914 100644
--- a/aos/linux_code/complex_thread_local.cc
+++ b/aos/linux_code/complex_thread_local.cc
@@ -2,7 +2,7 @@
#include <pthread.h>
-#include "aos/common/die.h"
+#include "aos/die.h"
#include "aos/once.h"
#define SIMPLE_CHECK(call) \
diff --git a/aos/linux_code/complex_thread_local_test.cc b/aos/linux_code/complex_thread_local_test.cc
index 97f0568..6163ba7 100644
--- a/aos/linux_code/complex_thread_local_test.cc
+++ b/aos/linux_code/complex_thread_local_test.cc
@@ -4,7 +4,7 @@
#include "gtest/gtest.h"
-#include "aos/common/util/thread.h"
+#include "aos/util/thread.h"
namespace aos {
namespace testing {
diff --git a/aos/linux_code/configuration.cc b/aos/linux_code/configuration.cc
index 0536e25..76e744f 100644
--- a/aos/linux_code/configuration.cc
+++ b/aos/linux_code/configuration.cc
@@ -8,8 +8,8 @@
#include <ifaddrs.h>
#include <unistd.h>
-#include "aos/common/logging/logging.h"
-#include "aos/common/unique_malloc_ptr.h"
+#include "aos/logging/logging.h"
+#include "aos/unique_malloc_ptr.h"
#include "aos/once.h"
namespace aos {
diff --git a/aos/linux_code/core.cc b/aos/linux_code/core.cc
index 189df1d..3aab562 100644
--- a/aos/linux_code/core.cc
+++ b/aos/linux_code/core.cc
@@ -8,7 +8,7 @@
#include <string>
#include "aos/linux_code/init.h"
-#include "aos/common/util/run_command.h"
+#include "aos/util/run_command.h"
// Initializes shared memory. This is the only file that will create the shared
// memory file if it doesn't already exist (and set everything up).
diff --git a/aos/linux_code/dump_rtprio.cc b/aos/linux_code/dump_rtprio.cc
index 2bfb9c1..2b821cf 100644
--- a/aos/linux_code/dump_rtprio.cc
+++ b/aos/linux_code/dump_rtprio.cc
@@ -16,9 +16,9 @@
#include <string>
-#include "aos/common/logging/logging.h"
-#include "aos/common/logging/implementations.h"
-#include "aos/common/time.h"
+#include "aos/logging/logging.h"
+#include "aos/logging/implementations.h"
+#include "aos/time/time.h"
namespace {
diff --git a/aos/linux_code/init.cc b/aos/linux_code/init.cc
index ce557e4..c5a2285 100644
--- a/aos/linux_code/init.cc
+++ b/aos/linux_code/init.cc
@@ -13,8 +13,8 @@
#include <sys/prctl.h>
#include <malloc.h>
-#include "aos/common/die.h"
-#include "aos/common/logging/implementations.h"
+#include "aos/die.h"
+#include "aos/logging/implementations.h"
#include "aos/linux_code/ipc_lib/shared_mem.h"
namespace FLAG__namespace_do_not_use_directly_use_DECLARE_double_instead {
@@ -27,7 +27,7 @@
namespace logging {
namespace internal {
-// Implemented in aos/common/logging/context.cc.
+// Implemented in aos/logging/context.cc.
void ReloadThreadName();
} // namespace internal
diff --git a/aos/linux_code/ipc_lib/BUILD b/aos/linux_code/ipc_lib/BUILD
index 289bde8..d550a65 100644
--- a/aos/linux_code/ipc_lib/BUILD
+++ b/aos/linux_code/ipc_lib/BUILD
@@ -16,9 +16,9 @@
],
deps = [
"//aos:once",
- "//aos/common:macros",
- "//aos/common/logging",
- "//aos/common/util:compiler_memory_barrier",
+ "//aos:macros",
+ "//aos/logging",
+ "//aos/util:compiler_memory_barrier",
],
)
@@ -57,7 +57,7 @@
":aos_sync",
":core_lib",
":shared_mem_types",
- "//aos/common/logging",
+ "//aos/logging",
],
)
@@ -93,10 +93,10 @@
deps = [
":core_lib",
":shared_mem",
- "//aos/common:condition",
- "//aos/common:mutex",
- "//aos/common/logging",
- "//aos/common/util:options",
+ "//aos:condition",
+ "//aos/mutex:mutex",
+ "//aos/logging",
+ "//aos/util:options",
],
)
@@ -108,11 +108,11 @@
deps = [
":core_lib",
":queue",
- "//aos/common:die",
- "//aos/common:time",
- "//aos/common/logging",
- "//aos/common/util:death_test_log_implementation",
- "//aos/common/util:thread",
+ "//aos:die",
+ "//aos/time:time",
+ "//aos/logging",
+ "//aos/util:death_test_log_implementation",
+ "//aos/util:thread",
"//aos/testing:googletest",
"//aos/testing:prevent_exit",
"//aos/testing:test_shm",
@@ -132,12 +132,12 @@
],
deps = [
":core_lib",
- "//aos/common:die",
- "//aos/common:mutex",
- "//aos/common:time",
- "//aos/common/libc:aos_strsignal",
- "//aos/common/libc:dirname",
- "//aos/common/logging",
+ "//aos:die",
+ "//aos/mutex:mutex",
+ "//aos/time:time",
+ "//aos/libc:aos_strsignal",
+ "//aos/libc:dirname",
+ "//aos/logging",
"//aos/testing:googletest",
"//aos/testing:test_shm",
],
@@ -157,11 +157,11 @@
],
deps = [
":queue",
- "//aos/common:condition",
- "//aos/common:event",
- "//aos/common:mutex",
- "//aos/common/logging",
- "//aos/common/logging:implementations",
+ "//aos:condition",
+ "//aos:event",
+ "//aos/mutex:mutex",
+ "//aos/logging",
+ "//aos/logging:implementations",
"//aos/linux_code:init",
"//third_party/gflags",
],
diff --git a/aos/linux_code/ipc_lib/aos_sync.cc b/aos/linux_code/ipc_lib/aos_sync.cc
index d0baaa0..af7a669 100644
--- a/aos/linux_code/ipc_lib/aos_sync.cc
+++ b/aos/linux_code/ipc_lib/aos_sync.cc
@@ -26,9 +26,9 @@
#include <algorithm>
#include <type_traits>
-#include "aos/common/logging/logging.h"
-#include "aos/common/macros.h"
-#include "aos/common/util/compiler_memory_barrier.h"
+#include "aos/logging/logging.h"
+#include "aos/macros.h"
+#include "aos/util/compiler_memory_barrier.h"
#include "aos/once.h"
using ::aos::linux_code::ipc_lib::FutexAccessorObserver;
diff --git a/aos/linux_code/ipc_lib/ipc_comparison.cc b/aos/linux_code/ipc_lib/ipc_comparison.cc
index 11373a5..6e67e13 100644
--- a/aos/linux_code/ipc_lib/ipc_comparison.cc
+++ b/aos/linux_code/ipc_lib/ipc_comparison.cc
@@ -21,12 +21,12 @@
#include <string>
#include <thread>
-#include "aos/common/condition.h"
-#include "aos/common/event.h"
-#include "aos/common/logging/implementations.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/mutex.h"
-#include "aos/common/time.h"
+#include "aos/condition.h"
+#include "aos/event.h"
+#include "aos/logging/implementations.h"
+#include "aos/logging/logging.h"
+#include "aos/mutex/mutex.h"
+#include "aos/time/time.h"
#include "aos/linux_code/init.h"
#include "aos/linux_code/ipc_lib/queue.h"
diff --git a/aos/linux_code/ipc_lib/ipc_stress_test.cc b/aos/linux_code/ipc_lib/ipc_stress_test.cc
index 1b4d22e..e43e6a5 100644
--- a/aos/linux_code/ipc_lib/ipc_stress_test.cc
+++ b/aos/linux_code/ipc_lib/ipc_stress_test.cc
@@ -9,13 +9,13 @@
#include <chrono>
#include <string>
-#include "aos/common/die.h"
-#include "aos/common/libc/aos_strsignal.h"
-#include "aos/common/libc/dirname.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/mutex.h"
-#include "aos/common/time.h"
-#include "aos/common/type_traits.h"
+#include "aos/die.h"
+#include "aos/libc/aos_strsignal.h"
+#include "aos/libc/dirname.h"
+#include "aos/logging/logging.h"
+#include "aos/mutex/mutex.h"
+#include "aos/time/time.h"
+#include "aos/type_traits/type_traits.h"
#include "aos/linux_code/ipc_lib/core_lib.h"
#include "aos/testing/test_shm.h"
diff --git a/aos/linux_code/ipc_lib/queue.cc b/aos/linux_code/ipc_lib/queue.cc
index b874b08..a89554d 100644
--- a/aos/linux_code/ipc_lib/queue.cc
+++ b/aos/linux_code/ipc_lib/queue.cc
@@ -13,7 +13,7 @@
#include <memory>
#include <algorithm>
-#include "aos/common/type_traits.h"
+#include "aos/type_traits/type_traits.h"
#include "aos/linux_code/ipc_lib/core_lib.h"
namespace aos {
diff --git a/aos/linux_code/ipc_lib/queue.h b/aos/linux_code/ipc_lib/queue.h
index 0e6c3ae..1a0d174 100644
--- a/aos/linux_code/ipc_lib/queue.h
+++ b/aos/linux_code/ipc_lib/queue.h
@@ -2,10 +2,10 @@
#define AOS_LINUX_CODE_IPC_LIB_QUEUE_H_
#include "aos/linux_code/ipc_lib/shared_mem.h"
-#include "aos/common/mutex.h"
-#include "aos/common/condition.h"
-#include "aos/common/util/options.h"
-#include "aos/common/logging/logging.h"
+#include "aos/mutex/mutex.h"
+#include "aos/condition.h"
+#include "aos/util/options.h"
+#include "aos/logging/logging.h"
// TODO(brians) add valgrind client requests to the queue and shared_mem_malloc
// code to make checking for leaks work better
diff --git a/aos/linux_code/ipc_lib/raw_queue_test.cc b/aos/linux_code/ipc_lib/raw_queue_test.cc
index 0c341e3..08b7445 100644
--- a/aos/linux_code/ipc_lib/raw_queue_test.cc
+++ b/aos/linux_code/ipc_lib/raw_queue_test.cc
@@ -12,14 +12,14 @@
#include "gtest/gtest.h"
#include "aos/linux_code/ipc_lib/core_lib.h"
-#include "aos/common/type_traits.h"
+#include "aos/type_traits/type_traits.h"
#include "aos/testing/test_shm.h"
-#include "aos/common/time.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/die.h"
-#include "aos/common/util/thread.h"
-#include "aos/common/util/options.h"
-#include "aos/common/util/death_test_log_implementation.h"
+#include "aos/time/time.h"
+#include "aos/logging/logging.h"
+#include "aos/die.h"
+#include "aos/util/thread.h"
+#include "aos/util/options.h"
+#include "aos/util/death_test_log_implementation.h"
#include "aos/testing/prevent_exit.h"
using ::testing::AssertionResult;
diff --git a/aos/linux_code/ipc_lib/shared_mem.c b/aos/linux_code/ipc_lib/shared_mem.c
index f0a2aee..e0f1bfb 100644
--- a/aos/linux_code/ipc_lib/shared_mem.c
+++ b/aos/linux_code/ipc_lib/shared_mem.c
@@ -11,7 +11,7 @@
#include <assert.h>
#include "aos/linux_code/ipc_lib/core_lib.h"
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
#include "aos/linux_code/ipc_lib/aos_sync.h"
// the path for the shared memory segment. see shm_open(3) for restrictions
diff --git a/aos/linux_code/starter/BUILD b/aos/linux_code/starter/BUILD
index 74af77d..68b39bd 100644
--- a/aos/linux_code/starter/BUILD
+++ b/aos/linux_code/starter/BUILD
@@ -16,12 +16,12 @@
deps = [
'//aos/linux_code:init',
'//third_party/libevent',
- '//aos/common/logging',
- '//aos/common/logging:implementations',
+ '//aos/logging',
+ '//aos/logging:implementations',
'//aos:once',
- '//aos/common:time',
- '//aos/common/libc:aos_strsignal',
- '//aos/common/util:run_command',
- '//aos/common:unique_malloc_ptr',
+ '//aos/time:time',
+ '//aos/libc:aos_strsignal',
+ '//aos/util:run_command',
+ '//aos:unique_malloc_ptr',
],
)
diff --git a/aos/linux_code/starter/starter.cc b/aos/linux_code/starter/starter.cc
index 62e540b..0c7fdea 100644
--- a/aos/linux_code/starter/starter.cc
+++ b/aos/linux_code/starter/starter.cc
@@ -29,12 +29,12 @@
#include "third_party/libevent/event.h"
-#include "aos/common/libc/aos_strsignal.h"
-#include "aos/common/logging/implementations.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/time.h"
-#include "aos/common/unique_malloc_ptr.h"
-#include "aos/common/util/run_command.h"
+#include "aos/libc/aos_strsignal.h"
+#include "aos/logging/implementations.h"
+#include "aos/logging/logging.h"
+#include "aos/time/time.h"
+#include "aos/unique_malloc_ptr.h"
+#include "aos/util/run_command.h"
#include "aos/linux_code/init.h"
#include "aos/once.h"
diff --git a/aos/common/logging/BUILD b/aos/logging/BUILD
similarity index 81%
rename from aos/common/logging/BUILD
rename to aos/logging/BUILD
index 09e355d..a8ee8e9 100644
--- a/aos/common/logging/BUILD
+++ b/aos/logging/BUILD
@@ -16,9 +16,9 @@
visibility = ["//visibility:public"],
deps = [
":sizes",
- "//aos/common:die",
- "//aos/common:macros",
- "//aos/common/libc:aos_strerror",
+ "//aos:die",
+ "//aos:macros",
+ "//aos/libc:aos_strerror",
"//aos/linux_code:complex_thread_local",
],
)
@@ -35,7 +35,7 @@
deps = [
":binary_log_file",
":logging",
- "//aos/common:queues",
+ "//aos:queues",
"//aos/linux_code/ipc_lib:queue",
],
)
@@ -50,9 +50,9 @@
":binary_log_file",
":implementations",
":logging",
- "//aos/common:die",
- "//aos/common:queue_types",
- "//aos/common:time",
+ "//aos:die",
+ "//aos:queue_types",
+ "//aos/time:time",
"//aos/linux_code:configuration",
"//aos/linux_code:init",
"//aos/linux_code/ipc_lib:queue",
@@ -68,7 +68,7 @@
deps = [
":implementations",
":logging",
- "//aos/common:time",
+ "//aos/time:time",
"//aos/linux_code:init",
"//aos/linux_code/ipc_lib:queue",
],
@@ -84,8 +84,8 @@
":binary_log_file",
":implementations",
":logging",
- "//aos/common:queue_types",
- "//aos/common/util:string_to_num",
+ "//aos:queue_types",
+ "//aos/util:string_to_num",
"//aos/linux_code:configuration",
"//aos/linux_code:init",
],
@@ -141,8 +141,8 @@
deps = [
":logging",
":sizes",
- "//aos/common:die",
- "//aos/common:queue_types",
+ "//aos:die",
+ "//aos:queue_types",
],
)
@@ -158,9 +158,9 @@
deps = [
":logging",
":sizes",
- "//aos/common:die",
- "//aos/common:generated_queue_headers",
- "//aos/common:queue_types",
+ "//aos:die",
+ "//aos:generated_queue_headers",
+ "//aos:queue_types",
"//third_party/eigen",
],
)
@@ -175,7 +175,7 @@
],
visibility = ["//visibility:public"],
deps = [
- "//aos/common:macros",
+ "//aos:macros",
],
)
@@ -198,12 +198,12 @@
":logging",
":sizes",
"//aos:once",
- "//aos/common:die",
- "//aos/common:macros",
- "//aos/common:mutex",
- "//aos/common:queue_types",
- "//aos/common:time",
- "//aos/common:type_traits",
+ "//aos:die",
+ "//aos:macros",
+ "//aos/mutex:mutex",
+ "//aos:queue_types",
+ "//aos/time:time",
+ "//aos/type_traits:type_traits",
"//aos/linux_code/ipc_lib:queue",
],
)
diff --git a/aos/common/logging/binary_log_file.cc b/aos/logging/binary_log_file.cc
similarity index 99%
rename from aos/common/logging/binary_log_file.cc
rename to aos/logging/binary_log_file.cc
index be58e11..ca62b73 100644
--- a/aos/common/logging/binary_log_file.cc
+++ b/aos/logging/binary_log_file.cc
@@ -1,4 +1,4 @@
-#include "aos/common/logging/binary_log_file.h"
+#include "aos/logging/binary_log_file.h"
#include <stdio.h>
#include <string.h>
diff --git a/aos/common/logging/binary_log_file.h b/aos/logging/binary_log_file.h
similarity index 96%
rename from aos/common/logging/binary_log_file.h
rename to aos/logging/binary_log_file.h
index 7f9506e..79b580d 100644
--- a/aos/common/logging/binary_log_file.h
+++ b/aos/logging/binary_log_file.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_LOGGING_BINARY_LOG_FILE_H_
-#define AOS_COMMON_LOGGING_BINARY_LOG_FILE_H_
+#ifndef AOS_LOGGING_BINARY_LOG_FILE_H_
+#define AOS_LOGGING_BINARY_LOG_FILE_H_
#include <sys/types.h>
#include <stddef.h>
@@ -7,7 +7,7 @@
#include <algorithm>
-#include "aos/common/logging/implementations.h"
+#include "aos/logging/implementations.h"
namespace aos {
namespace logging {
@@ -204,4 +204,4 @@
} // namespace logging
} // namespace aos
-#endif // AOS_COMMON_LOGGING_BINARY_LOG_FILE_H_
+#endif // AOS_LOGGING_BINARY_LOG_FILE_H_
diff --git a/aos/common/logging/binary_log_writer.cc b/aos/logging/binary_log_writer.cc
similarity index 97%
rename from aos/common/logging/binary_log_writer.cc
rename to aos/logging/binary_log_writer.cc
index 076d72d..fb0c4c2 100644
--- a/aos/common/logging/binary_log_writer.cc
+++ b/aos/logging/binary_log_writer.cc
@@ -15,11 +15,11 @@
#include <map>
#include <unordered_set>
-#include "aos/common/die.h"
-#include "aos/common/logging/binary_log_file.h"
-#include "aos/common/logging/implementations.h"
-#include "aos/common/queue_types.h"
-#include "aos/common/time.h"
+#include "aos/die.h"
+#include "aos/logging/binary_log_file.h"
+#include "aos/logging/implementations.h"
+#include "aos/queue_types.h"
+#include "aos/time/time.h"
#include "aos/linux_code/configuration.h"
#include "aos/linux_code/init.h"
#include "aos/linux_code/ipc_lib/queue.h"
diff --git a/aos/common/logging/context.cc b/aos/logging/context.cc
similarity index 97%
rename from aos/common/logging/context.cc
rename to aos/logging/context.cc
index aebee02..3701b00 100644
--- a/aos/common/logging/context.cc
+++ b/aos/logging/context.cc
@@ -1,4 +1,4 @@
-#include "aos/common/logging/context.h"
+#include "aos/logging/context.h"
#include <string.h>
#include <sys/prctl.h>
@@ -7,7 +7,7 @@
#include <string>
-#include "aos/common/die.h"
+#include "aos/die.h"
#include "aos/linux_code/complex_thread_local.h"
namespace aos {
diff --git a/aos/common/logging/context.h b/aos/logging/context.h
similarity index 93%
rename from aos/common/logging/context.h
rename to aos/logging/context.h
index b7fee26..b2abc0d 100644
--- a/aos/common/logging/context.h
+++ b/aos/logging/context.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_LOGGING_CONTEXT_H_
-#define AOS_COMMON_LOGGING_CONTEXT_H_
+#ifndef AOS_LOGGING_CONTEXT_H_
+#define AOS_LOGGING_CONTEXT_H_
#include <inttypes.h>
#include <stddef.h>
@@ -8,7 +8,7 @@
#include <atomic>
-#include "aos/common/logging/sizes.h"
+#include "aos/logging/sizes.h"
namespace aos {
namespace logging {
@@ -81,4 +81,4 @@
} // namespace logging
} // namespace aos
-#endif // AOS_COMMON_LOGGING_CONTEXT_H_
+#endif // AOS_LOGGING_CONTEXT_H_
diff --git a/aos/common/logging/implementations.cc b/aos/logging/implementations.cc
similarity index 98%
rename from aos/common/logging/implementations.cc
rename to aos/logging/implementations.cc
index 58359f9..337aa8f 100644
--- a/aos/common/logging/implementations.cc
+++ b/aos/logging/implementations.cc
@@ -1,4 +1,4 @@
-#include "aos/common/logging/implementations.h"
+#include "aos/logging/implementations.h"
#include <stdarg.h>
#include <inttypes.h>
@@ -6,10 +6,10 @@
#include <algorithm>
#include <chrono>
-#include "aos/common/die.h"
-#include "aos/common/logging/printf_formats.h"
-#include "aos/common/queue_types.h"
-#include "aos/common/time.h"
+#include "aos/die.h"
+#include "aos/logging/printf_formats.h"
+#include "aos/queue_types.h"
+#include "aos/time/time.h"
#include "aos/linux_code/ipc_lib/queue.h"
#include "aos/once.h"
diff --git a/aos/common/logging/implementations.h b/aos/logging/implementations.h
similarity index 94%
rename from aos/common/logging/implementations.h
rename to aos/logging/implementations.h
index 142c6ba..69a805b 100644
--- a/aos/common/logging/implementations.h
+++ b/aos/logging/implementations.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_LOGGING_IMPLEMENTATIONS_H_
-#define AOS_COMMON_LOGGING_IMPLEMENTATIONS_H_
+#ifndef AOS_LOGGING_IMPLEMENTATIONS_H_
+#define AOS_LOGGING_IMPLEMENTATIONS_H_
#include <sys/types.h>
#include <unistd.h>
@@ -13,13 +13,13 @@
#include <functional>
#include <atomic>
-#include "aos/common/logging/context.h"
-#include "aos/common/logging/interface.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/logging/sizes.h"
-#include "aos/common/macros.h"
-#include "aos/common/mutex.h"
-#include "aos/common/type_traits.h"
+#include "aos/logging/context.h"
+#include "aos/logging/interface.h"
+#include "aos/logging/logging.h"
+#include "aos/logging/sizes.h"
+#include "aos/macros.h"
+#include "aos/mutex/mutex.h"
+#include "aos/type_traits/type_traits.h"
#include "aos/once.h"
namespace aos {
@@ -212,4 +212,4 @@
} // namespace logging
} // namespace aos
-#endif // AOS_COMMON_LOGGING_IMPLEMENTATIONS_H_
+#endif // AOS_LOGGING_IMPLEMENTATIONS_H_
diff --git a/aos/common/logging/implementations_test.cc b/aos/logging/implementations_test.cc
similarity index 98%
rename from aos/common/logging/implementations_test.cc
rename to aos/logging/implementations_test.cc
index 9663fd2..ef69658 100644
--- a/aos/common/logging/implementations_test.cc
+++ b/aos/logging/implementations_test.cc
@@ -5,9 +5,9 @@
#include "gtest/gtest.h"
-#include "aos/common/logging/implementations.h"
-#include "aos/common/time.h"
-#include "aos/common/logging/printf_formats.h"
+#include "aos/logging/implementations.h"
+#include "aos/time/time.h"
+#include "aos/logging/printf_formats.h"
using ::testing::AssertionResult;
using ::testing::AssertionSuccess;
diff --git a/aos/common/logging/interface.cc b/aos/logging/interface.cc
similarity index 97%
rename from aos/common/logging/interface.cc
rename to aos/logging/interface.cc
index a601e83..fb3b60e 100644
--- a/aos/common/logging/interface.cc
+++ b/aos/logging/interface.cc
@@ -1,4 +1,4 @@
-#include "aos/common/logging/interface.h"
+#include "aos/logging/interface.h"
#include <stdarg.h>
#include <stdio.h>
@@ -7,8 +7,8 @@
#include <type_traits>
#include <functional>
-#include "aos/common/die.h"
-#include "aos/common/logging/context.h"
+#include "aos/die.h"
+#include "aos/logging/context.h"
namespace aos {
namespace logging {
diff --git a/aos/common/logging/interface.h b/aos/logging/interface.h
similarity index 95%
rename from aos/common/logging/interface.h
rename to aos/logging/interface.h
index dc59858..fafc9e2 100644
--- a/aos/common/logging/interface.h
+++ b/aos/logging/interface.h
@@ -1,13 +1,13 @@
-#ifndef AOS_COMMON_LOGGING_INTERFACE_H_
-#define AOS_COMMON_LOGGING_INTERFACE_H_
+#ifndef AOS_LOGGING_INTERFACE_H_
+#define AOS_LOGGING_INTERFACE_H_
#include <stdarg.h>
#include <string>
#include <functional>
-#include "aos/common/logging/logging.h"
-#include "aos/common/macros.h"
+#include "aos/logging/logging.h"
+#include "aos/macros.h"
// This file has the non-C-compatible parts of the logging client interface.
@@ -125,4 +125,4 @@
} // namespace logging
} // namespace aos
-#endif // AOS_COMMON_LOGGING_INTERFACE_H_
+#endif // AOS_LOGGING_INTERFACE_H_
diff --git a/aos/common/logging/log_displayer.cc b/aos/logging/log_displayer.cc
similarity index 97%
rename from aos/common/logging/log_displayer.cc
rename to aos/logging/log_displayer.cc
index 2f5a5a3..1d40de1 100644
--- a/aos/common/logging/log_displayer.cc
+++ b/aos/logging/log_displayer.cc
@@ -12,12 +12,12 @@
#include <string>
#include "aos/linux_code/configuration.h"
-#include "aos/common/logging/binary_log_file.h"
-#include "aos/common/queue_types.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/logging/implementations.h"
-#include "aos/common/logging/printf_formats.h"
-#include "aos/common/util/string_to_num.h"
+#include "aos/logging/binary_log_file.h"
+#include "aos/queue_types.h"
+#include "aos/logging/logging.h"
+#include "aos/logging/implementations.h"
+#include "aos/logging/printf_formats.h"
+#include "aos/util/string_to_num.h"
using ::aos::logging::linux_code::LogFileMessageHeader;
diff --git a/aos/common/logging/log_streamer.cc b/aos/logging/log_streamer.cc
similarity index 92%
rename from aos/common/logging/log_streamer.cc
rename to aos/logging/log_streamer.cc
index 74e680b..757ba2e 100644
--- a/aos/common/logging/log_streamer.cc
+++ b/aos/logging/log_streamer.cc
@@ -11,9 +11,9 @@
#include <chrono>
#include <string>
-#include "aos/common/logging/implementations.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/time.h"
+#include "aos/logging/implementations.h"
+#include "aos/logging/logging.h"
+#include "aos/time/time.h"
#include "aos/linux_code/init.h"
#include "aos/linux_code/ipc_lib/queue.h"
diff --git a/aos/common/logging/logging.h b/aos/logging/logging.h
similarity index 98%
rename from aos/common/logging/logging.h
rename to aos/logging/logging.h
index 3182d1a..6682098 100644
--- a/aos/common/logging/logging.h
+++ b/aos/logging/logging.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_LOGGING_LOGGING_H_
-#define AOS_COMMON_LOGGING_LOGGING_H_
+#ifndef AOS_LOGGING_LOGGING_H_
+#define AOS_LOGGING_LOGGING_H_
// This file contains the logging client interface. It works with both C and C++
// code.
@@ -10,8 +10,8 @@
#include <string.h>
#include <errno.h>
-#include "aos/common/macros.h"
-#include "aos/common/libc/aos_strerror.h"
+#include "aos/macros.h"
+#include "aos/libc/aos_strerror.h"
#ifdef __cplusplus
extern "C" {
diff --git a/aos/common/logging/matrix_logging.cc b/aos/logging/matrix_logging.cc
similarity index 90%
rename from aos/common/logging/matrix_logging.cc
rename to aos/logging/matrix_logging.cc
index 7c90632..e17c8a6 100644
--- a/aos/common/logging/matrix_logging.cc
+++ b/aos/logging/matrix_logging.cc
@@ -1,7 +1,7 @@
-#include "aos/common/logging/matrix_logging.h"
+#include "aos/logging/matrix_logging.h"
-#include "aos/common/queue_types.h"
-#include "aos/common/logging/sizes.h"
+#include "aos/queue_types.h"
+#include "aos/logging/sizes.h"
namespace aos {
namespace logging {
diff --git a/aos/common/logging/matrix_logging.h b/aos/logging/matrix_logging.h
similarity index 86%
rename from aos/common/logging/matrix_logging.h
rename to aos/logging/matrix_logging.h
index a915643..630e85e 100644
--- a/aos/common/logging/matrix_logging.h
+++ b/aos/logging/matrix_logging.h
@@ -1,14 +1,14 @@
-#ifndef AOS_COMMON_LOGGING_MATRIX_LOGGING_H_
-#define AOS_COMMON_LOGGING_MATRIX_LOGGING_H_
+#ifndef AOS_LOGGING_MATRIX_LOGGING_H_
+#define AOS_LOGGING_MATRIX_LOGGING_H_
#include <string>
#include <functional>
#include "Eigen/Dense"
-#include "aos/common/logging/interface.h"
-#include "aos/common/die.h"
-#include "aos/common/queue_primitives.h"
+#include "aos/logging/interface.h"
+#include "aos/die.h"
+#include "aos/queue_primitives.h"
namespace aos {
namespace logging {
@@ -44,4 +44,4 @@
} // namespace logging
} // namespace aos
-#endif // AOS_COMMON_LOGGING_MATRIX_LOGGING_H_
+#endif // AOS_LOGGING_MATRIX_LOGGING_H_
diff --git a/aos/common/logging/printf_formats.h b/aos/logging/printf_formats.h
similarity index 85%
rename from aos/common/logging/printf_formats.h
rename to aos/logging/printf_formats.h
index 60960a4..a04f1f2 100644
--- a/aos/common/logging/printf_formats.h
+++ b/aos/logging/printf_formats.h
@@ -1,7 +1,7 @@
-#ifndef AOS_COMMON_LOGGING_PRINTF_FORMATS_H_
-#define AOS_COMMON_LOGGING_PRINTF_FORMATS_H_
+#ifndef AOS_LOGGING_PRINTF_FORMATS_H_
+#define AOS_LOGGING_PRINTF_FORMATS_H_
-#include "aos/common/macros.h"
+#include "aos/macros.h"
// This file has printf(3) formats and corresponding arguments for printing out
// times and log messages.
@@ -25,4 +25,4 @@
#define AOS_TIME_NSECONDS_DIGITS 6
#define AOS_TIME_NSECONDS_DENOMINATOR 1000
-#endif // AOS_COMMON_LOGGING_PRINTF_FORMATS_H_
+#endif // AOS_LOGGING_PRINTF_FORMATS_H_
diff --git a/aos/common/logging/queue_logging.cc b/aos/logging/queue_logging.cc
similarity index 86%
rename from aos/common/logging/queue_logging.cc
rename to aos/logging/queue_logging.cc
index 0f1227c..541ddb1 100644
--- a/aos/common/logging/queue_logging.cc
+++ b/aos/logging/queue_logging.cc
@@ -1,8 +1,8 @@
-#include "aos/common/logging/queue_logging.h"
+#include "aos/logging/queue_logging.h"
-#include "aos/common/logging/interface.h"
-#include "aos/common/logging/sizes.h"
-#include "aos/common/queue_types.h"
+#include "aos/logging/interface.h"
+#include "aos/logging/sizes.h"
+#include "aos/queue_types.h"
namespace aos {
namespace logging {
diff --git a/aos/common/logging/queue_logging.h b/aos/logging/queue_logging.h
similarity index 86%
rename from aos/common/logging/queue_logging.h
rename to aos/logging/queue_logging.h
index 888f808..a390412 100644
--- a/aos/common/logging/queue_logging.h
+++ b/aos/logging/queue_logging.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_LOGGING_QUEUE_LOGGING_H_
-#define AOS_COMMON_LOGGING_QUEUE_LOGGING_H_
+#ifndef AOS_LOGGING_QUEUE_LOGGING_H_
+#define AOS_LOGGING_QUEUE_LOGGING_H_
#include <stdio.h>
#include <stdlib.h>
@@ -7,8 +7,8 @@
#include <functional>
#include <string>
-#include "aos/common/logging/interface.h"
-#include "aos/common/die.h"
+#include "aos/logging/interface.h"
+#include "aos/die.h"
namespace aos {
namespace logging {
@@ -40,4 +40,4 @@
} // namespace logging
} // namespace aos
-#endif // AOS_COMMON_LOGGING_QUEUE_LOGGING_H_
+#endif // AOS_LOGGING_QUEUE_LOGGING_H_
diff --git a/aos/common/logging/replay.cc b/aos/logging/replay.cc
similarity index 97%
rename from aos/common/logging/replay.cc
rename to aos/logging/replay.cc
index 6b55e51..c58ee8c 100644
--- a/aos/common/logging/replay.cc
+++ b/aos/logging/replay.cc
@@ -1,4 +1,4 @@
-#include "aos/common/logging/replay.h"
+#include "aos/logging/replay.h"
#include <chrono>
diff --git a/aos/common/logging/replay.h b/aos/logging/replay.h
similarity index 94%
rename from aos/common/logging/replay.h
rename to aos/logging/replay.h
index 1a8418f..0de207a 100644
--- a/aos/common/logging/replay.h
+++ b/aos/logging/replay.h
@@ -1,17 +1,17 @@
-#ifndef AOS_COMMON_LOGGING_REPLAY_H_
-#define AOS_COMMON_LOGGING_REPLAY_H_
+#ifndef AOS_LOGGING_REPLAY_H_
+#define AOS_LOGGING_REPLAY_H_
#include <unordered_map>
#include <string>
#include <functional>
#include <memory>
-#include "aos/common/logging/binary_log_file.h"
-#include "aos/common/queue.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/macros.h"
+#include "aos/logging/binary_log_file.h"
+#include "aos/queue.h"
+#include "aos/logging/logging.h"
+#include "aos/macros.h"
#include "aos/linux_code/ipc_lib/queue.h"
-#include "aos/common/queue_types.h"
+#include "aos/queue_types.h"
namespace aos {
namespace logging {
@@ -163,4 +163,4 @@
} // namespace logging
} // namespace aos
-#endif // AOS_COMMON_LOGGING_REPLAY_H_
+#endif // AOS_LOGGING_REPLAY_H_
diff --git a/aos/logging/sizes.h b/aos/logging/sizes.h
new file mode 100644
index 0000000..b624a61
--- /dev/null
+++ b/aos/logging/sizes.h
@@ -0,0 +1,9 @@
+#ifndef AOS_LOGGING_SIZES_H_
+#define AOS_LOGGING_SIZES_H_
+
+// This file exists so C code and context.h can both get at these constants...
+
+#define LOG_MESSAGE_LEN 500
+#define LOG_MESSAGE_NAME_LEN 100
+
+#endif // AOS_LOGGING_SIZES_H_
diff --git a/aos/common/macros.h b/aos/macros.h
similarity index 91%
rename from aos/common/macros.h
rename to aos/macros.h
index e8558b2..9f8a368 100644
--- a/aos/common/macros.h
+++ b/aos/macros.h
@@ -1,5 +1,5 @@
-#ifndef _AOS_COMMON_MACROS_H_
-#define _AOS_COMMON_MACROS_H_
+#ifndef _AOS_MACROS_H_
+#define _AOS_MACROS_H_
// This file has some common macros etc.
@@ -38,4 +38,4 @@
#endif
#endif
-#endif // _AOS_COMMON_MACROS_H_
+#endif // _AOS_MACROS_H_
diff --git a/aos/messages/BUILD b/aos/messages/BUILD
new file mode 100644
index 0000000..532a3b6
--- /dev/null
+++ b/aos/messages/BUILD
@@ -0,0 +1,19 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "messages",
+ srcs = [
+ "message.cc",
+ ],
+ hdrs = [
+ "message.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ deps = [
+ "//aos:byteorder",
+ "//aos:macros",
+ "//aos/time:time",
+ ],
+)
diff --git a/aos/common/message.cc b/aos/messages/message.cc
similarity index 95%
rename from aos/common/message.cc
rename to aos/messages/message.cc
index 18acaa9..63e1a71 100644
--- a/aos/common/message.cc
+++ b/aos/messages/message.cc
@@ -1,9 +1,9 @@
-#include "aos/common/message.h"
+#include "aos/messages/message.h"
#include <inttypes.h>
#include <chrono>
-#include "aos/common/byteorder.h"
+#include "aos/byteorder.h"
namespace aos {
diff --git a/aos/common/message.h b/aos/messages/message.h
similarity index 91%
rename from aos/common/message.h
rename to aos/messages/message.h
index f46969f..2a8604b 100644
--- a/aos/common/message.h
+++ b/aos/messages/message.h
@@ -1,7 +1,7 @@
-#ifndef AOS_COMMON_MESSAGE_H_
-#define AOS_COMMON_MESSAGE_H_
+#ifndef AOS_MESSAGE_H_
+#define AOS_MESSAGE_H_
-#include "aos/common/time.h"
+#include "aos/time/time.h"
namespace aos {
@@ -54,4 +54,4 @@
} // namespace aos
-#endif // AOS_COMMON_MESSAGE_H_
+#endif // AOS_MESSAGE_H_
diff --git a/aos/mutex/BUILD b/aos/mutex/BUILD
new file mode 100644
index 0000000..02cec57
--- /dev/null
+++ b/aos/mutex/BUILD
@@ -0,0 +1,38 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "mutex",
+ srcs = [
+ "mutex.cc",
+ ],
+ hdrs = [
+ "mutex.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ deps = [
+ "//aos:die",
+ "//aos/type_traits:type_traits",
+ "//aos/logging",
+ "//aos/linux_code/ipc_lib:aos_sync",
+ ],
+)
+
+cc_test(
+ name = "mutex_test",
+ srcs = [
+ "mutex_test.cc",
+ ],
+ deps = [
+ "//aos:die",
+ ":mutex",
+ "//aos/time:time",
+ "//aos/logging",
+ "//aos/util:death_test_log_implementation",
+ "//aos/util:thread",
+ "//aos/testing:googletest",
+ "//aos/testing:test_logging",
+ "//aos/testing:test_shm",
+ ],
+)
diff --git a/aos/common/mutex.cc b/aos/mutex/mutex.cc
similarity index 89%
rename from aos/common/mutex.cc
rename to aos/mutex/mutex.cc
index e8951c6..a35f0cd 100644
--- a/aos/common/mutex.cc
+++ b/aos/mutex/mutex.cc
@@ -1,11 +1,11 @@
-#include "aos/common/mutex.h"
+#include "aos/mutex/mutex.h"
#include <inttypes.h>
#include <stdio.h>
#include <string.h>
-#include "aos/common/type_traits.h"
-#include "aos/common/logging/logging.h"
+#include "aos/type_traits/type_traits.h"
+#include "aos/logging/logging.h"
namespace aos {
diff --git a/aos/common/mutex.h b/aos/mutex/mutex.h
similarity index 95%
rename from aos/common/mutex.h
rename to aos/mutex/mutex.h
index 3486c15..8bd986c 100644
--- a/aos/common/mutex.h
+++ b/aos/mutex/mutex.h
@@ -1,9 +1,9 @@
-#ifndef AOS_COMMON_MUTEX_H_
-#define AOS_COMMON_MUTEX_H_
+#ifndef AOS_MUTEX_H_
+#define AOS_MUTEX_H_
-#include "aos/common/macros.h"
-#include "aos/common/type_traits.h"
-#include "aos/common/die.h"
+#include "aos/macros.h"
+#include "aos/type_traits/type_traits.h"
+#include "aos/die.h"
#include "aos/linux_code/ipc_lib/aos_sync.h"
namespace aos {
@@ -147,4 +147,4 @@
} // namespace aos
-#endif // AOS_COMMON_MUTEX_H_
+#endif // AOS_MUTEX_H_
diff --git a/aos/common/mutex_test.cc b/aos/mutex/mutex_test.cc
similarity index 97%
rename from aos/common/mutex_test.cc
rename to aos/mutex/mutex_test.cc
index 18c616b..8e3daac 100644
--- a/aos/common/mutex_test.cc
+++ b/aos/mutex/mutex_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/mutex.h"
+#include "aos/mutex/mutex.h"
#include <math.h>
#include <pthread.h>
@@ -9,10 +9,10 @@
#include "gtest/gtest.h"
-#include "aos/common/die.h"
-#include "aos/common/time.h"
-#include "aos/common/util/death_test_log_implementation.h"
-#include "aos/common/util/thread.h"
+#include "aos/die.h"
+#include "aos/time/time.h"
+#include "aos/util/death_test_log_implementation.h"
+#include "aos/util/thread.h"
#include "aos/linux_code/ipc_lib/aos_sync.h"
#include "aos/linux_code/ipc_lib/core_lib.h"
#include "aos/testing/test_logging.h"
diff --git a/aos/common/network/BUILD b/aos/network/BUILD
similarity index 86%
rename from aos/common/network/BUILD
rename to aos/network/BUILD
index 9484bc5..5c1eb03 100644
--- a/aos/common/network/BUILD
+++ b/aos/network/BUILD
@@ -13,8 +13,8 @@
],
deps = [
"//aos:once",
- "//aos/common/logging",
- "//aos/common/util:string_to_num",
+ "//aos/logging",
+ "//aos/util:string_to_num",
"//aos/linux_code:configuration",
],
)
diff --git a/aos/common/network/team_number.cc b/aos/network/team_number.cc
similarity index 93%
rename from aos/common/network/team_number.cc
rename to aos/network/team_number.cc
index 0669601..eb17e7a 100644
--- a/aos/common/network/team_number.cc
+++ b/aos/network/team_number.cc
@@ -1,4 +1,4 @@
-#include "aos/common/network/team_number.h"
+#include "aos/network/team_number.h"
#include <netinet/in.h>
#include <inttypes.h>
@@ -7,8 +7,8 @@
#include <string>
-#include "aos/common/logging/logging.h"
-#include "aos/common/util/string_to_num.h"
+#include "aos/logging/logging.h"
+#include "aos/util/string_to_num.h"
#include "aos/linux_code/configuration.h"
#include "aos/once.h"
diff --git a/aos/common/network/team_number.h b/aos/network/team_number.h
similarity index 84%
rename from aos/common/network/team_number.h
rename to aos/network/team_number.h
index 5a14872..6540283 100644
--- a/aos/common/network/team_number.h
+++ b/aos/network/team_number.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_NETWORK_TEAM_NUMBER_H_
-#define AOS_COMMON_NETWORK_TEAM_NUMBER_H_
+#ifndef AOS_NETWORK_TEAM_NUMBER_H_
+#define AOS_NETWORK_TEAM_NUMBER_H_
#include <stdint.h>
@@ -26,4 +26,4 @@
} // namespace network
} // namespace aos
-#endif // AOS_COMMON_NETWORK_TEAM_NUMBER_H_
+#endif // AOS_NETWORK_TEAM_NUMBER_H_
diff --git a/aos/common/network/team_number_test.cc b/aos/network/team_number_test.cc
similarity index 90%
rename from aos/common/network/team_number_test.cc
rename to aos/network/team_number_test.cc
index f0adcce..ee3f2db 100644
--- a/aos/common/network/team_number_test.cc
+++ b/aos/network/team_number_test.cc
@@ -1,8 +1,8 @@
-#include "aos/common/network/team_number.h"
+#include "aos/network/team_number.h"
#include "gtest/gtest.h"
-#include "aos/common/macros.h"
+#include "aos/macros.h"
namespace aos {
namespace network {
diff --git a/aos/common/network_port.h b/aos/network_port.h
similarity index 88%
rename from aos/common/network_port.h
rename to aos/network_port.h
index b523674..0c84b5e 100644
--- a/aos/common/network_port.h
+++ b/aos/network_port.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_NETWORK_PORT_H_
-#define AOS_COMMON_NETWORK_PORT_H_
+#ifndef AOS_NETWORK_PORT_H_
+#define AOS_NETWORK_PORT_H_
#include <stdint.h>
@@ -29,4 +29,4 @@
} // namespace aos
-#endif // AOS_COMMON_NETWORK_PORT_H_
+#endif // AOS_NETWORK_PORT_H_
diff --git a/aos/once-tmpl.h b/aos/once-tmpl.h
index 0618395..b6f41cc 100644
--- a/aos/once-tmpl.h
+++ b/aos/once-tmpl.h
@@ -4,7 +4,7 @@
#include <sched.h>
#endif
-#include "aos/common/type_traits.h"
+#include "aos/type_traits/type_traits.h"
// It doesn't use pthread_once, because Brian looked at the pthreads
// implementation for vxworks and noticed that it is completely and entirely
diff --git a/aos/once.h b/aos/once.h
index f6954f6..d7eb0d3 100644
--- a/aos/once.h
+++ b/aos/once.h
@@ -3,7 +3,7 @@
#include <stdint.h>
-#include "aos/common/gtest_prod.h"
+#include "aos/gtest_prod.h"
namespace aos {
namespace testing {
diff --git a/aos/common/print_field_helpers.h b/aos/print_field_helpers.h
similarity index 86%
rename from aos/common/print_field_helpers.h
rename to aos/print_field_helpers.h
index 0dd2fab..933ce46 100644
--- a/aos/common/print_field_helpers.h
+++ b/aos/print_field_helpers.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_PRINT_FIELD_HELPERS_H_
-#define AOS_COMMON_PRINT_FIELD_HELPERS_H_
+#ifndef AOS_PRINT_FIELD_HELPERS_H_
+#define AOS_PRINT_FIELD_HELPERS_H_
#include <stdint.h>
@@ -38,4 +38,4 @@
} // namespace aos
-#endif // AOS_COMMON_PRINT_FIELD_HELPERS_H_
+#endif // AOS_PRINT_FIELD_HELPERS_H_
diff --git a/aos/protobuf/BUILD b/aos/protobuf/BUILD
index c5439c3..69c49d1 100644
--- a/aos/protobuf/BUILD
+++ b/aos/protobuf/BUILD
@@ -5,7 +5,7 @@
srcs = ["stack_arena.cc"],
hdrs = ["stack_arena.h"],
deps = [
- "//aos/common/logging:logging",
+ "//aos/logging:logging",
"//third_party/protobuf",
],
)
@@ -16,7 +16,7 @@
deps = [
":stack_arena",
"//aos/testing:test_logging",
- "//aos/common/logging:logging",
+ "//aos/logging:logging",
"//aos/testing:googletest",
],
)
diff --git a/aos/protobuf/stack_arena.cc b/aos/protobuf/stack_arena.cc
index d1a69d6..da9b004 100644
--- a/aos/protobuf/stack_arena.cc
+++ b/aos/protobuf/stack_arena.cc
@@ -1,4 +1,4 @@
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
namespace aos {
namespace protobuf {
diff --git a/aos/protobuf/stack_arena_test.cc b/aos/protobuf/stack_arena_test.cc
index dfd9151..c9eb5e8 100644
--- a/aos/protobuf/stack_arena_test.cc
+++ b/aos/protobuf/stack_arena_test.cc
@@ -1,6 +1,6 @@
#include "gtest/gtest.h"
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
#include "aos/protobuf/stack_arena.h"
#include "aos/testing/test_logging.h"
diff --git a/aos/common/queue.h b/aos/queue.h
similarity index 97%
rename from aos/common/queue.h
rename to aos/queue.h
index 97947ad..47f9503 100644
--- a/aos/common/queue.h
+++ b/aos/queue.h
@@ -1,11 +1,11 @@
-#ifndef AOS_COMMON_QUEUE_H_
-#define AOS_COMMON_QUEUE_H_
+#ifndef AOS_QUEUE_H_
+#define AOS_QUEUE_H_
#include <assert.h>
-#include "aos/common/macros.h"
+#include "aos/macros.h"
#include "aos/linux_code/ipc_lib/queue.h"
-#include "aos/common/message.h"
+#include "aos/messages/message.h"
namespace aos {
@@ -225,4 +225,4 @@
#include "aos/linux_code/queue-tmpl.h"
-#endif // AOS_COMMON_QUEUE_H_
+#endif // AOS_QUEUE_H_
diff --git a/aos/common/queue_test.cc b/aos/queue_test.cc
similarity index 98%
rename from aos/common/queue_test.cc
rename to aos/queue_test.cc
index eb109ba..8eeca6e 100644
--- a/aos/common/queue_test.cc
+++ b/aos/queue_test.cc
@@ -5,9 +5,9 @@
#include "gtest/gtest.h"
-#include "aos/common/die.h"
-#include "aos/common/test_queue.q.h"
-#include "aos/common/util/thread.h"
+#include "aos/die.h"
+#include "aos/test_queue.q.h"
+#include "aos/util/thread.h"
#include "aos/testing/test_shm.h"
namespace aos {
diff --git a/aos/common/queue_types.cc b/aos/queue_types.cc
similarity index 98%
rename from aos/common/queue_types.cc
rename to aos/queue_types.cc
index 3945395..27b497c 100644
--- a/aos/common/queue_types.cc
+++ b/aos/queue_types.cc
@@ -1,15 +1,15 @@
-#include "aos/common/queue_types.h"
+#include "aos/queue_types.h"
#include <inttypes.h>
#include <memory>
#include <unordered_map>
-#include "aos/common/byteorder.h"
+#include "aos/byteorder.h"
#include "aos/linux_code/ipc_lib/shared_mem.h"
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
#include "aos/linux_code/ipc_lib/core_lib.h"
-#include "aos/common/mutex.h"
+#include "aos/mutex/mutex.h"
namespace aos {
diff --git a/aos/common/queue_types.h b/aos/queue_types.h
similarity index 96%
rename from aos/common/queue_types.h
rename to aos/queue_types.h
index be943c1..bff06bb 100644
--- a/aos/common/queue_types.h
+++ b/aos/queue_types.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_QUEUE_TYPES_H_
-#define AOS_COMMON_QUEUE_TYPES_H_
+#ifndef AOS_QUEUE_TYPES_H_
+#define AOS_QUEUE_TYPES_H_
#include <sys/types.h>
#include <stdint.h>
@@ -8,8 +8,8 @@
#include <initializer_list>
#include <string>
-#include "aos/common/macros.h"
-#include "aos/common/byteorder.h"
+#include "aos/macros.h"
+#include "aos/byteorder.h"
namespace aos {
@@ -145,4 +145,4 @@
} // namespace type_cache
} // namespace aos
-#endif // AOS_COMMON_QUEUE_TYPES_H_
+#endif // AOS_QUEUE_TYPES_H_
diff --git a/aos/common/queue_types_test.cc b/aos/queue_types_test.cc
similarity index 97%
rename from aos/common/queue_types_test.cc
rename to aos/queue_types_test.cc
index 96d02bc..91a1f74 100644
--- a/aos/common/queue_types_test.cc
+++ b/aos/queue_types_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/queue_types.h"
+#include "aos/queue_types.h"
#include <memory>
#include <limits>
@@ -6,10 +6,10 @@
#include "gtest/gtest.h"
-#include "aos/common/test_queue.q.h"
-#include "aos/common/byteorder.h"
-#include "aos/common/queue_primitives.h"
-#include "aos/common/logging/logging.h"
+#include "aos/test_queue.q.h"
+#include "aos/byteorder.h"
+#include "aos/queue_primitives.h"
+#include "aos/logging/logging.h"
#include "aos/testing/test_logging.h"
using ::aos::common::testing::Structure;
diff --git a/aos/ring_buffer/BUILD b/aos/ring_buffer/BUILD
new file mode 100644
index 0000000..9f6ab06
--- /dev/null
+++ b/aos/ring_buffer/BUILD
@@ -0,0 +1,19 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "ring_buffer",
+ hdrs = [
+ "ring_buffer.h",
+ ],
+)
+
+cc_test(
+ name = "ring_buffer_test",
+ srcs = [
+ "ring_buffer_test.cc",
+ ],
+ deps = [
+ ":ring_buffer",
+ "//aos/testing:googletest",
+ ],
+)
diff --git a/aos/common/ring_buffer.h b/aos/ring_buffer/ring_buffer.h
similarity index 93%
rename from aos/common/ring_buffer.h
rename to aos/ring_buffer/ring_buffer.h
index 2e44a5e..9f93a8c 100644
--- a/aos/common/ring_buffer.h
+++ b/aos/ring_buffer/ring_buffer.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_RING_BUFFER_H_
-#define AOS_COMMON_RING_BUFFER_H_
+#ifndef AOS_RING_BUFFER_H_
+#define AOS_RING_BUFFER_H_
#include <array>
@@ -66,4 +66,4 @@
} // namespace aos
-#endif // AOS_COMMON_RING_BUFFER_H_
+#endif // AOS_RING_BUFFER_H_
diff --git a/aos/common/ring_buffer_test.cc b/aos/ring_buffer/ring_buffer_test.cc
similarity index 98%
rename from aos/common/ring_buffer_test.cc
rename to aos/ring_buffer/ring_buffer_test.cc
index 5aa7327..a01b315 100644
--- a/aos/common/ring_buffer_test.cc
+++ b/aos/ring_buffer/ring_buffer_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/ring_buffer.h"
+#include "aos/ring_buffer/ring_buffer.h"
#include "gtest/gtest.h"
diff --git a/aos/common/messages/BUILD b/aos/robot_state/BUILD
similarity index 100%
rename from aos/common/messages/BUILD
rename to aos/robot_state/BUILD
diff --git a/aos/common/messages/robot_state.q b/aos/robot_state/robot_state.q
similarity index 100%
rename from aos/common/messages/robot_state.q
rename to aos/robot_state/robot_state.q
diff --git a/aos/scoped/BUILD b/aos/scoped/BUILD
new file mode 100644
index 0000000..04f0e06
--- /dev/null
+++ b/aos/scoped/BUILD
@@ -0,0 +1,14 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "scoped_fd",
+ hdrs = [
+ "scoped_fd.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ deps = [
+ "//aos/logging",
+ ],
+)
diff --git a/aos/common/scoped_fd.h b/aos/scoped/scoped_fd.h
similarity index 79%
rename from aos/common/scoped_fd.h
rename to aos/scoped/scoped_fd.h
index 29ccf6e..696cf3b 100644
--- a/aos/common/scoped_fd.h
+++ b/aos/scoped/scoped_fd.h
@@ -1,10 +1,10 @@
-#ifndef _AOS_COMMON_SCOPED_FD_
-#define _AOS_COMMON_SCOPED_FD_
+#ifndef _AOS_SCOPED_FD_
+#define _AOS_SCOPED_FD_
#include <unistd.h>
-#include "aos/common/logging/logging.h"
-#include "aos/common/macros.h"
+#include "aos/logging/logging.h"
+#include "aos/macros.h"
namespace aos {
@@ -41,4 +41,4 @@
} // namespace aos
-#endif // _AOS_COMMON_SCOPED_FD_
+#endif // _AOS_SCOPED_FD_
diff --git a/aos/common/scoped_ptr.h b/aos/scoped/scoped_ptr.h
similarity index 83%
rename from aos/common/scoped_ptr.h
rename to aos/scoped/scoped_ptr.h
index e4df78e..336e73b 100644
--- a/aos/common/scoped_ptr.h
+++ b/aos/scoped/scoped_ptr.h
@@ -1,7 +1,7 @@
-#ifndef AOS_COMMON_SCOPED_PTR_H_
-#define AOS_COMMON_SCOPED_PTR_H_
+#ifndef AOS_SCOPED_PTR_H_
+#define AOS_SCOPED_PTR_H_
-#include "aos/common/macros.h"
+#include "aos/macros.h"
namespace aos {
@@ -40,4 +40,4 @@
} // namespace aos
-#endif // AOS_COMMON_SCOPED_PTR_H_
+#endif // AOS_SCOPED_PTR_H_
diff --git a/aos/stl_mutex/BUILD b/aos/stl_mutex/BUILD
new file mode 100644
index 0000000..a9b7957
--- /dev/null
+++ b/aos/stl_mutex/BUILD
@@ -0,0 +1,26 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "stl_mutex",
+ hdrs = [
+ "stl_mutex.h",
+ ],
+ deps = [
+ "//aos/logging",
+ "//aos/linux_code/ipc_lib:aos_sync",
+ ],
+)
+
+cc_test(
+ name = "stl_mutex_test",
+ srcs = [
+ "stl_mutex_test.cc",
+ ],
+ deps = [
+ "//aos:die",
+ ":stl_mutex",
+ "//aos/util:thread",
+ "//aos/testing:googletest",
+ "//aos/testing:test_logging",
+ ],
+)
diff --git a/aos/common/stl_mutex.h b/aos/stl_mutex/stl_mutex.h
similarity index 94%
rename from aos/common/stl_mutex.h
rename to aos/stl_mutex/stl_mutex.h
index 9242312..a5ac807 100644
--- a/aos/common/stl_mutex.h
+++ b/aos/stl_mutex/stl_mutex.h
@@ -1,12 +1,12 @@
-#ifndef AOS_COMMON_STL_MUTEX_H_
-#define AOS_COMMON_STL_MUTEX_H_
+#ifndef AOS_STL_MUTEX_H_
+#define AOS_STL_MUTEX_H_
#include <mutex>
#include "aos/linux_code/ipc_lib/aos_sync.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/type_traits.h"
-#include "aos/common/macros.h"
+#include "aos/logging/logging.h"
+#include "aos/type_traits/type_traits.h"
+#include "aos/macros.h"
namespace aos {
@@ -141,4 +141,4 @@
} // namespace aos
-#endif // AOS_COMMON_STL_MUTEX_H_
+#endif // AOS_STL_MUTEX_H_
diff --git a/aos/common/stl_mutex_test.cc b/aos/stl_mutex/stl_mutex_test.cc
similarity index 93%
rename from aos/common/stl_mutex_test.cc
rename to aos/stl_mutex/stl_mutex_test.cc
index 236f506..36d7067 100644
--- a/aos/common/stl_mutex_test.cc
+++ b/aos/stl_mutex/stl_mutex_test.cc
@@ -1,10 +1,10 @@
-#include "aos/common/stl_mutex.h"
+#include "aos/stl_mutex/stl_mutex.h"
#include "gtest/gtest.h"
#include "aos/testing/test_logging.h"
-#include "aos/common/util/thread.h"
-#include "aos/common/die.h"
+#include "aos/util/thread.h"
+#include "aos/die.h"
namespace aos {
namespace testing {
diff --git a/aos/common/test_queue.q b/aos/test_queue.q
similarity index 100%
rename from aos/common/test_queue.q
rename to aos/test_queue.q
diff --git a/aos/testing/BUILD b/aos/testing/BUILD
index 93cd4bb..4d1b6a4 100644
--- a/aos/testing/BUILD
+++ b/aos/testing/BUILD
@@ -26,8 +26,8 @@
deps = [
":googletest",
"//aos:once",
- "//aos/common:mutex",
- "//aos/common/logging:implementations",
+ "//aos/mutex:mutex",
+ "//aos/logging:implementations",
],
)
@@ -39,7 +39,7 @@
deps = [
":googletest",
":test_logging",
- "//aos/common/logging",
+ "//aos/logging",
],
)
@@ -54,7 +54,7 @@
],
visibility = ["//visibility:public"],
deps = [
- "//aos/common/logging",
+ "//aos/logging",
],
)
@@ -70,8 +70,8 @@
visibility = ["//visibility:public"],
deps = [
":test_logging",
- "//aos/common:queues",
- "//aos/common/logging",
+ "//aos:queues",
+ "//aos/logging",
"//aos/linux_code/ipc_lib:shared_mem",
],
)
diff --git a/aos/testing/prevent_exit.cc b/aos/testing/prevent_exit.cc
index 93d7c58..3190698 100644
--- a/aos/testing/prevent_exit.cc
+++ b/aos/testing/prevent_exit.cc
@@ -3,7 +3,7 @@
#include <stdlib.h>
#include <unistd.h>
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
namespace aos {
namespace testing {
diff --git a/aos/testing/test_logging.cc b/aos/testing/test_logging.cc
index 617f02a..34af54d 100644
--- a/aos/testing/test_logging.cc
+++ b/aos/testing/test_logging.cc
@@ -6,8 +6,8 @@
#include "gtest/gtest.h"
-#include "aos/common/logging/implementations.h"
-#include "aos/common/mutex.h"
+#include "aos/logging/implementations.h"
+#include "aos/mutex/mutex.h"
#include "aos/once.h"
using ::aos::logging::LogMessage;
diff --git a/aos/testing/test_logging_test.cc b/aos/testing/test_logging_test.cc
index 369f94d..9dd6eba 100644
--- a/aos/testing/test_logging_test.cc
+++ b/aos/testing/test_logging_test.cc
@@ -4,7 +4,7 @@
#include "gtest/gtest.h"
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
namespace aos {
namespace testing {
diff --git a/aos/testing/test_shm.cc b/aos/testing/test_shm.cc
index 92c3924..f7ddfcb 100644
--- a/aos/testing/test_shm.cc
+++ b/aos/testing/test_shm.cc
@@ -2,8 +2,8 @@
#include <sys/mman.h>
-#include "aos/common/queue.h"
-#include "aos/common/logging/logging.h"
+#include "aos/queue.h"
+#include "aos/logging/logging.h"
#include "aos/testing/test_logging.h"
namespace aos {
diff --git a/aos/time/BUILD b/aos/time/BUILD
new file mode 100644
index 0000000..cbeeb5b
--- /dev/null
+++ b/aos/time/BUILD
@@ -0,0 +1,33 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "time",
+ srcs = [
+ "time.cc",
+ ],
+ hdrs = [
+ "time.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+ deps = [
+ "//aos:macros",
+ "//aos/mutex:mutex",
+ "//aos/logging",
+ "//aos/linux_code/ipc_lib:shared_mem",
+ ],
+)
+
+cc_test(
+ name = "time_test",
+ srcs = [
+ "time_test.cc",
+ ],
+ deps = [
+ ":time",
+ "//aos/logging",
+ "//aos/util:death_test_log_implementation",
+ "//aos/testing:googletest",
+ ],
+)
diff --git a/aos/common/time.cc b/aos/time/time.cc
similarity index 97%
rename from aos/common/time.cc
rename to aos/time/time.cc
index 0fe3ee3..a72b121 100644
--- a/aos/common/time.cc
+++ b/aos/time/time.cc
@@ -1,4 +1,4 @@
-#include "aos/common/time.h"
+#include "aos/time/time.h"
#include <inttypes.h>
#include <string.h>
@@ -10,8 +10,8 @@
// dependency on it.
#include "aos/linux_code/ipc_lib/shared_mem.h"
-#include "aos/common/logging/logging.h"
-#include "aos/common/mutex.h"
+#include "aos/logging/logging.h"
+#include "aos/mutex/mutex.h"
namespace chrono = ::std::chrono;
diff --git a/aos/common/time.h b/aos/time/time.h
similarity index 94%
rename from aos/common/time.h
rename to aos/time/time.h
index fe0bd5f..9bef741 100644
--- a/aos/common/time.h
+++ b/aos/time/time.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_TIME_H_
-#define AOS_COMMON_TIME_H_
+#ifndef AOS_TIME_H_
+#define AOS_TIME_H_
#include <stdint.h>
#include <time.h>
@@ -11,8 +11,8 @@
#include <thread>
#include <ostream>
-#include "aos/common/type_traits.h"
-#include "aos/common/macros.h"
+#include "aos/type_traits/type_traits.h"
+#include "aos/macros.h"
namespace aos {
@@ -99,4 +99,4 @@
} // namespace std
-#endif // AOS_COMMON_TIME_H_
+#endif // AOS_TIME_H_
diff --git a/aos/common/time_test.cc b/aos/time/time_test.cc
similarity index 92%
rename from aos/common/time_test.cc
rename to aos/time/time_test.cc
index 14e049e..7b6c1a5 100644
--- a/aos/common/time_test.cc
+++ b/aos/time/time_test.cc
@@ -1,11 +1,11 @@
-#include "aos/common/time.h"
+#include "aos/time/time.h"
#include <thread>
#include "gtest/gtest.h"
-#include "aos/common/macros.h"
-#include "aos/common/util/death_test_log_implementation.h"
+#include "aos/macros.h"
+#include "aos/util/death_test_log_implementation.h"
namespace aos {
namespace time {
diff --git a/aos/transaction/BUILD b/aos/transaction/BUILD
new file mode 100644
index 0000000..3d5a29f
--- /dev/null
+++ b/aos/transaction/BUILD
@@ -0,0 +1,26 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "transaction",
+ hdrs = [
+ "transaction.h",
+ ],
+ deps = [
+ "//aos/logging",
+ "//aos/util:compiler_memory_barrier",
+ ],
+)
+
+cc_test(
+ name = "transaction_test",
+ srcs = [
+ "transaction_test.cc",
+ ],
+ deps = [
+ ":transaction",
+ "//aos/logging",
+ "//aos/util:death_test_log_implementation",
+ "//aos/testing:googletest",
+ ],
+)
+
diff --git a/aos/common/transaction.h b/aos/transaction/transaction.h
similarity index 93%
rename from aos/common/transaction.h
rename to aos/transaction/transaction.h
index e6e9e41..f1c5c02 100644
--- a/aos/common/transaction.h
+++ b/aos/transaction/transaction.h
@@ -1,12 +1,12 @@
-#ifndef AOS_COMMON_TRANSACTION_H_
-#define AOS_COMMON_TRANSACTION_H_
+#ifndef AOS_TRANSACTION_H_
+#define AOS_TRANSACTION_H_
#include <stdint.h>
#include <array>
-#include "aos/common/util/compiler_memory_barrier.h"
-#include "aos/common/logging/logging.h"
+#include "aos/util/compiler_memory_barrier.h"
+#include "aos/logging/logging.h"
namespace aos {
namespace transaction {
@@ -100,4 +100,4 @@
} // namespace transaction
} // namespace aos
-#endif // AOS_COMMON_TRANSACTION_H_
+#endif // AOS_TRANSACTION_H_
diff --git a/aos/common/transaction_test.cc b/aos/transaction/transaction_test.cc
similarity index 96%
rename from aos/common/transaction_test.cc
rename to aos/transaction/transaction_test.cc
index e74fd69..f7551c8 100644
--- a/aos/common/transaction_test.cc
+++ b/aos/transaction/transaction_test.cc
@@ -1,10 +1,10 @@
-#include "aos/common/transaction.h"
+#include "aos/transaction/transaction.h"
#include <vector>
#include "gtest/gtest.h"
-#include "aos/common/util/death_test_log_implementation.h"
+#include "aos/util/death_test_log_implementation.h"
namespace aos {
namespace transaction {
diff --git a/aos/type_traits/BUILD b/aos/type_traits/BUILD
new file mode 100644
index 0000000..3a5198e
--- /dev/null
+++ b/aos/type_traits/BUILD
@@ -0,0 +1,22 @@
+package(default_visibility = ["//visibility:public"])
+
+cc_library(
+ name = "type_traits",
+ hdrs = [
+ "type_traits.h",
+ ],
+ compatible_with = [
+ "//tools:armhf-debian",
+ ],
+)
+
+cc_test(
+ name = "type_traits_test",
+ srcs = [
+ "type_traits_test.cpp",
+ ],
+ deps = [
+ ":type_traits",
+ "//aos/testing:googletest",
+ ],
+)
diff --git a/aos/common/type_traits.h b/aos/type_traits/type_traits.h
similarity index 95%
rename from aos/common/type_traits.h
rename to aos/type_traits/type_traits.h
index 229e574..f0a2e72 100644
--- a/aos/common/type_traits.h
+++ b/aos/type_traits/type_traits.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_TYPE_TRAITS_
-#define AOS_COMMON_TYPE_TRAITS_
+#ifndef AOS_TYPE_TRAITS_
+#define AOS_TYPE_TRAITS_
#include <features.h>
diff --git a/aos/common/type_traits_test.cpp b/aos/type_traits/type_traits_test.cpp
similarity index 97%
rename from aos/common/type_traits_test.cpp
rename to aos/type_traits/type_traits_test.cpp
index aa104ee..4c060bb 100644
--- a/aos/common/type_traits_test.cpp
+++ b/aos/type_traits/type_traits_test.cpp
@@ -1,4 +1,4 @@
-#include "aos/common/type_traits.h"
+#include "aos/type_traits/type_traits.h"
#include "gtest/gtest.h"
diff --git a/aos/common/unique_malloc_ptr.h b/aos/unique_malloc_ptr.h
similarity index 100%
rename from aos/common/unique_malloc_ptr.h
rename to aos/unique_malloc_ptr.h
diff --git a/aos/common/util/BUILD b/aos/util/BUILD
similarity index 87%
rename from aos/common/util/BUILD
rename to aos/util/BUILD
index 0f2ca73..70f23c4 100644
--- a/aos/common/util/BUILD
+++ b/aos/util/BUILD
@@ -19,7 +19,7 @@
"run_command.h",
],
deps = [
- "//aos/common/logging",
+ "//aos/logging",
],
)
@@ -31,7 +31,7 @@
deps = [
":run_command",
":thread",
- "//aos/common/logging",
+ "//aos/logging",
"//aos/testing:googletest",
],
)
@@ -42,7 +42,7 @@
"death_test_log_implementation.h",
],
deps = [
- "//aos/common/logging:implementations",
+ "//aos/logging:implementations",
],
)
@@ -55,8 +55,8 @@
"inet_addr.h",
],
deps = [
- "//aos/common:byteorder",
- "//aos/common:network_port",
+ "//aos:byteorder",
+ "//aos:network_port",
],
)
@@ -69,8 +69,8 @@
"phased_loop.h",
],
deps = [
- "//aos/common:time",
- "//aos/common/logging",
+ "//aos/time:time",
+ "//aos/logging",
],
)
@@ -80,8 +80,8 @@
"log_interval.h",
],
deps = [
- "//aos/common:time",
- "//aos/common/logging",
+ "//aos/time:time",
+ "//aos/logging",
],
)
@@ -115,8 +115,8 @@
"thread.h",
],
deps = [
- "//aos/common:macros",
- "//aos/common/logging",
+ "//aos:macros",
+ "//aos/logging",
],
)
@@ -132,8 +132,8 @@
"-lm",
],
deps = [
- "//aos/common:time",
- "//aos/common/logging",
+ "//aos/time:time",
+ "//aos/logging",
"//third_party/eigen",
],
)
@@ -225,7 +225,7 @@
"linked_list.h",
],
deps = [
- "//aos/common:transaction",
+ "//aos/transaction:transaction",
],
)
@@ -236,7 +236,7 @@
],
deps = [
":linked_list",
- "//aos/common/logging",
+ "//aos/logging",
"//aos/testing:googletest",
],
)
@@ -262,7 +262,7 @@
"file.h",
],
deps = [
- "//aos/common:scoped_fd",
+ "//aos/scoped:scoped_fd",
],
)
@@ -283,5 +283,5 @@
name = "python_init",
srcs = ["__init__.py"],
visibility = ["//visibility:public"],
- deps = ["//aos/common:python_init"],
+ deps = ["//aos:python_init"],
)
diff --git a/aos/common/util/__init__.py b/aos/util/__init__.py
similarity index 100%
rename from aos/common/util/__init__.py
rename to aos/util/__init__.py
diff --git a/aos/common/util/compiler_memory_barrier.h b/aos/util/compiler_memory_barrier.h
similarity index 62%
rename from aos/common/util/compiler_memory_barrier.h
rename to aos/util/compiler_memory_barrier.h
index 5126941..33da511 100644
--- a/aos/common/util/compiler_memory_barrier.h
+++ b/aos/util/compiler_memory_barrier.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_UTIL_COMPILER_MEMORY_BARRIER_H_
-#define AOS_COMMON_UTIL_COMPILER_MEMORY_BARRIER_H_
+#ifndef AOS_UTIL_COMPILER_MEMORY_BARRIER_H_
+#define AOS_UTIL_COMPILER_MEMORY_BARRIER_H_
// Prevents the compiler from reordering memory operations around this.
// Using this function makes it clearer what you're doing and easier to be
@@ -8,4 +8,4 @@
__asm__ __volatile__("" ::: "memory");
}
-#endif // AOS_COMMON_UTIL_COMPILER_MEMORY_BARRIER_H_
+#endif // AOS_UTIL_COMPILER_MEMORY_BARRIER_H_
diff --git a/aos/common/util/death_test_log_implementation.h b/aos/util/death_test_log_implementation.h
similarity index 73%
rename from aos/common/util/death_test_log_implementation.h
rename to aos/util/death_test_log_implementation.h
index c1b1da2..f061c61 100644
--- a/aos/common/util/death_test_log_implementation.h
+++ b/aos/util/death_test_log_implementation.h
@@ -1,9 +1,9 @@
-#ifndef AOS_COMMON_UTIL_DEATH_TEST_LOG_IMPLEMENTATION_H_
-#define AOS_COMMON_UTIL_DEATH_TEST_LOG_IMPLEMENTATION_H_
+#ifndef AOS_UTIL_DEATH_TEST_LOG_IMPLEMENTATION_H_
+#define AOS_UTIL_DEATH_TEST_LOG_IMPLEMENTATION_H_
#include <stdlib.h>
-#include "aos/common/logging/implementations.h"
+#include "aos/logging/implementations.h"
namespace aos {
namespace util {
@@ -24,4 +24,4 @@
} // namespace util
} // namespace aos
-#endif // AOS_COMMON_UTIL_DEATH_TEST_LOG_IMPLEMENTATION_H_
+#endif // AOS_UTIL_DEATH_TEST_LOG_IMPLEMENTATION_H_
diff --git a/aos/common/util/file.cc b/aos/util/file.cc
similarity index 88%
rename from aos/common/util/file.cc
rename to aos/util/file.cc
index 4c859cf..dc31ddd 100644
--- a/aos/common/util/file.cc
+++ b/aos/util/file.cc
@@ -1,9 +1,9 @@
-#include "aos/common/util/file.h"
+#include "aos/util/file.h"
#include <fcntl.h>
#include <unistd.h>
-#include "aos/common/scoped_fd.h"
+#include "aos/scoped/scoped_fd.h"
namespace aos {
namespace util {
diff --git a/aos/common/util/file.h b/aos/util/file.h
similarity index 72%
rename from aos/common/util/file.h
rename to aos/util/file.h
index a32d0a7..0c1f11f 100644
--- a/aos/common/util/file.h
+++ b/aos/util/file.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_UTIL_FILE_H_
-#define AOS_COMMON_UTIL_FILE_H_
+#ifndef AOS_UTIL_FILE_H_
+#define AOS_UTIL_FILE_H_
#include <string>
@@ -13,4 +13,4 @@
} // namespace util
} // namespace aos
-#endif // AOS_COMMON_UTIL_FILE_H_
+#endif // AOS_UTIL_FILE_H_
diff --git a/aos/common/util/file_test.cc b/aos/util/file_test.cc
similarity index 96%
rename from aos/common/util/file_test.cc
rename to aos/util/file_test.cc
index 12a4976..f904259 100644
--- a/aos/common/util/file_test.cc
+++ b/aos/util/file_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/util/file.h"
+#include "aos/util/file.h"
#include <stdlib.h>
diff --git a/aos/common/util/global_factory.h b/aos/util/global_factory.h
similarity index 95%
rename from aos/common/util/global_factory.h
rename to aos/util/global_factory.h
index aac49bb..5e47972 100644
--- a/aos/common/util/global_factory.h
+++ b/aos/util/global_factory.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_UTIL_GLOBAL_FACTORY_H_
-#define AOS_COMMON_UTIL_GLOBAL_FACTORY_H_
+#ifndef AOS_UTIL_GLOBAL_FACTORY_H_
+#define AOS_UTIL_GLOBAL_FACTORY_H_
#include <functional>
#include <memory>
@@ -90,4 +90,4 @@
} // namespace aos
-#endif // AOS_COMMON_UTIL_GLOBAL_FACTORY_H_
+#endif // AOS_UTIL_GLOBAL_FACTORY_H_
diff --git a/aos/common/util/global_factory_test.cc b/aos/util/global_factory_test.cc
similarity index 96%
rename from aos/common/util/global_factory_test.cc
rename to aos/util/global_factory_test.cc
index 8da7dcb..d50e931 100644
--- a/aos/common/util/global_factory_test.cc
+++ b/aos/util/global_factory_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/util/global_factory.h"
+#include "aos/util/global_factory.h"
#include "gtest/gtest.h"
namespace aos {
diff --git a/aos/common/util/inet_addr.cc b/aos/util/inet_addr.cc
similarity index 91%
rename from aos/common/util/inet_addr.cc
rename to aos/util/inet_addr.cc
index 48bde1d..edb7dbb 100644
--- a/aos/common/util/inet_addr.cc
+++ b/aos/util/inet_addr.cc
@@ -1,10 +1,10 @@
-#include "aos/common/util/inet_addr.h"
+#include "aos/util/inet_addr.h"
#include <stdlib.h>
#ifndef __VXWORKS__
#include <string.h>
-#include "aos/common/byteorder.h"
+#include "aos/byteorder.h"
#else
template<typename T>
diff --git a/aos/common/util/inet_addr.h b/aos/util/inet_addr.h
similarity index 78%
rename from aos/common/util/inet_addr.h
rename to aos/util/inet_addr.h
index 35368f1..dc2d613 100644
--- a/aos/common/util/inet_addr.h
+++ b/aos/util/inet_addr.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_UTIL_INET_ADDR_H_
-#define AOS_COMMON_UTIL_INET_ADDR_H_
+#ifndef AOS_UTIL_INET_ADDR_H_
+#define AOS_UTIL_INET_ADDR_H_
#ifdef __VXWORKS__
#include <inetLib.h>
@@ -9,7 +9,7 @@
#include <arpa/inet.h>
#endif
-#include "aos/common/network_port.h"
+#include "aos/network_port.h"
namespace aos {
namespace util {
@@ -26,4 +26,4 @@
} // namespace util
} // namespace aos
-#endif // AOS_COMMON_UTIL_INET_ADDR_H_
+#endif // AOS_UTIL_INET_ADDR_H_
diff --git a/aos/common/util/linked_list.h b/aos/util/linked_list.h
similarity index 94%
rename from aos/common/util/linked_list.h
rename to aos/util/linked_list.h
index 5821389..5a5824e 100644
--- a/aos/common/util/linked_list.h
+++ b/aos/util/linked_list.h
@@ -1,9 +1,9 @@
-#ifndef AOS_COMMON_UTIL_LINKED_LIST_H_
-#define AOS_COMMON_UTIL_LINKED_LIST_H_
+#ifndef AOS_UTIL_LINKED_LIST_H_
+#define AOS_UTIL_LINKED_LIST_H_
#include <functional>
-#include "aos/common/transaction.h"
+#include "aos/transaction/transaction.h"
namespace aos {
namespace util {
@@ -110,4 +110,4 @@
} // namespace util
} // namespace aos
-#endif // AOS_COMMON_UTIL_LINKED_LIST_H_
+#endif // AOS_UTIL_LINKED_LIST_H_
diff --git a/aos/common/util/linked_list_test.cc b/aos/util/linked_list_test.cc
similarity index 98%
rename from aos/common/util/linked_list_test.cc
rename to aos/util/linked_list_test.cc
index 0f4b2c8..6959628 100644
--- a/aos/common/util/linked_list_test.cc
+++ b/aos/util/linked_list_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/util/linked_list.h"
+#include "aos/util/linked_list.h"
#include <vector>
diff --git a/aos/common/util/log_interval.h b/aos/util/log_interval.h
similarity index 92%
rename from aos/common/util/log_interval.h
rename to aos/util/log_interval.h
index 8823341..5e76166 100644
--- a/aos/common/util/log_interval.h
+++ b/aos/util/log_interval.h
@@ -1,8 +1,8 @@
-#ifndef AOS_COMMON_UTIL_LOG_INTERVAL_H_
-#define AOS_COMMON_UTIL_LOG_INTERVAL_H_
+#ifndef AOS_UTIL_LOG_INTERVAL_H_
+#define AOS_UTIL_LOG_INTERVAL_H_
-#include "aos/common/time.h"
-#include "aos/common/logging/logging.h"
+#include "aos/time/time.h"
+#include "aos/logging/logging.h"
#include <string>
@@ -94,4 +94,4 @@
} // namespace util
} // namespace aos
-#endif // AOS_COMMON_UTIL_LOG_INTERVAL_H_
+#endif // AOS_UTIL_LOG_INTERVAL_H_
diff --git a/aos/common/util/options.h b/aos/util/options.h
similarity index 95%
rename from aos/common/util/options.h
rename to aos/util/options.h
index 48c4fd8..39f7e8f 100644
--- a/aos/common/util/options.h
+++ b/aos/util/options.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_UTIL_OPTIONS_H_
-#define AOS_COMMON_UTIL_OPTIONS_H_
+#ifndef AOS_UTIL_OPTIONS_H_
+#define AOS_UTIL_OPTIONS_H_
#include <sys/types.h>
@@ -89,4 +89,4 @@
} // namespace options
-#endif // AOS_COMMON_UTIL_OPTIONS_H_
+#endif // AOS_UTIL_OPTIONS_H_
diff --git a/aos/common/util/options_test.cc b/aos/util/options_test.cc
similarity index 97%
rename from aos/common/util/options_test.cc
rename to aos/util/options_test.cc
index 197340c..ee228cb 100644
--- a/aos/common/util/options_test.cc
+++ b/aos/util/options_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/util/options.h"
+#include "aos/util/options.h"
#include "gtest/gtest.h"
diff --git a/aos/common/util/phased_loop.cc b/aos/util/phased_loop.cc
similarity index 94%
rename from aos/common/util/phased_loop.cc
rename to aos/util/phased_loop.cc
index 5382df2..a349718 100644
--- a/aos/common/util/phased_loop.cc
+++ b/aos/util/phased_loop.cc
@@ -1,4 +1,4 @@
-#include "aos/common/util/phased_loop.h"
+#include "aos/util/phased_loop.h"
namespace aos {
namespace time {
diff --git a/aos/common/util/phased_loop.h b/aos/util/phased_loop.h
similarity index 93%
rename from aos/common/util/phased_loop.h
rename to aos/util/phased_loop.h
index 958bd01..1c1aef1 100644
--- a/aos/common/util/phased_loop.h
+++ b/aos/util/phased_loop.h
@@ -1,9 +1,9 @@
-#ifndef AOS_COMMON_UTIL_PHASED_LOOP_H_
-#define AOS_COMMON_UTIL_PHASED_LOOP_H_
+#ifndef AOS_UTIL_PHASED_LOOP_H_
+#define AOS_UTIL_PHASED_LOOP_H_
-#include "aos/common/time.h"
+#include "aos/time/time.h"
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
namespace aos {
namespace time {
@@ -85,4 +85,4 @@
} // namespace time
} // namespace aos
-#endif // AOS_COMMON_UTIL_PHASED_LOOP_H_
+#endif // AOS_UTIL_PHASED_LOOP_H_
diff --git a/aos/common/util/phased_loop_test.cc b/aos/util/phased_loop_test.cc
similarity index 99%
rename from aos/common/util/phased_loop_test.cc
rename to aos/util/phased_loop_test.cc
index b9d6e52..2a52b90 100644
--- a/aos/common/util/phased_loop_test.cc
+++ b/aos/util/phased_loop_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/util/phased_loop.h"
+#include "aos/util/phased_loop.h"
#include "gtest/gtest.h"
diff --git a/aos/common/util/run_command.cc b/aos/util/run_command.cc
similarity index 95%
rename from aos/common/util/run_command.cc
rename to aos/util/run_command.cc
index a4a19d8..2b08cb2 100644
--- a/aos/common/util/run_command.cc
+++ b/aos/util/run_command.cc
@@ -1,4 +1,4 @@
-#include "aos/common/util/run_command.h"
+#include "aos/util/run_command.h"
#include <signal.h>
#include <sys/types.h>
@@ -7,7 +7,7 @@
#include <fcntl.h>
#include <sys/stat.h>
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
namespace aos {
namespace util {
diff --git a/aos/common/util/run_command.h b/aos/util/run_command.h
similarity index 75%
rename from aos/common/util/run_command.h
rename to aos/util/run_command.h
index d116481..02c6785 100644
--- a/aos/common/util/run_command.h
+++ b/aos/util/run_command.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_UTIL_RUN_COMMAND_H_
-#define AOS_COMMON_UTIL_RUN_COMMAND_H_
+#ifndef AOS_UTIL_RUN_COMMAND_H_
+#define AOS_UTIL_RUN_COMMAND_H_
namespace aos {
namespace util {
@@ -14,4 +14,4 @@
} // namespace util
} // namespace aos
-#endif // AOS_COMMON_UTIL_RUN_COMMAND_H_
+#endif // AOS_UTIL_RUN_COMMAND_H_
diff --git a/aos/common/util/run_command_test.cc b/aos/util/run_command_test.cc
similarity index 94%
rename from aos/common/util/run_command_test.cc
rename to aos/util/run_command_test.cc
index daff3c5..775b716 100644
--- a/aos/common/util/run_command_test.cc
+++ b/aos/util/run_command_test.cc
@@ -1,8 +1,8 @@
-#include "aos/common/util/run_command.h"
+#include "aos/util/run_command.h"
#include "gtest/gtest.h"
-#include "aos/common/util/thread.h"
+#include "aos/util/thread.h"
namespace aos {
namespace util {
diff --git a/aos/common/util/string_to_num.h b/aos/util/string_to_num.h
similarity index 86%
rename from aos/common/util/string_to_num.h
rename to aos/util/string_to_num.h
index d99ed91..86210ca 100644
--- a/aos/common/util/string_to_num.h
+++ b/aos/util/string_to_num.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_UTIL_STRING_TO_NUM_H_
-#define AOS_COMMON_UTIL_STRING_TO_NUM_H_
+#ifndef AOS_UTIL_STRING_TO_NUM_H_
+#define AOS_UTIL_STRING_TO_NUM_H_
#include <sstream>
#include <string>
diff --git a/aos/common/util/string_to_num_test.cc b/aos/util/string_to_num_test.cc
similarity index 95%
rename from aos/common/util/string_to_num_test.cc
rename to aos/util/string_to_num_test.cc
index df3897a..3f467cf 100644
--- a/aos/common/util/string_to_num_test.cc
+++ b/aos/util/string_to_num_test.cc
@@ -4,7 +4,7 @@
#include "gtest/gtest.h"
-#include "aos/common/util/string_to_num.h"
+#include "aos/util/string_to_num.h"
namespace aos {
namespace util {
diff --git a/aos/common/util/thread.cc b/aos/util/thread.cc
similarity index 95%
rename from aos/common/util/thread.cc
rename to aos/util/thread.cc
index 54a8ef2..6b3ef76 100644
--- a/aos/common/util/thread.cc
+++ b/aos/util/thread.cc
@@ -1,9 +1,9 @@
-#include "aos/common/util/thread.h"
+#include "aos/util/thread.h"
#include <pthread.h>
#include <signal.h>
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
namespace aos {
namespace util {
diff --git a/aos/common/util/thread.h b/aos/util/thread.h
similarity index 93%
rename from aos/common/util/thread.h
rename to aos/util/thread.h
index 993e343..5992810 100644
--- a/aos/common/util/thread.h
+++ b/aos/util/thread.h
@@ -1,12 +1,12 @@
-#ifndef AOS_COMMON_UTIL_THREAD_H_
-#define AOS_COMMON_UTIL_THREAD_H_
+#ifndef AOS_UTIL_THREAD_H_
+#define AOS_UTIL_THREAD_H_
#include <functional>
#include <atomic>
#include <pthread.h>
-#include "aos/common/macros.h"
+#include "aos/macros.h"
namespace aos {
namespace util {
@@ -87,4 +87,4 @@
} // namespace util
} // namespace aos
-#endif // AOS_COMMON_UTIL_THREAD_H_
+#endif // AOS_UTIL_THREAD_H_
diff --git a/aos/common/util/trapezoid_profile.cc b/aos/util/trapezoid_profile.cc
similarity index 97%
rename from aos/common/util/trapezoid_profile.cc
rename to aos/util/trapezoid_profile.cc
index 4e4546e..e58324f 100644
--- a/aos/common/util/trapezoid_profile.cc
+++ b/aos/util/trapezoid_profile.cc
@@ -1,6 +1,6 @@
-#include "aos/common/util/trapezoid_profile.h"
+#include "aos/util/trapezoid_profile.h"
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
using ::Eigen::Matrix;
diff --git a/aos/common/util/trapezoid_profile.h b/aos/util/trapezoid_profile.h
similarity index 90%
rename from aos/common/util/trapezoid_profile.h
rename to aos/util/trapezoid_profile.h
index cc91db1..944c423 100644
--- a/aos/common/util/trapezoid_profile.h
+++ b/aos/util/trapezoid_profile.h
@@ -1,10 +1,10 @@
-#ifndef AOS_COMMON_UTIL_TRAPEZOID_PROFILE_H_
-#define AOS_COMMON_UTIL_TRAPEZOID_PROFILE_H_
+#ifndef AOS_UTIL_TRAPEZOID_PROFILE_H_
+#define AOS_UTIL_TRAPEZOID_PROFILE_H_
#include "Eigen/Dense"
-#include "aos/common/macros.h"
-#include "aos/common/time.h"
+#include "aos/macros.h"
+#include "aos/time/time.h"
namespace aos {
namespace util {
@@ -66,4 +66,4 @@
} // namespace util
} // namespace aos
-#endif // AOS_COMMON_UTIL_TRAPEZOID_PROFILE_H_
+#endif // AOS_UTIL_TRAPEZOID_PROFILE_H_
diff --git a/aos/common/util/trapezoid_profile.py b/aos/util/trapezoid_profile.py
similarity index 100%
rename from aos/common/util/trapezoid_profile.py
rename to aos/util/trapezoid_profile.py
diff --git a/aos/common/util/trapezoid_profile_test.cc b/aos/util/trapezoid_profile_test.cc
similarity index 98%
rename from aos/common/util/trapezoid_profile_test.cc
rename to aos/util/trapezoid_profile_test.cc
index f9ae817..79795e1 100644
--- a/aos/common/util/trapezoid_profile_test.cc
+++ b/aos/util/trapezoid_profile_test.cc
@@ -2,7 +2,7 @@
#include "Eigen/Dense"
-#include "aos/common/util/trapezoid_profile.h"
+#include "aos/util/trapezoid_profile.h"
namespace aos {
namespace util {
diff --git a/aos/common/util/wrapping_counter.cc b/aos/util/wrapping_counter.cc
similarity index 88%
rename from aos/common/util/wrapping_counter.cc
rename to aos/util/wrapping_counter.cc
index 61f5047..f98d7e3 100644
--- a/aos/common/util/wrapping_counter.cc
+++ b/aos/util/wrapping_counter.cc
@@ -1,4 +1,4 @@
-#include "aos/common/util/wrapping_counter.h"
+#include "aos/util/wrapping_counter.h"
namespace aos {
namespace util {
diff --git a/aos/common/util/wrapping_counter.h b/aos/util/wrapping_counter.h
similarity index 84%
rename from aos/common/util/wrapping_counter.h
rename to aos/util/wrapping_counter.h
index fbf3611..a327dd8 100644
--- a/aos/common/util/wrapping_counter.h
+++ b/aos/util/wrapping_counter.h
@@ -1,5 +1,5 @@
-#ifndef AOS_COMMON_UTIL_WRAPPING_COUNTER_H_
-#define AOS_COMMON_UTIL_WRAPPING_COUNTER_H_
+#ifndef AOS_UTIL_WRAPPING_COUNTER_H_
+#define AOS_UTIL_WRAPPING_COUNTER_H_
#include <stdint.h>
@@ -31,4 +31,4 @@
} // namespace util
} // namespace aos
-#endif // AOS_COMMON_UTIL_WRAPPING_COUNTER_H_
+#endif // AOS_UTIL_WRAPPING_COUNTER_H_
diff --git a/aos/common/util/wrapping_counter_test.cc b/aos/util/wrapping_counter_test.cc
similarity index 96%
rename from aos/common/util/wrapping_counter_test.cc
rename to aos/util/wrapping_counter_test.cc
index e257fb0..e5c58f3 100644
--- a/aos/common/util/wrapping_counter_test.cc
+++ b/aos/util/wrapping_counter_test.cc
@@ -1,4 +1,4 @@
-#include "aos/common/util/wrapping_counter.h"
+#include "aos/util/wrapping_counter.h"
#include <limits.h>
diff --git a/aos/vision/blob/BUILD b/aos/vision/blob/BUILD
index e1255c8..bc1e7f0 100644
--- a/aos/vision/blob/BUILD
+++ b/aos/vision/blob/BUILD
@@ -25,7 +25,7 @@
"//tools:armhf-debian",
],
deps = [
- "//aos/common/logging",
+ "//aos/logging",
],
)
diff --git a/aos/vision/blob/region_alloc.h b/aos/vision/blob/region_alloc.h
index 4bc4156..8c7bc57 100644
--- a/aos/vision/blob/region_alloc.h
+++ b/aos/vision/blob/region_alloc.h
@@ -9,7 +9,7 @@
#include <utility>
#include <vector>
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
namespace aos {
namespace vision {
diff --git a/aos/vision/debug/BUILD b/aos/vision/debug/BUILD
index 06f5d0b..bb03a75 100644
--- a/aos/vision/debug/BUILD
+++ b/aos/vision/debug/BUILD
@@ -43,9 +43,9 @@
"//tools:armhf-debian",
],
deps = [
- "//aos/common/logging",
- "//aos/common/logging:implementations",
- "//aos/common/util:global_factory",
+ "//aos/logging",
+ "//aos/logging:implementations",
+ "//aos/util:global_factory",
"//aos/vision/blob:codec",
"//aos/vision/blob:find_blob",
"//aos/vision/blob:range_image",
diff --git a/aos/vision/debug/debug_framework.cc b/aos/vision/debug/debug_framework.cc
index d4ba0d2..46f5400 100644
--- a/aos/vision/debug/debug_framework.cc
+++ b/aos/vision/debug/debug_framework.cc
@@ -2,8 +2,8 @@
#include <gtk/gtk.h>
-#include "aos/common/logging/implementations.h"
-#include "aos/common/logging/logging.h"
+#include "aos/logging/implementations.h"
+#include "aos/logging/logging.h"
#include "aos/vision/blob/find_blob.h"
#include "aos/vision/blob/stream_view.h"
#include "aos/vision/events/epoll_events.h"
diff --git a/aos/vision/debug/debug_framework.h b/aos/vision/debug/debug_framework.h
index e838913..d5b345f 100644
--- a/aos/vision/debug/debug_framework.h
+++ b/aos/vision/debug/debug_framework.h
@@ -1,7 +1,7 @@
#ifndef _AOS_VISION_DEBUG_DEBUG_FRAMEWORK_H_
#define _AOS_VISION_DEBUG_DEBUG_FRAMEWORK_H_
-#include "aos/common/util/global_factory.h"
+#include "aos/util/global_factory.h"
#include "aos/vision/blob/range_image.h"
#include "aos/vision/events/epoll_events.h"
#include "aos/vision/image/camera_params.pb.h"
diff --git a/aos/vision/events/BUILD b/aos/vision/events/BUILD
index b3affc2..359822c 100644
--- a/aos/vision/events/BUILD
+++ b/aos/vision/events/BUILD
@@ -10,9 +10,9 @@
"//tools:armhf-debian",
],
deps = [
- "//aos/common:scoped_fd",
- "//aos/common:time",
- "//aos/common/logging",
+ "//aos/scoped:scoped_fd",
+ "//aos/time:time",
+ "//aos/logging",
],
)
@@ -68,8 +68,8 @@
"//tools:armhf-debian",
],
deps = [
- "//aos/common:macros",
- "//aos/common:scoped_fd",
+ "//aos:macros",
+ "//aos/scoped:scoped_fd",
],
)
diff --git a/aos/vision/events/epoll_events.cc b/aos/vision/events/epoll_events.cc
index b0c66fa..0043b78 100644
--- a/aos/vision/events/epoll_events.cc
+++ b/aos/vision/events/epoll_events.cc
@@ -7,7 +7,7 @@
#include <sys/types.h>
#include <vector>
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
namespace aos {
namespace events {
diff --git a/aos/vision/events/epoll_events.h b/aos/vision/events/epoll_events.h
index 234d949..19851ed 100644
--- a/aos/vision/events/epoll_events.h
+++ b/aos/vision/events/epoll_events.h
@@ -7,8 +7,8 @@
#include <vector>
#include <sys/epoll.h>
-#include "aos/common/scoped_fd.h"
-#include "aos/common/time.h"
+#include "aos/scoped/scoped_fd.h"
+#include "aos/time/time.h"
namespace aos {
namespace events {
diff --git a/aos/vision/events/tcp_client.cc b/aos/vision/events/tcp_client.cc
index 4ac45af..8e197ec 100644
--- a/aos/vision/events/tcp_client.cc
+++ b/aos/vision/events/tcp_client.cc
@@ -13,7 +13,7 @@
#include <unistd.h>
#include <unistd.h>
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
namespace aos {
namespace events {
diff --git a/aos/vision/events/tcp_server.cc b/aos/vision/events/tcp_server.cc
index 06f3a41..0fd7225 100644
--- a/aos/vision/events/tcp_server.cc
+++ b/aos/vision/events/tcp_server.cc
@@ -13,7 +13,7 @@
#include <sys/types.h>
#include <unistd.h>
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
namespace aos {
namespace events {
diff --git a/aos/vision/events/udp.cc b/aos/vision/events/udp.cc
index 660342c..ed39db9 100644
--- a/aos/vision/events/udp.cc
+++ b/aos/vision/events/udp.cc
@@ -2,7 +2,7 @@
#include <string.h>
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
namespace aos {
namespace events {
diff --git a/aos/vision/events/udp.h b/aos/vision/events/udp.h
index 9a23dab..503ead1 100644
--- a/aos/vision/events/udp.h
+++ b/aos/vision/events/udp.h
@@ -8,8 +8,8 @@
#include <string>
#include <vector>
-#include "aos/common/macros.h"
-#include "aos/common/scoped_fd.h"
+#include "aos/macros.h"
+#include "aos/scoped/scoped_fd.h"
namespace aos {
namespace events {
diff --git a/aos/vision/image/BUILD b/aos/vision/image/BUILD
index 8409ea5..39c40d6 100644
--- a/aos/vision/image/BUILD
+++ b/aos/vision/image/BUILD
@@ -9,7 +9,7 @@
"//tools:armhf-debian",
],
deps = [
- "//aos/common/logging",
+ "//aos/logging",
],
)
@@ -34,8 +34,8 @@
deps = [
":camera_params",
":image_types",
- "//aos/common:time",
- "//aos/common/logging",
+ "//aos/time:time",
+ "//aos/logging",
],
)
@@ -48,7 +48,7 @@
],
deps = [
":image_types",
- "//aos/common/logging",
+ "//aos/logging",
"//third_party/libjpeg",
],
)
diff --git a/aos/vision/image/image_types.h b/aos/vision/image/image_types.h
index f8e5e65..d4ddbf2 100644
--- a/aos/vision/image/image_types.h
+++ b/aos/vision/image/image_types.h
@@ -7,7 +7,7 @@
#include <sstream>
#include <experimental/string_view>
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
namespace aos {
namespace vision {
diff --git a/aos/vision/image/jpeg_routines.cc b/aos/vision/image/jpeg_routines.cc
index b6be41b..237daff 100644
--- a/aos/vision/image/jpeg_routines.cc
+++ b/aos/vision/image/jpeg_routines.cc
@@ -10,7 +10,7 @@
#include <unistd.h>
#include <cstring>
-#include "aos/common/logging/logging.h"
+#include "aos/logging/logging.h"
#include "third_party/libjpeg/jpeglib.h"
namespace aos {
diff --git a/aos/vision/image/reader.cc b/aos/vision/image/reader.cc
index 57766e2..aaf9a10 100644
--- a/aos/vision/image/reader.cc
+++ b/aos/vision/image/reader.cc
@@ -12,8 +12,8 @@
#include <sys/types.h>
#include <unistd.h>
-#include "aos/common/logging/logging.h"
-#include "aos/common/time.h"
+#include "aos/logging/logging.h"
+#include "aos/time/time.h"
#define CLEAR(x) memset(&(x), 0, sizeof(x))
diff --git a/aos/vision/image/reader.h b/aos/vision/image/reader.h
index e913ad1..adb3a3c 100644
--- a/aos/vision/image/reader.h
+++ b/aos/vision/image/reader.h
@@ -5,7 +5,7 @@
#include <functional>
#include <string>
-#include "aos/common/time.h"
+#include "aos/time/time.h"
#include "aos/vision/image/V4L2.h"
#include "aos/vision/image/camera_params.pb.h"
#include "aos/vision/image/image_types.h"
diff --git a/aos/vision/tools/BUILD b/aos/vision/tools/BUILD
index 09c2d55..c4119e8 100644
--- a/aos/vision/tools/BUILD
+++ b/aos/vision/tools/BUILD
@@ -3,8 +3,8 @@
gtk_dependent_cc_binary(name = "jpeg_vision_test",
srcs = ["jpeg_vision_test.cc"],
deps = [
- "//aos/common/logging:logging",
- "//aos/common/logging:implementations",
+ "//aos/logging:logging",
+ "//aos/logging:implementations",
"//aos/vision/math:vector",
"//aos/vision/image:reader",
"//aos/vision/image:jpeg_routines",
@@ -22,8 +22,8 @@
name = 'camera_primer',
srcs = ['camera_primer.cc'],
deps = [
- '//aos/common/logging:logging',
- '//aos/common/logging:implementations',
+ '//aos/logging:logging',
+ '//aos/logging:implementations',
'//aos/vision/image:image_stream',
'//aos/vision/events:epoll_events',
],
diff --git a/aos/vision/tools/camera_primer.cc b/aos/vision/tools/camera_primer.cc
index 3ba24bc..1ac96fd 100644
--- a/aos/vision/tools/camera_primer.cc
+++ b/aos/vision/tools/camera_primer.cc
@@ -1,5 +1,5 @@
-#include "aos/common/logging/implementations.h"
-#include "aos/common/logging/logging.h"
+#include "aos/logging/implementations.h"
+#include "aos/logging/logging.h"
#include "aos/vision/events/epoll_events.h"
#include "aos/vision/image/image_stream.h"
diff --git a/aos/vision/tools/jpeg_vision_test.cc b/aos/vision/tools/jpeg_vision_test.cc
index 059166e..072b57b 100644
--- a/aos/vision/tools/jpeg_vision_test.cc
+++ b/aos/vision/tools/jpeg_vision_test.cc
@@ -12,8 +12,8 @@
#include <memory>
#include <vector>
-#include "aos/common/logging/implementations.h"
-#include "aos/common/logging/logging.h"
+#include "aos/logging/implementations.h"
+#include "aos/logging/logging.h"
#include "aos/vision/blob/range_image.h"
#include "aos/vision/blob/stream_view.h"
#include "aos/vision/blob/threshold.h"