Shellminator  V1.1.1
Simple Terminal
Loading...
Searching...
No Matches
shellminatorArduinoSerialChannel Class Reference

Shellminator channel class for Arduino Serial objects. More...

#include <Shellminator-IO.hpp>

Inheritance diagram for shellminatorArduinoSerialChannel:
[legend]
Collaboration diagram for shellminatorArduinoSerialChannel:
[legend]

Public Member Functions

void select (HardwareSerial *serialPort_p)
 Select Serial Port. More...
 
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 print (char c) override
 Print one character to the channel. More...
 
size_t print (uint8_t b)
 Print one byte to the channel. More...
 
size_t print (char *str) override
 Print c-string to the channel. More...
 
size_t print (const char *str) override
 Print c-string to the channel. More...
 
HardwareSerial * getSerialObject ()
 Get the address of the chosen Serial Port. More...
 
virtual int available ()
 Available bytes in the channel. More...
 
virtual int read ()
 Read one byte form the channel. More...
 
virtual int peek ()
 Peek the firtst byte from the channel. More...
 
virtual void flush ()
 Flush the channel. More...
 
virtual size_t write (uint8_t b)
 Write one byte to the channel. More...
 
virtual size_t print (char c)
 Print one character to the channel. More...
 
virtual size_t print (uint8_t b)
 Print one byte to the channel. More...
 
virtual size_t print (char *str)
 Print c-string to the channel. More...
 
virtual size_t print (const char *str)
 Print c-string to the channel. More...
 

Detailed Description

Shellminator channel class for Arduino Serial objects.

Definition at line 120 of file Shellminator-IO.hpp.

Member Function Documentation

◆ available()

int shellminatorArduinoSerialChannel::available ( )
overridevirtual

Available bytes in the channel.

Returns
The available bytes in the channel.

Reimplemented from shellminatorChannel.

Definition at line 46 of file Shellminator-IO.cpp.

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

◆ flush()

void shellminatorArduinoSerialChannel::flush ( )
overridevirtual

Flush the channel.

Reimplemented from shellminatorChannel.

Definition at line 67 of file Shellminator-IO.cpp.

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

◆ getSerialObject()

HardwareSerial * shellminatorArduinoSerialChannel::getSerialObject ( )

Get the address of the chosen Serial Port.

Returns
The address of the previously chosen Serial Port object.

Definition at line 110 of file Shellminator-IO.cpp.

◆ peek()

int shellminatorArduinoSerialChannel::peek ( )
overridevirtual

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.

Reimplemented from shellminatorChannel.

Definition at line 60 of file Shellminator-IO.cpp.

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

◆ print() [1/4]

size_t shellminatorArduinoSerialChannel::print ( char *  str)
overridevirtual

Print c-string to the channel.

Parameters
strThe string that has to be printed to the channel.
Returns
The number of bytes that has been sucessfully printed to the channel. Because it is the base class, it returns 0.

Reimplemented from shellminatorChannel.

Definition at line 96 of file Shellminator-IO.cpp.

Here is the call graph for this function:

◆ print() [2/4]

size_t shellminatorArduinoSerialChannel::print ( char  c)
overridevirtual

Print one character to the channel.

Parameters
cThe character that has to be printed to the channel.
Returns
The number of bytes that has been sucessfully printed to the channel. Because it is the base class, it returns 0.

Reimplemented from shellminatorChannel.

Definition at line 89 of file Shellminator-IO.cpp.

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

◆ print() [3/4]

size_t shellminatorArduinoSerialChannel::print ( const char *  str)
overridevirtual

Print c-string to the channel.

Parameters
strThe string that has to be printed to the channel.
Returns
The number of bytes that has been sucessfully printed to the channel. Because it is the base class, it returns 0.

Reimplemented from shellminatorChannel.

Definition at line 103 of file Shellminator-IO.cpp.

Here is the call graph for this function:

◆ print() [4/4]

size_t shellminatorArduinoSerialChannel::print ( uint8_t  b)
virtual

Print one byte to the channel.

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

Reimplemented from shellminatorChannel.

Definition at line 81 of file Shellminator-IO.cpp.

Here is the call graph for this function:

◆ read()

int shellminatorArduinoSerialChannel::read ( )
overridevirtual

Read one byte form the channel.

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

Reimplemented from shellminatorChannel.

Definition at line 53 of file Shellminator-IO.cpp.

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

◆ select()

void shellminatorArduinoSerialChannel::select ( HardwareSerial *  serialPort_p)

Select Serial Port.

Select a serial port to communicate with.

Note
This function has to be called before other memeber functions!

Definition at line 40 of file Shellminator-IO.cpp.

Here is the caller graph for this function:

◆ write()

size_t shellminatorArduinoSerialChannel::write ( uint8_t  b)
overridevirtual

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 sucessfully written to the channel. Because it is the base class, it returns 0.

Reimplemented from shellminatorChannel.

Definition at line 73 of file Shellminator-IO.cpp.

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