Droni e Droidi / TerminalPlusV2

Fork of TerminalPlus by Max Scordamaglia

Embed: (wiki syntax)

« Back to documentation index

Terminal Class Reference

Terminal Class Reference

Control and display on an ANSI/VT100 Terminal. More...

#include <Terminal.h>

Public Member Functions

 Terminal (PinName tx, PinName rx)
 Create the Terminal interface.
int putc (int c)
 Write a character to the terminal.
int printf (const char *format,...)
 Write a formated string to the terminal.
void locate (int column, int row)
 Locate to a screen column and row.
void cls ()
 Clear the screen and locate to 0,0.
void reset ()
 Reset Screen.
void eraseline ()
 Erase line.
void erasesquare (int x1, int y1, int x2, int y2)
 Erase square.
void foreground (int colour)
 Set the foreground colour 0xffffff.
void forgcol (int color)
 Set the foreground standard (0-7) color.
void background (int colour)
 Set the background colour 0xffffff.
void bckgcol (int color)
 Set the background standard (0-7) color.
void formatPrintf (char sstr[], int xx, int yy, int padb=0, bool boldf=0)
 printf formattato con dimensione e posizione
void frame (int x, int y, int w, int h, int boxtype=1)
 Draw box.
void readypos ()
 Default input pos.

Detailed Description

Control and display on an ANSI/VT100 Terminal.

This allows you to control an ANSI serial terminal

Definition at line 35 of file Terminal.h.


Constructor & Destructor Documentation

Terminal ( PinName  tx,
PinName  rx 
)

Create the Terminal interface.

mbed TerminalPlus Library, for ANSI/VT200 Terminals and ecape codes Copyright (c) 2015, Max Scordamaglia , https//developer.mbed.org/users/MaxScorda/ fork from Terminal Library Copyright (c) 2007-2010, sford, http://mbed.org

Parameters:
txSerial transmit
rxSerial recieve

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Definition at line 33 of file Terminal.cpp.


Member Function Documentation

void background ( int  colour )

Set the background colour 0xffffff.

Definition at line 103 of file Terminal.cpp.

void bckgcol ( int  color )

Set the background standard (0-7) color.

Definition at line 83 of file Terminal.cpp.

void cls (  )

Clear the screen and locate to 0,0.

Definition at line 35 of file Terminal.cpp.

void eraseline (  )

Erase line.

Definition at line 117 of file Terminal.cpp.

void erasesquare ( int  x1,
int  y1,
int  x2,
int  y2 
)

Erase square.

Definition at line 123 of file Terminal.cpp.

void foreground ( int  colour )

Set the foreground colour 0xffffff.

Definition at line 56 of file Terminal.cpp.

void forgcol ( int  color )

Set the foreground standard (0-7) color.

Definition at line 64 of file Terminal.cpp.

void formatPrintf ( char  sstr[],
int  xx,
int  yy,
int  padb = 0,
bool  boldf = 0 
)

printf formattato con dimensione e posizione

Definition at line 162 of file Terminal.cpp.

void frame ( int  x,
int  y,
int  w,
int  h,
int  boxtype = 1 
)

Draw box.

Definition at line 186 of file Terminal.cpp.

void locate ( int  column,
int  row 
)

Locate to a screen column and row.

Parameters:
columnThe horizontal position from the left, indexed from 0
rowThe vertical position from the top, indexed from 0

Definition at line 40 of file Terminal.cpp.

int printf ( const char *  format,
  ... 
)

Write a formated string to the terminal.

Parameters:
formatA printf-style format string, followed by the variables to use in formating the string.
int putc ( int  c )

Write a character to the terminal.

Parameters:
cThe character to write to the display
void readypos (  )

Default input pos.

Definition at line 237 of file Terminal.cpp.

void reset (  )

Reset Screen.

Definition at line 111 of file Terminal.cpp.