Convert aos over to flatbuffers
Everything builds, and all the tests pass. I suspect that some entries
are missing from the config files, but those will be found pretty
quickly on startup.
There is no logging or live introspection of queue messages.
Change-Id: I496ee01ed68f202c7851bed7e8786cee30df29f5
diff --git a/aos/vision/image/BUILD b/aos/vision/image/BUILD
index 21dbbb8..9b6d30a 100644
--- a/aos/vision/image/BUILD
+++ b/aos/vision/image/BUILD
@@ -5,6 +5,9 @@
cc_library(
name = "image_types",
hdrs = ["image_types.h"],
+ deps = [
+ "@com_google_absl//absl/strings",
+ ],
)
cc_proto_library(
diff --git a/aos/vision/image/image_dataset.cc b/aos/vision/image/image_dataset.cc
index d4dde95..33bf0e4 100644
--- a/aos/vision/image/image_dataset.cc
+++ b/aos/vision/image/image_dataset.cc
@@ -37,10 +37,10 @@
res.reserve(pos.size() + 1);
i = 0;
for (auto p : pos) {
- res.emplace_back(inp.substr(i, p - i).to_string());
+ res.emplace_back(std::string(inp.substr(i, p - i)));
i = p + 1;
}
- res.emplace_back(inp.substr(i).to_string());
+ res.emplace_back(std::string(inp.substr(i)));
return res;
}
} // namespace
diff --git a/aos/vision/image/image_types.h b/aos/vision/image/image_types.h
index a620d8a..aff7056 100644
--- a/aos/vision/image/image_types.h
+++ b/aos/vision/image/image_types.h
@@ -6,7 +6,7 @@
#include <memory>
#include <sstream>
-#include <experimental/string_view>
+#include "absl/strings/string_view.h"
namespace aos {
namespace vision {
@@ -20,7 +20,7 @@
};
// This will go into c++17. No sense writing my own version.
-using DataRef = std::experimental::string_view;
+using DataRef = absl::string_view;
// Represents the dimensions of an image.
struct ImageFormat {