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/y2016/actors/superstructure_actor.h b/y2016/actors/superstructure_actor.h
index ab84db5..f1ae1fe 100644
--- a/y2016/actors/superstructure_actor.h
+++ b/y2016/actors/superstructure_actor.h
@@ -5,29 +5,30 @@
#include "aos/actions/actions.h"
#include "aos/actions/actor.h"
-#include "y2016/actors/superstructure_action.q.h"
-#include "y2016/control_loops/superstructure/superstructure.q.h"
+#include "y2016/actors/superstructure_action_generated.h"
+#include "y2016/control_loops/superstructure/superstructure_goal_generated.h"
+#include "y2016/control_loops/superstructure/superstructure_status_generated.h"
namespace y2016 {
namespace actors {
class SuperstructureActor
- : public ::aos::common::actions::ActorBase<SuperstructureActionQueueGroup> {
+ : public ::aos::common::actions::ActorBase<superstructure_action::Goal> {
public:
typedef ::aos::common::actions::TypedActionFactory<
- SuperstructureActionQueueGroup>
+ superstructure_action::Goal>
Factory;
explicit SuperstructureActor(::aos::EventLoop *event_loop);
static Factory MakeFactory(::aos::EventLoop *event_loop) {
- return Factory(event_loop, ".y2016.actors.superstructure_action");
+ return Factory(event_loop, "/superstructure_action");
}
private:
- ::aos::Sender<::y2016::control_loops::SuperstructureQueue::Goal>
+ ::aos::Sender<::y2016::control_loops::superstructure::Goal>
superstructure_goal_sender_;
- ::aos::Fetcher<::y2016::control_loops::SuperstructureQueue::Status>
+ ::aos::Fetcher<::y2016::control_loops::superstructure::Status>
superstructure_status_fetcher_;
// Internal struct holding superstructure goals sent by autonomous to the
// loop.
@@ -37,7 +38,8 @@
double wrist;
};
SuperstructureGoal superstructure_goal_;
- bool RunAction(const actors::SuperstructureActionParams ¶ms) override;
+ bool RunAction(
+ const superstructure_action::SuperstructureActionParams *params) override;
void MoveSuperstructure(double shoulder, double shooter, bool unfold_climber);
void WaitForSuperstructure();
bool SuperstructureProfileDone();