Remove unused SerializableControlLoop class
This will make it simpler to convert control_loop.h to using events.
Change-Id: Iac39d22471eb1acd77dadb710f67181b7801edd6
diff --git a/aos/controls/control_loop.h b/aos/controls/control_loop.h
index fd63e3f..d52a5d1 100644
--- a/aos/controls/control_loop.h
+++ b/aos/controls/control_loop.h
@@ -22,21 +22,6 @@
virtual void Iterate() = 0;
};
-class SerializableControlLoop : public Runnable {
- public:
- // Returns the size of all the data to be sent when serialized.
- virtual size_t SeralizedSize() = 0;
- // Serialize the current data.
- virtual void Serialize(char *buffer) const = 0;
- // Serialize zeroed data in case the data is out of date.
- virtual void SerializeZeroMessage(char *buffer) const = 0;
- // Deserialize data into the control loop.
- virtual void Deserialize(const char *buffer) = 0;
- // Unique identifier for the control loop.
- // Most likely the hash of the queue group.
- virtual uint32_t UniqueID() = 0;
-};
-
// Control loops run this often, "starting" at time 0.
constexpr ::std::chrono::nanoseconds kLoopFrequency =
::std::chrono::milliseconds(5);
@@ -47,7 +32,7 @@
// It will then call the RunIteration method every cycle that it has enough
// valid data for the control loop to run.
template <class T>
-class ControlLoop : public SerializableControlLoop {
+class ControlLoop : public Runnable {
public:
// Create some convenient typedefs to reference the Goal, Position, Status,
// and Output structures.
@@ -97,26 +82,6 @@
// Returns the name of the queue group.
const char *name() { return control_loop_->name(); }
- // Methods to serialize all the data that should be sent over the network.
- size_t SeralizedSize() override { return control_loop_->goal->Size(); }
- void Serialize(char *buffer) const override {
- control_loop_->goal->Serialize(buffer);
- }
- void SerializeZeroMessage(char *buffer) const override {
- GoalType zero_goal;
- zero_goal.Zero();
- zero_goal.Serialize(buffer);
- }
-
- void Deserialize(const char *buffer) override {
- ScopedMessagePtr<GoalType> new_msg = control_loop_->goal.MakeMessage();
- new_msg->Deserialize(buffer);
- new_msg.Send();
- }
-
- uint32_t UniqueID() override { return control_loop_->hash(); }
-
-
protected:
static void Quit(int /*signum*/) {
run_ = false;