Store UUIDs as 16 bytes of data
This makes them much more efficient to write over shared memory to solve
the boot UUID logging problem when we add them.
Change-Id: Idf361d6b096bfa52cbc98f555c90bf1f6b90d3e0
diff --git a/aos/network/message_bridge_protocol.cc b/aos/network/message_bridge_protocol.cc
index 53102c2..87114ed 100644
--- a/aos/network/message_bridge_protocol.cc
+++ b/aos/network/message_bridge_protocol.cc
@@ -13,14 +13,14 @@
aos::FlatbufferDetachedBuffer<aos::message_bridge::Connect> MakeConnectMessage(
const Configuration *config, const Node *my_node,
- std::string_view remote_name, std::string_view boot_uuid) {
+ std::string_view remote_name, const UUID &boot_uuid) {
CHECK(config->has_nodes()) << ": Config must have nodes to transfer.";
flatbuffers::FlatBufferBuilder fbb;
fbb.ForceDefaults(true);
flatbuffers::Offset<flatbuffers::String> boot_uuid_offset =
- fbb.CreateString(boot_uuid);
+ boot_uuid.PackString(&fbb);
flatbuffers::Offset<Node> node_offset =
RecursiveCopyFlatBuffer<Node>(my_node, &fbb);