Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of IrcBot by
Diff: IrcMessageHandlers.h
- Revision:
- 1:cf586c9bbb52
- Child:
- 2:e4c74eb20586
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/IrcMessageHandlers.h Sat Aug 02 12:17:28 2014 +0000
@@ -0,0 +1,42 @@
+#ifndef __mbed_irc_handlers_h__
+#define __mbed_irc_handlers_h__
+#include "IrcBot.h"
+
+class DigitalOutHandler : private MessageHandler {
+ public:
+ DigitalOutHandler(char *, PinName, bool);
+ IrcMessage handle(IrcMessage);
+ private:
+ DigitalOut pin;
+ char name[32];
+ bool verbose;
+};
+
+class DigitalInHandler : private MessageHandler {
+ public:
+ DigitalInHandler(char *, PinName);
+ IrcMessage handle(IrcMessage);
+ private:
+ DigitalIn pin;
+ char name[32];
+};
+
+class AnalogInHandler : private MessageHandler {
+ public:
+ AnalogInHandler(char *, PinName);
+ void scale(float, char *);
+ IrcMessage handle(IrcMessage);
+ private:
+ AnalogIn pin;
+ char name[32];
+ char unit[32];
+ float scaleval;
+};
+
+class EchoHandler : private MessageHandler {
+ public:
+ EchoHandler(){};
+ IrcMessage handle(IrcMessage msg);
+};
+
+#endif
\ No newline at end of file
