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/logging/implementations.h b/aos/logging/implementations.h
index 5f7e1c5..27c0472 100644
--- a/aos/logging/implementations.h
+++ b/aos/logging/implementations.h
@@ -43,7 +43,7 @@
// Contains all of the information about a given logging call.
struct LogMessage {
enum class Type : uint8_t {
- kString, kStruct, kMatrix
+ kString
};
int32_t seconds, nseconds;
@@ -100,23 +100,6 @@
return LOG_UNKNOWN;
}
-// A LogImplementation where LogStruct and LogMatrix just create a string with
-// PrintMessage and then forward on to DoLog.
-class SimpleLogImplementation : public LogImplementation {
- protected:
- virtual ::aos::monotonic_clock::time_point monotonic_now() const {
- return ::aos::monotonic_clock::now();
- }
-
- private:
- void LogStruct(log_level level, const ::std::string &message, size_t size,
- const MessageType *type,
- const ::std::function<size_t(char *)> &serialize) override;
- void LogMatrix(log_level level, const ::std::string &message,
- uint32_t type_id, int rows, int cols,
- const void *data) override;
-};
-
// Implements all of the DoLog* methods in terms of a (pure virtual in this
// class) HandleMessage method that takes a pointer to the message.
class HandleMessageLogImplementation : public LogImplementation {
@@ -128,12 +111,6 @@
private:
__attribute__((format(GOOD_PRINTF_FORMAT_TYPE, 3, 0)))
void DoLog(log_level level, const char *format, va_list ap) override;
- void LogStruct(log_level level, const ::std::string &message_string,
- size_t size, const MessageType *type,
- const ::std::function<size_t(char *)> &serialize) override;
- void LogMatrix(log_level level, const ::std::string &message_string,
- uint32_t type_id, int rows, int cols,
- const void *data) override;
virtual void HandleMessage(const LogMessage &message) = 0;
};
@@ -186,23 +163,6 @@
// goes.
namespace internal {
-// Fills in all the parts of message according to the given inputs (with type
-// kStruct).
-void FillInMessageStructure(bool add_to_type_cache, log_level level,
- ::aos::monotonic_clock::time_point monotonic_now,
- const ::std::string &message_string, size_t size,
- const MessageType *type,
- const ::std::function<size_t(char *)> &serialize,
- LogMessage *message);
-
-// Fills in all the parts of the message according to the given inputs (with
-// type kMatrix).
-void FillInMessageMatrix(log_level level,
- ::aos::monotonic_clock::time_point monotonic_now,
- const ::std::string &message_string, uint32_t type_id,
- int rows, int cols, const void *data,
- LogMessage *message);
-
// Fills in *message according to the given inputs (with type kString).
// Used for implementing LogImplementation::DoLog.
void FillInMessage(log_level level,