RSeries astromech firmware
CommandEvent Class Referenceabstract

#include <core/CommandEvent.h>

Detailed Description

Base class for all command enabled devices. CommandEvent::handleCommand() is called for each device every time CommandEvent::process() is called.

+ Inheritance diagram for CommandEvent:

Public Member Functions

 CommandEvent ()
 Default Constructor. More...
 
virtual void handleCommand (const char *cmd)=0
 Subclasses should implement this function to process commands specific to their device. More...
 
virtual void handleCommand (String cmd)
 Subclasses should implement this function to process commands specific to their device. More...
 

Static Public Member Functions

static void process (char *cmd)
 Calls handleCommand() for each created CommandEvent subclass. More...
 
static void process (const char *cmd)
 Calls handleCommand() for each created CommandEvent subclass. More...
 
static void process (PROGMEMString pcmd)
 Calls handleCommand() for each created CommandEvent subclass. More...
 

Constructor & Destructor Documentation

◆ CommandEvent()

CommandEvent::CommandEvent ( )
inline

Default Constructor.

Registers the subclass to handle command strings.

Member Function Documentation

◆ handleCommand() [1/2]

virtual void CommandEvent::handleCommand ( const char *  cmd)
pure virtual

◆ handleCommand() [2/2]

virtual void CommandEvent::handleCommand ( String  cmd)
inlinevirtual

Subclasses should implement this function to process commands specific to their device.

By convention the first two characters are the device type identifier. 'H' 'P' for holoprojector, etc.

◆ process() [1/3]

static void CommandEvent::process ( char *  cmd)
inlinestatic

Calls handleCommand() for each created CommandEvent subclass.

◆ process() [2/3]

static void CommandEvent::process ( const char *  cmd)
inlinestatic

Calls handleCommand() for each created CommandEvent subclass.

◆ process() [3/3]

static void CommandEvent::process ( PROGMEMString  pcmd)
inlinestatic

Calls handleCommand() for each created CommandEvent subclass.


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