Increase number of timing report senders.
With all the threads in wpilib, we blew through the number of senders.
We have no logged data, so this is a fine schema breaking change.
Change-Id: I62381faf9e0f96750e68aacca4a139e8af7ac961
diff --git a/aos/configuration.fbs b/aos/configuration.fbs
index a5cb59f..a9e71ea 100644
--- a/aos/configuration.fbs
+++ b/aos/configuration.fbs
@@ -15,6 +15,11 @@
// computed in the future.)
max_size:int = 1000;
+ // Sets the maximum number of senders on a channel.
+ num_senders:int = 10;
+ // Sets the maximum number of watchers on a channel.
+ num_watchers:int = 10;
+
// The schema for the data sent on this channel.
schema:reflection.Schema;
}
diff --git a/aos/events/aos.json b/aos/events/aos.json
index 80eb4f7..141a43d 100644
--- a/aos/events/aos.json
+++ b/aos/events/aos.json
@@ -3,7 +3,8 @@
{
"name": "/aos",
"type": "aos.timing.Report",
- "frequency": 50
+ "frequency": 50,
+ "num_senders": 20
}
]
}
diff --git a/aos/events/shm_event_loop.cc b/aos/events/shm_event_loop.cc
index a8a8e01..bd6d37c 100644
--- a/aos/events/shm_event_loop.cc
+++ b/aos/events/shm_event_loop.cc
@@ -42,9 +42,8 @@
MMapedQueue(const Channel *channel) {
std::string path = ShmPath(channel);
- // TODO(austin): Pull these out into the config if there is a need.
- config_.num_watchers = 10;
- config_.num_senders = 10;
+ config_.num_watchers = channel->num_watchers();
+ config_.num_senders = channel->num_senders();
config_.queue_size = 2 * channel->frequency();
config_.message_data_size = channel->max_size();