Shellminator  V1.2.0
Simple Terminal
Loading...
Searching...
No Matches
shellminatorDefaultChannel Class Reference

Shellminator channel class. More...

#include <Shellminator-IO.hpp>

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

Public Member Functions

int available ()
 Available bytes in the channel. More...
 
int read ()
 Read one byte form the channel. More...
 
int peek ()
 Peek the firsts byte from the channel. More...
 
void flush ()
 Flush the channel. More...
 
size_t write (uint8_t b)
 Write one byte to the channel. More...
 
size_t print (char c)
 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)
 Print c-string to the channel. More...
 
size_t print (const char *str)
 Print c-string to the channel. More...
 

Detailed Description

Shellminator channel class.

Shellminator uses channels to communicate with external peripherals like Serial port or WiFi Client. To make it easy to change the communication source, virtual functions are used. This is the base class for these virtual functions, and they don't do anything usefully. To make them work, every function in this class has to be override to every peripheral, where it has to be used.

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

Member Function Documentation

◆ available()

int shellminatorDefaultChannel::available ( )
inline

Available bytes in the channel.

Returns
The available bytes in the channel. Because it is the base class, it returns 0.

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

◆ flush()

void shellminatorDefaultChannel::flush ( )
inline

Flush the channel.

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

◆ peek()

int shellminatorDefaultChannel::peek ( )
inline

Peek the firsts byte from the channel.

Returns
Read and return one byte form the channel. The byte will NOT be removed from the channel. Because it is the base class, it returns 0.

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

◆ print() [1/4]

size_t shellminatorDefaultChannel::print ( char *  str)
inline

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

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

◆ print() [2/4]

size_t shellminatorDefaultChannel::print ( char  c)
inline

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

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

◆ print() [3/4]

size_t shellminatorDefaultChannel::print ( const char *  str)
inline

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

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

◆ print() [4/4]

size_t shellminatorDefaultChannel::print ( uint8_t  b)
inline

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

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

◆ read()

int shellminatorDefaultChannel::read ( )
inline

Read one byte form the channel.

Returns
Read and return one byte form the channel. The byte will be removed from the channel. Because it is the base class, it returns -1.

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

◆ write()

size_t shellminatorDefaultChannel::write ( uint8_t  b)
inline

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 99 of file Shellminator-IO.hpp.