pfodParser  5.0.1
The pfodParser library is handles commands sent from the Android pfodApp, pfodApp supports WiFi, BLE, Bluetooth and SMS connections
pfodParser Class Reference

#include <pfodParser.h>

Inherits Print.

Inherited by pfodSecurity.

Public Member Functions

 pfodParser ()
 
 pfodParser (const char *version)
 
void printDwgCmdReceived (Print *outPtr)
 
virtual size_t write (uint8_t c)
 
virtual size_t write (const uint8_t *buffer, size_t size)
 
virtual void flush ()
 
virtual int read ()
 
virtual int peek ()
 
virtual int available ()
 
virtual void connect (Stream *ioPtr)
 
virtual void closeConnection ()
 
virtual byte parse ()
 
virtual bool isRefresh ()
 
virtual const char * getVersionRequested ()
 
virtual const char * getVersion ()
 
virtual void setVersion (const char *version)
 
virtual void sendVersion ()
 
virtual void sendRefreshAndVersion (unsigned long refresh_mS)
 
virtual byte * getCmd ()
 
virtual byte * getFirstArg ()
 
virtual byte * getNextArg (byte *start)
 
virtual byte getArgsCount ()
 
virtual byte * parseLong (byte *idxPtr, long *result)
 
virtual bool cmdEquals (const char *cmdStr)
 
virtual bool cmdEquals (const char cmdChar)
 
virtual bool cmdEquals (pfodAutoCmd &a_Cmd)
 
void menu ()
 
void menuUpdate ()
 
void endOfMsg ()
 
void label (pfodAutoCmd c)
 
void onOffDisplay (pfodAutoCmd c)
 
void button (pfodAutoCmd c)
 
void slider (pfodAutoCmd c)
 
virtual byte getParserState ()
 pfodWaitingForStart if outside msg pfodMsgStarted if just seen opening { pfodInMsg in msg after { pfodMsgEnd if just seen closing } More...
 
virtual void setCmd (byte cmd)
 
virtual void setDebugStream (Print *debugOut)
 
virtual void setDebugOut (Print *out)
 
virtual void setDebug (Print *out)
 
virtual void setIdleTimeout (unsigned long timeout_in_secs)
 
virtual Stream * getPfodAppStream ()
 
void init ()
 
virtual byte parse (byte in)
 
virtual void ignoreSeqNum ()
 
virtual byte parseDwgCmd ()
 
virtual const byte * getDwgCmd ()
 
virtual bool dwgCmdEquals (const char *dwgCmdStr)
 
virtual bool dwgCmdEquals (pfodAutoCmd &a_Cmd)
 
virtual bool dwgCmdEquals (const char dwgCmd)
 
virtual bool isTouch ()
 
virtual bool isClick ()
 
virtual bool isDown ()
 
virtual bool isDrag ()
 
virtual bool isUp ()
 
virtual bool isPress ()
 
virtual const byte * getEditedText ()
 
virtual uint8_t getTouchType ()
 
virtual int getTouchedCol ()
 
virtual int getTouchedRow ()
 
virtual int getTouchedY ()
 
virtual int getTouchedX ()
 

Static Public Member Functions

static void addDwg (pfodDrawing *dwgPtr)
 
static pfodLinkedList< pfodDrawing > & listOfDrawings ()
 

Static Public Attributes

static const byte pfodMaxMsgLen = 0xff
 
static const byte pfodWaitingForStart = 0xff
 
static const byte pfodMsgStarted = '{'
 
static const byte pfodRefresh = ':'
 
static const byte pfodInMsg = 0
 
static const byte pfodMsgEnd = '}'
 
static const int TOUCH = 0
 
static const int DOWN = 1
 
static const int DRAG = 2
 
static const int UP = 4
 
static const int CLICK = 8
 
static const int PRESS = 16
 
static const int DOWN_UP = 256
 
static const int DOWN_DRAG_UP = 256
 
static const int TOUCH_DISABLED = 512
 

Detailed Description

Definition at line 48 of file pfodParser.h.

Constructor & Destructor Documentation

◆ pfodParser() [1/2]

pfodParser::pfodParser ( )

◆ pfodParser() [2/2]

pfodParser::pfodParser ( const char *  version)

Member Function Documentation

◆ addDwg()

static void pfodParser::addDwg ( pfodDrawing dwgPtr)
static

◆ available()

virtual int pfodParser::available ( )
virtual

Reimplemented in pfodSecurity.

◆ button()

void pfodParser::button ( pfodAutoCmd  c)

◆ closeConnection()

virtual void pfodParser::closeConnection ( )
virtual

Reimplemented in pfodSecurity.

◆ cmdEquals() [1/3]

virtual bool pfodParser::cmdEquals ( const char *  cmdStr)
virtual

◆ cmdEquals() [2/3]

virtual bool pfodParser::cmdEquals ( const char  cmdChar)
virtual

◆ cmdEquals() [3/3]

virtual bool pfodParser::cmdEquals ( pfodAutoCmd &  a_Cmd)
virtual

◆ connect()

virtual void pfodParser::connect ( Stream *  ioPtr)
virtual

Reimplemented in pfodSecurity.

◆ dwgCmdEquals() [1/3]

virtual bool pfodParser::dwgCmdEquals ( const char *  dwgCmdStr)
virtual

◆ dwgCmdEquals() [2/3]

virtual bool pfodParser::dwgCmdEquals ( const char  dwgCmd)
virtual

◆ dwgCmdEquals() [3/3]

virtual bool pfodParser::dwgCmdEquals ( pfodAutoCmd &  a_Cmd)
virtual

◆ endOfMsg()

void pfodParser::endOfMsg ( )

◆ flush()

virtual void pfodParser::flush ( )
virtual

Reimplemented in pfodSecurity.

◆ getArgsCount()

virtual byte pfodParser::getArgsCount ( )
virtual

◆ getCmd()

virtual byte* pfodParser::getCmd ( )
virtual

◆ getDwgCmd()

virtual const byte* pfodParser::getDwgCmd ( )
virtual

◆ getEditedText()

virtual const byte* pfodParser::getEditedText ( )
virtual

◆ getFirstArg()

virtual byte* pfodParser::getFirstArg ( )
virtual

◆ getNextArg()

virtual byte* pfodParser::getNextArg ( byte *  start)
virtual

◆ getParserState()

virtual byte pfodParser::getParserState ( )
virtual

pfodWaitingForStart if outside msg pfodMsgStarted if just seen opening { pfodInMsg in msg after { pfodMsgEnd if just seen closing }

◆ getPfodAppStream()

virtual Stream* pfodParser::getPfodAppStream ( )
virtual

Reimplemented in pfodSecurity.

◆ getTouchedCol()

virtual int pfodParser::getTouchedCol ( )
virtual

◆ getTouchedRow()

virtual int pfodParser::getTouchedRow ( )
virtual

◆ getTouchedX()

virtual int pfodParser::getTouchedX ( )
virtual

◆ getTouchedY()

virtual int pfodParser::getTouchedY ( )
virtual

◆ getTouchType()

virtual uint8_t pfodParser::getTouchType ( )
virtual

◆ getVersion()

virtual const char* pfodParser::getVersion ( )
virtual

◆ getVersionRequested()

virtual const char* pfodParser::getVersionRequested ( )
virtual

◆ ignoreSeqNum()

virtual void pfodParser::ignoreSeqNum ( )
virtual

◆ init()

void pfodParser::init ( )

◆ isClick()

virtual bool pfodParser::isClick ( )
virtual

◆ isDown()

virtual bool pfodParser::isDown ( )
virtual

◆ isDrag()

virtual bool pfodParser::isDrag ( )
virtual

◆ isPress()

virtual bool pfodParser::isPress ( )
virtual

◆ isRefresh()

virtual bool pfodParser::isRefresh ( )
virtual

◆ isTouch()

virtual bool pfodParser::isTouch ( )
virtual

◆ isUp()

virtual bool pfodParser::isUp ( )
virtual

◆ label()

void pfodParser::label ( pfodAutoCmd  c)

◆ listOfDrawings()

static pfodLinkedList<pfodDrawing>& pfodParser::listOfDrawings ( )
static

◆ menu()

void pfodParser::menu ( )

◆ menuUpdate()

void pfodParser::menuUpdate ( )

◆ onOffDisplay()

void pfodParser::onOffDisplay ( pfodAutoCmd  c)

◆ parse() [1/2]

virtual byte pfodParser::parse ( )
virtual

Reimplemented in pfodSecurity.

◆ parse() [2/2]

virtual byte pfodParser::parse ( byte  in)
virtual

◆ parseDwgCmd()

virtual byte pfodParser::parseDwgCmd ( )
virtual

◆ parseLong()

virtual byte* pfodParser::parseLong ( byte *  idxPtr,
long *  result 
)
virtual

◆ peek()

virtual int pfodParser::peek ( )
virtual

Reimplemented in pfodSecurity.

◆ printDwgCmdReceived()

void pfodParser::printDwgCmdReceived ( Print *  outPtr)

◆ read()

virtual int pfodParser::read ( )
virtual

Reimplemented in pfodSecurity.

◆ sendRefreshAndVersion()

virtual void pfodParser::sendRefreshAndVersion ( unsigned long  refresh_mS)
virtual

◆ sendVersion()

virtual void pfodParser::sendVersion ( )
virtual

◆ setCmd()

virtual void pfodParser::setCmd ( byte  cmd)
virtual

◆ setDebug()

virtual void pfodParser::setDebug ( Print *  out)
inlinevirtual

Definition at line 111 of file pfodParser.h.

◆ setDebugOut()

virtual void pfodParser::setDebugOut ( Print *  out)
inlinevirtual

Definition at line 110 of file pfodParser.h.

◆ setDebugStream()

virtual void pfodParser::setDebugStream ( Print *  debugOut)
virtual

Reimplemented in pfodSecurity.

◆ setIdleTimeout()

virtual void pfodParser::setIdleTimeout ( unsigned long  timeout_in_secs)
virtual

Reimplemented in pfodSecurity.

◆ setVersion()

virtual void pfodParser::setVersion ( const char *  version)
virtual

◆ slider()

void pfodParser::slider ( pfodAutoCmd  c)

◆ write() [1/2]

virtual size_t pfodParser::write ( const uint8_t *  buffer,
size_t  size 
)
virtual

Reimplemented in pfodSecurity.

◆ write() [2/2]

virtual size_t pfodParser::write ( uint8_t  c)
virtual

Reimplemented in pfodSecurity.

Member Data Documentation

◆ CLICK

const int pfodParser::CLICK = 8
static

Definition at line 150 of file pfodParser.h.

◆ DOWN

const int pfodParser::DOWN = 1
static

Definition at line 147 of file pfodParser.h.

◆ DOWN_DRAG_UP

const int pfodParser::DOWN_DRAG_UP = 256
static

Definition at line 155 of file pfodParser.h.

◆ DOWN_UP

const int pfodParser::DOWN_UP = 256
static

Definition at line 154 of file pfodParser.h.

◆ DRAG

const int pfodParser::DRAG = 2
static

Definition at line 148 of file pfodParser.h.

◆ pfodInMsg

const byte pfodParser::pfodInMsg = 0
static

Definition at line 107 of file pfodParser.h.

◆ pfodMaxMsgLen

const byte pfodParser::pfodMaxMsgLen = 0xff
static

Definition at line 65 of file pfodParser.h.

◆ pfodMsgEnd

const byte pfodParser::pfodMsgEnd = '}'
static

Definition at line 108 of file pfodParser.h.

◆ pfodMsgStarted

const byte pfodParser::pfodMsgStarted = '{'
static

Definition at line 105 of file pfodParser.h.

◆ pfodRefresh

const byte pfodParser::pfodRefresh = ':'
static

Definition at line 106 of file pfodParser.h.

◆ pfodWaitingForStart

const byte pfodParser::pfodWaitingForStart = 0xff
static

Definition at line 104 of file pfodParser.h.

◆ PRESS

const int pfodParser::PRESS = 16
static

Definition at line 151 of file pfodParser.h.

◆ TOUCH

const int pfodParser::TOUCH = 0
static

Definition at line 146 of file pfodParser.h.

◆ TOUCH_DISABLED

const int pfodParser::TOUCH_DISABLED = 512
static

Definition at line 156 of file pfodParser.h.

◆ UP

const int pfodParser::UP = 4
static

Definition at line 149 of file pfodParser.h.