The IrcBot class can connect to a channel on an IRC network. Users on the same network can send messages to the bot that are parsed by message handlers. The included handlers read digital/analog inputs and write digital outputs or echo messages back to the command sender/channel. Users can write their own message handlers inheriting from the MessageHandler class to perform different actions.
DigitalOutHandler Class Reference
DigitalOutHandler lets users control a DigitalOut using "WRITE <name> ON/OFF". More...
#include <IrcMessageHandlers.h>
Inherits MessageHandler.
Public Member Functions | |
DigitalOutHandler (char *name, PinName pin, bool verbose) | |
Create a DigitalOutHandler. | |
IrcMessage | handle (IrcMessage) |
Set output pin on or off, reply "SET <name> ON/OFF" if verbose. |
Detailed Description
DigitalOutHandler lets users control a DigitalOut using "WRITE <name> ON/OFF".
Definition at line 6 of file IrcMessageHandlers.h.
Constructor & Destructor Documentation
DigitalOutHandler | ( | char * | name, |
PinName | pin, | ||
bool | verbose | ||
) |
Create a DigitalOutHandler.
- Parameters:
-
name Name of output used in command on IRC pin Pin the output is connected to. verbose Whether or not a reply is sent to IRC confirming the output state
Definition at line 3 of file IrcMessageHandlers.cpp.
Member Function Documentation
IrcMessage handle | ( | IrcMessage | msg ) | [virtual] |
Set output pin on or off, reply "SET <name> ON/OFF" if verbose.
Reimplemented from MessageHandler.
Definition at line 10 of file IrcMessageHandlers.cpp.
Generated on Tue Jul 12 2022 20:41:27 by 1.7.2