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.

Embed: (wiki syntax)

« Back to documentation index

DigitalOutHandler Class Reference

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:
nameName of output used in command on IRC
pinPin the output is connected to.
verboseWhether 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.