|
direcs
2012-09-30
|
Gives access to a SICK laser scanner S300 Standard (not Professional!). More...
#include <laserSickS300.h>

Signals | |
| void | message (QString text) |
Public Member Functions | |
| int | closeComPort () |
| float | getDistance (int angleIndex) |
| bool | openComPort () |
| int | readRequestTelegram () |
| int | readUnknownTelegram () |
| bool | receiveChar (unsigned char *character) |
| bool | sendChar (unsigned char character) |
| void | setDevicePort (QString serialPort) |
| int | setup () |
| SickS300 () | |
| ~SickS300 () | |
Private Attributes | |
| int | baudRate |
| float | distances [540] |
| if a measured laser distance is greater than this value in cm, it will be set to 0 cm! (This is due to a bug when reading angle 0) | |
| QString | laserSerialPort |
| unsigned char | scanData [LASERSAMPLES] |
| DirecsSerial * | serialPort |
Static Private Attributes | |
| static const float | LASERMAXLENGTH = 2000 |
| static const unsigned int | LASERSAMPLES = 1082 |
| the path to the serial device. e.g. /dev/ttyUSB0 | |
| static const bool | OFF = false |
| For laser is "ON". | |
| static const bool | ON = true |
Gives access to a SICK laser scanner S300 Standard (not Professional!).
Definition at line 38 of file laserSickS300.h.
| SickS300::SickS300 | ( | ) |
Constructor
Definition at line 24 of file laserSickS300.cpp.

| SickS300::~SickS300 | ( | ) |
Destructor
Definition at line 62 of file laserSickS300.cpp.

| int SickS300::closeComPort | ( | ) |
Closes the serial port
Definition at line 111 of file laserSickS300.cpp.


| float SickS300::getDistance | ( | int | angleIndex | ) |
Returns the measured distance of a specific laser angle index.
| angleIndex | is the number of the angle. Since we have a half degree resolution, an angeleIndex of 0 means 0.0 deg, 1 means 0.5, 2 means 1.0 degrees, and so on. |
Definition at line 673 of file laserSickS300.cpp.


|
signal |
Emits a info or error message to a slot. This slot can be used to display a text on a splash screen, log file, to print it to a console...
| text | is the message to be emitted |

| bool SickS300::openComPort | ( | ) |
Opens a serial port/device. On POSIX systems this looks like "/dev/tty4" or "/dev/ttyUSB0".
Definition at line 80 of file laserSickS300.cpp.


| int SickS300::readRequestTelegram | ( | ) |
Reads a telegram from the laser scanner in the request mode.
Definition at line 238 of file laserSickS300.cpp.


| int SickS300::readUnknownTelegram | ( | ) |
Reads a special unknown telegram from the laser scanner in the request mode. It reads block 0B, but I don't know whats stored there...
Definition at line 518 of file laserSickS300.cpp.

| bool SickS300::receiveChar | ( | unsigned char * | character | ) |
Receives a character from the serial port/device.
| character |
Definition at line 174 of file laserSickS300.cpp.


| bool SickS300::sendChar | ( | unsigned char | character | ) |
Sends a character to the serial port/device.
| character |
Definition at line 158 of file laserSickS300.cpp.


| void SickS300::setDevicePort | ( | QString | serialPort | ) |
Sets the serial port. Has to be set before using
Definition at line 74 of file laserSickS300.cpp.

| int SickS300::setup | ( | ) |
Set up the device.
Definition at line 189 of file laserSickS300.cpp.


|
private |
Definition at line 121 of file laserSickS300.h.
|
private |
if a measured laser distance is greater than this value in cm, it will be set to 0 cm! (This is due to a bug when reading angle 0)
Definition at line 129 of file laserSickS300.h.
|
staticprivate |
Definition at line 127 of file laserSickS300.h.
|
staticprivate |
the path to the serial device. e.g. /dev/ttyUSB0
Definition at line 124 of file laserSickS300.h.
|
private |
Definition at line 122 of file laserSickS300.h.
|
staticprivate |
For laser is "ON".
Definition at line 132 of file laserSickS300.h.
|
staticprivate |
Definition at line 131 of file laserSickS300.h.
|
private |
Definition at line 125 of file laserSickS300.h.
|
private |
Definition at line 120 of file laserSickS300.h.