Use overloading instead of default values
As we are getting ready to add the send boot UUID everywhere, that will
require a UUID as an argument to all the Send methods with a default
that is event_loop_->boot_uuid(). That doesn't work. Instead, use
overloading to achieve the same purpose.
There are few call sites for all of these, so it isn't hard to change
them all.
Change-Id: Id1e17bbef2e63c72fa6ad2b038c69d452610e86e
diff --git a/aos/events/event_loop_tmpl.h b/aos/events/event_loop_tmpl.h
index 06b1643..74d3493 100644
--- a/aos/events/event_loop_tmpl.h
+++ b/aos/events/event_loop_tmpl.h
@@ -129,6 +129,11 @@
return false;
}
+inline bool RawSender::Send(size_t size) {
+ return Send(size, monotonic_clock::min_time, realtime_clock::min_time,
+ 0xffffffffu);
+}
+
inline bool RawSender::Send(
size_t size, aos::monotonic_clock::time_point monotonic_remote_time,
aos::realtime_clock::time_point realtime_remote_time,
@@ -147,6 +152,11 @@
return false;
}
+inline bool RawSender::Send(const void *data, size_t size) {
+ return Send(data, size, monotonic_clock::min_time, realtime_clock::min_time,
+ 0xffffffffu);
+}
+
inline bool RawSender::Send(
const void *data, size_t size,
aos::monotonic_clock::time_point monotonic_remote_time,