Add Shutdown message, plumbing to send and handle.

This commit is contained in:
Jared Boone 2015-08-20 18:03:49 -07:00
parent 15791e345d
commit 690c3c98db
7 changed files with 58 additions and 11 deletions

View file

@ -43,7 +43,7 @@ public:
BasebandConfiguration = 5,
FSKConfiguration = 6,
FSKPacket = 7,
TestResults = 8,
Shutdown = 8,
MAX
};
@ -233,6 +233,14 @@ public:
FSKPacket packet;
};
class ShutdownMessage : public Message {
public:
constexpr ShutdownMessage(
) : Message { ID::Shutdown }
{
}
};
class MessageHandlerMap {
public:
using MessageHandler = std::function<void(const Message* const p)>;