GlobalCovfefe
Public Member Functions | List of all members
GlobalCovfefeLearner Class Reference

This class is derived from GlobalCovfefe, and adds the get_IRL command, invoking a learner. More...

#include <GlobalCovfefeLearner.h>

Inheritance diagram for GlobalCovfefeLearner:
Inheritance graph
[legend]
Collaboration diagram for GlobalCovfefeLearner:
Collaboration graph
[legend]

Public Member Functions

 GlobalCovfefeLearner (IrSender *irSender, IrReader *irReader, int commandLed=invalidPin, int learnLed=invalidPin, int transmitLed=invalidPin)
 Main constructor. More...
 
 GlobalCovfefeLearner (const GlobalCovfefeLearner &orig)
 Copy constructor. More...
 
virtual ~GlobalCovfefeLearner ()
 
virtual void processCommand (Stream &stream, char *buf) const
 Processes one command from the supplied Stream argument. More...
 
virtual void blink (unsigned int count=blinkCount, milliseconds_t delay=blinkDelay) const
 Implements the blink command (found in GC-100) More...
 
void getIRL (Stream &stream) const
 Invoke the configured learner, and deliver the result in sendir format. More...
 
- Public Member Functions inherited from GlobalCovfefe
 GlobalCovfefe (IrSender *irSender, int commandLed=invalidPin, int transmitLed=invalidPin)
 Main constructor. More...
 
 GlobalCovfefe (const GlobalCovfefe &orig)
 Copy constructor. More...
 
virtual ~GlobalCovfefe ()
 
void readProcessCommand (Stream &stream) const
 Reads and processes one command from the supplied Stream argument. More...
 
void getdevices (Stream &stream) const
 Implements the getdevices command. More...
 
void getversion (Stream &stream) const
 Implements the getversion command. More...
 
void sendir (Stream &stream, char *buf) const
 Implements the sendir command. More...
 

Additional Inherited Members

- Static Public Attributes inherited from GlobalCovfefe
static const char * version = VERSION
 Version of the present program. More...
 
static const uint16_t tcpPort = 4998U
 The GlobalCache standard TCP command port. More...
 
static const char eolChar = '\r'
 GlobalCache uses CR as line terminator. More...
 
static const int invalidPin = -1
 
static const size_t bufSize = 300U
 Max length on input line. More...
 
static const unsigned int blinkCount = 3
 
static const milliseconds_t blinkDelay = 200
 
- Protected Member Functions inherited from GlobalCovfefe
void initLed (int pin) const
 
void turnOnLed (int pin) const
 
void turnOffLed (int pin) const
 
void turnOnOffLed (int pin, milliseconds_t delay) const
 Turns on the pin as the first argument, waits delay milli seconds, then turns off the pin. More...
 

Detailed Description

This class is derived from GlobalCovfefe, and adds the get_IRL command, invoking a learner.

Definition at line 27 of file GlobalCovfefeLearner.h.

Constructor & Destructor Documentation

◆ GlobalCovfefeLearner() [1/2]

GlobalCovfefeLearner::GlobalCovfefeLearner ( IrSender *  irSender,
IrReader *  irReader,
int  commandLed = invalidPin,
int  learnLed = invalidPin,
int  transmitLed = invalidPin 
)

Main constructor.

Parameters
irSenderPointer to an IrSender from Infrared4Arduino.
irReaderPointer to an IrReader from Infrared4Arduino.
commandLedPin number of command LED, if present.
learnLedPin number of learn LED, if present.
transmitLedPin number of transmit LED, if present.

Definition at line 20 of file GlobalCovfefeLearner.cpp.

◆ GlobalCovfefeLearner() [2/2]

GlobalCovfefeLearner::GlobalCovfefeLearner ( const GlobalCovfefeLearner orig)

Copy constructor.

Definition at line 27 of file GlobalCovfefeLearner.cpp.

◆ ~GlobalCovfefeLearner()

GlobalCovfefeLearner::~GlobalCovfefeLearner ( )
virtual

Definition at line 30 of file GlobalCovfefeLearner.cpp.

Member Function Documentation

◆ blink()

void GlobalCovfefeLearner::blink ( unsigned int  count = blinkCount,
milliseconds_t  delay = blinkDelay 
) const
virtual

Implements the blink command (found in GC-100)

Parameters
countNumber of times to flash.
delayDelay in milli seconds

Reimplemented from GlobalCovfefe.

Definition at line 33 of file GlobalCovfefeLearner.cpp.

◆ getIRL()

void GlobalCovfefeLearner::getIRL ( Stream &  stream) const

Invoke the configured learner, and deliver the result in sendir format.

Parameters
streamwhere the output (in sendir format) is written.

Definition at line 47 of file GlobalCovfefeLearner.cpp.

◆ processCommand()

void GlobalCovfefeLearner::processCommand ( Stream &  stream,
char *  buf 
) const
virtual

Processes one command from the supplied Stream argument.

To be overridden in derived classes that are implementing more commands.

Parameters
streamwhere possible output is written.
bufCommand line, to be interpreted.

Reimplemented from GlobalCovfefe.

Definition at line 40 of file GlobalCovfefeLearner.cpp.


The documentation for this class was generated from the following files: