lcd Class Reference

lcd.H Interface to an LCD screen via serial port More...

#include <Devices/lcd.H>

Inheritance diagram for lcd:
Inheritance graph
[legend]
Collaboration diagram for lcd:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 lcd (OptionManager &mgr, const std::string &descrName="Alphanumeric LCD Display", const std::string &tagName="lcd")
 Default constructor. See ModelComponent.H.
 ~lcd ()
 Destructor.
bool printf (const int x, const int y, const char *fmt,...) __attribute__((format(__printf__
 print some text starting at given cursor position
bool bool writeString (const char *s)
 Takes a string and outputs to LCD.
bool clear ()
 Clears LCD screen.
bool scrollLeft (const int i)
 Scrolls display left by i positions.
bool scrollRight (const int i)
 Scrolls display right by i positions.
bool home ()
 Moves cursor to start of screen.
bool moveCursorLeft (const int i)
 Moves cursor left by i positions.
bool moveCursorRight (const int i)
 Moves cursor right by i positions.
bool blinkBlock ()
 Makes cursor a blinking block.
bool blinkUnderline ()
 Makes cursor a blinking underline.
bool invisibleCursor ()
 Makes cursor invisible (not recommended).
bool setCursorPosition (const int i)
 Sets cursor position to i.

Protected Attributes

nub::soft_ref< SerialitsPort
 our serial port
NModelParam< int > itsRows
 number of rows (lines of text)
NModelParam< int > itsCols
 number of columns

Detailed Description

lcd.H Interface to an LCD screen via serial port

LCD Class. Contains interfaces to display to a LCD connected via a serial port. If you need more than a serial port to connect to an LCD, that LCD must be very special. Note that the code is made for Backpack LCDs by SEETRON.

Definition at line 53 of file lcd.H.


Constructor & Destructor Documentation

lcd::lcd ( OptionManager mgr,
const std::string descrName = "Alphanumeric LCD Display",
const std::string tagName = "lcd" 
)

Default constructor. See ModelComponent.H.

Definition at line 59 of file lcd.C.

References ModelComponent::addSubComponent(), and itsPort.

lcd::~lcd (  ) 

Destructor.

Definition at line 74 of file lcd.C.


Member Function Documentation

bool lcd::blinkBlock (  ) 

Makes cursor a blinking block.

Definition at line 154 of file lcd.C.

bool lcd::blinkUnderline (  ) 

Makes cursor a blinking underline.

Definition at line 158 of file lcd.C.

bool lcd::clear (  ) 

Clears LCD screen.

Definition at line 110 of file lcd.C.

bool lcd::home (  ) 

Moves cursor to start of screen.

Definition at line 132 of file lcd.C.

bool lcd::invisibleCursor (  ) 

Makes cursor invisible (not recommended).

Definition at line 162 of file lcd.C.

bool lcd::moveCursorLeft ( const int  i  ) 

Moves cursor left by i positions.

Definition at line 136 of file lcd.C.

bool lcd::moveCursorRight ( const int  i  ) 

Moves cursor right by i positions.

Definition at line 145 of file lcd.C.

bool lcd::printf ( const int  x,
const int  y,
const char *  fmt,
  ... 
)

print some text starting at given cursor position

syntax is the same as printf(), plus the x,y coordinates. Returns true on success.

Definition at line 78 of file lcd.C.

References NModelParam< T >::getVal(), itsCols, itsRows, setCursorPosition(), and writeString().

bool lcd::scrollLeft ( const int  i  ) 

Scrolls display left by i positions.

Definition at line 114 of file lcd.C.

bool lcd::scrollRight ( const int  i  ) 

Scrolls display right by i positions.

Definition at line 123 of file lcd.C.

bool lcd::setCursorPosition ( const int  i  ) 

Sets cursor position to i.

Definition at line 166 of file lcd.C.

Referenced by printf().

bool lcd::writeString ( const char *  s  ) 

Takes a string and outputs to LCD.

Definition at line 106 of file lcd.C.

References itsPort.

Referenced by printf().


Member Data Documentation

NModelParam<int> lcd::itsCols [protected]

number of columns

Definition at line 114 of file lcd.H.

Referenced by printf().

our serial port

Definition at line 112 of file lcd.H.

Referenced by lcd(), and writeString().

NModelParam<int> lcd::itsRows [protected]

number of rows (lines of text)

Definition at line 113 of file lcd.H.

Referenced by printf().


The documentation for this class was generated from the following files:
Generated on Sun May 8 08:43:36 2011 for iLab Neuromorphic Vision Toolkit by  doxygen 1.6.3