Commander-API V3.0.0
Lightweight Command Parser
Loading...
Searching...
No Matches
CommandCaller Class Reference

#include <Commander-Caller-Interface.hpp>

Inheritance diagram for CommandCaller:
Collaboration diagram for CommandCaller:

Public Member Functions

 CommandCaller ()
 
int available () override
 Available bytes in the channel. More...
 
int read () override
 Read one byte form the channel. More...
 
int peek () override
 Peek the firtst byte from the channel. More...
 
void flush () override
 Flush the channel. More...
 
size_t write (uint8_t b) override
 Write one byte to the channel. More...
 
size_t write (const uint8_t *buffer, size_t size) override
 
void setChannel (Stream *channel_p)
 
Stream * getChannel ()
 
void clearChannel ()
 
virtual void beep ()
 
virtual void setBannerText (const char *text_p)
 
virtual void setPathText (const char *text_p)
 
virtual void clear ()
 

Private Attributes

Stream * channel = NULL
 

Detailed Description

Definition at line 39 of file Commander-Caller-Interface.hpp.

Constructor & Destructor Documentation

◆ CommandCaller()

CommandCaller::CommandCaller ( )

Definition at line 3 of file Commander-Caller-Interface.cpp.

Member Function Documentation

◆ available()

int CommandCaller::available ( )
override

Available bytes in the channel.

Returns
The available bytes in the channel.

Definition at line 21 of file Commander-Caller-Interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ beep()

virtual void CommandCaller::beep ( )
inlinevirtual

Definition at line 74 of file Commander-Caller-Interface.hpp.

◆ clear()

virtual void CommandCaller::clear ( )
inlinevirtual

Definition at line 77 of file Commander-Caller-Interface.hpp.

◆ clearChannel()

void CommandCaller::clearChannel ( )

Definition at line 15 of file Commander-Caller-Interface.cpp.

◆ flush()

void CommandCaller::flush ( )
override

Flush the channel.

Definition at line 42 of file Commander-Caller-Interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getChannel()

Stream * CommandCaller::getChannel ( )

Definition at line 11 of file Commander-Caller-Interface.cpp.

◆ peek()

int CommandCaller::peek ( )
override

Peek the firtst byte from the channel.

Returns
Read and return one byte form the channel. The byte will NOT be removed from the channel.

Definition at line 51 of file Commander-Caller-Interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ read()

int CommandCaller::read ( )
override

Read one byte form the channel.

Returns
Read and return one byte form the channel. The byte will be removed from the channel.

Definition at line 31 of file Commander-Caller-Interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setBannerText()

virtual void CommandCaller::setBannerText ( const char *  text_p)
inlinevirtual

Definition at line 75 of file Commander-Caller-Interface.hpp.

◆ setChannel()

void CommandCaller::setChannel ( Stream *  channel_p)

Definition at line 7 of file Commander-Caller-Interface.cpp.

◆ setPathText()

virtual void CommandCaller::setPathText ( const char *  text_p)
inlinevirtual

Definition at line 76 of file Commander-Caller-Interface.hpp.

◆ write() [1/2]

size_t CommandCaller::write ( const uint8_t *  buffer,
size_t  size 
)
override

Definition at line 67 of file Commander-Caller-Interface.cpp.

Here is the call graph for this function:

◆ write() [2/2]

size_t CommandCaller::write ( uint8_t  b)
override

Write one byte to the channel.

Parameters
bThe value that has to be written to the channel.
Returns
The number of bytes that has been successfully written to the channel. Because it is the base class, it returns 0.

Definition at line 60 of file Commander-Caller-Interface.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ channel

Stream* CommandCaller::channel = NULL
private

Definition at line 80 of file Commander-Caller-Interface.hpp.