BarcodeReader Class Reference

Barcode reader handler. More...

#include <BarcodeReader.h>

Inheritance diagram for BarcodeReader:
BasicReader SerialPort Thread SerialPortInterface

List of all members.

Public Member Functions

 BarcodeReader ()
 Class constructor.
virtual ~BarcodeReader ()
 Class destructor.
virtual bool initialize ()
 Reader initialization routine.
virtual void shutdown ()
 Reader shutdown routine.
virtual void initRead ()
 Prepare for reading.
virtual void startRead ()
 Start reading.
virtual void stopRead ()
 Stop reading.

Protected Member Functions

virtual void run ()
 Reads the actual data.
virtual void onTimer ()
 Timer event handler.
void submit (const char *buf)
 Submit the data to event system.

Detailed Description

Barcode reader handler.

Implements methods to handle the barcode reader. The reader will be be initialized by this class, and the appropriate functions can be called to trigger the laser beam and submit the retrieved data.


Constructor & Destructor Documentation

BarcodeReader::BarcodeReader (  ) 

Class constructor.

Initializes the barcode reader object.

BarcodeReader::~BarcodeReader (  )  [virtual]

Class destructor.

Terminates the barcode reader object.


Member Function Documentation

bool BarcodeReader::initialize (  )  [virtual]

Reader initialization routine.

Initializes the barcode reader. Powers up Opticon module up and sends initialization commands via serial port.

Returns:
Returns true if initialization was successful.

Reimplemented from BasicReader.

void BarcodeReader::initRead (  )  [virtual]

Prepare for reading.

Prepares the Opticon module for reading, enables aiming mode. When aiming, the laser beam is enabled and focused to a single point.

Reimplemented from BasicReader.

void BarcodeReader::onTimer (  )  [protected, virtual]

Timer event handler.

Stops reading after a timeout

void BarcodeReader::run (  )  [protected, virtual]

Reads the actual data.

Waits until the data becomes available from the device. Then reads data from the the bar code reader and stores it in the internal buffer.

Reimplemented from Thread.

void BarcodeReader::shutdown (  )  [virtual]

Reader shutdown routine.

Deinitializes barcode reader. Powers down Opticon reader.

Reimplemented from BasicReader.

void BarcodeReader::startRead (  )  [virtual]

Start reading.

Starts reading a barcode by triggering the Opticon module. When reading, the laser beam is enabled and scans a line horizontally.

Reimplemented from BasicReader.

void BarcodeReader::stopRead (  )  [virtual]

Stop reading.

Stops barcode reading. Detriggers the Opticon module and disables laser beam.

Reimplemented from BasicReader.

void BarcodeReader::submit ( const char *  buf  )  [protected]

Submit the data to event system.

Broadcasts the data read into the event system. The EV_READER system event will be triggered.

Parameters:
buf Pointer to the buffer that holds the data read

The documentation for this class was generated from the following files:
Generated on Wed Oct 20 11:13:43 2010 for libspatha by  doxygen 1.6.3