#include <c++/drivers/base/src/SickLIDAR.hh>
Inheritance diagram for SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >:
Public Member Functions | |
SickLIDAR () | |
Initializes the buffer monitor. | |
bool | IsInitialized () |
virtual | ~SickLIDAR () |
Destructor tears down buffer monitor. | |
Protected Member Functions | |
virtual void | _setupConnection ()=0 |
virtual void | _teardownConnection ()=0 |
void | _startListening () throw ( SickThreadException ) |
Activates the buffer monitor for the driver. | |
void | _stopListening () throw ( SickThreadException ) |
Activates the buffer monitor for the driver. | |
bool | _monitorRunning () const |
void | _setBlockingIO () const throw ( SickIOException ) |
A simple method for setting blocking I/O. | |
void | _setNonBlockingIO () const throw ( SickIOException ) |
A simple method for setting non-blocking I/O. | |
void | _sendMessage (const SICK_MSG_CLASS &sick_message, const unsigned int byte_interval) const throw ( SickIOException ) |
Sends a message to the Sick device. | |
void | _recvMessage (SICK_MSG_CLASS &sick_message, const unsigned int timeout_value) const throw ( SickTimeoutException ) |
Attempt to acquire the latest available message from the device. | |
void | _recvMessage (SICK_MSG_CLASS &sick_message, const uint8_t *const byte_sequence, const unsigned int byte_sequence_length, const unsigned int timeout_value) const throw ( SickTimeoutException ) |
Attempt to acquire a message having a payload beginning w/ the given byte sequence. | |
double | _computeElapsedTime (const struct timeval &beg_time, const struct timeval &end_time) const |
virtual void | _sendMessageAndGetReply (const SICK_MSG_CLASS &send_message, SICK_MSG_CLASS &recv_message, const uint8_t *const byte_sequence, const unsigned int byte_sequence_length, const unsigned int byte_interval, const unsigned int timeout_value, const unsigned int num_tries) throw ( SickTimeoutException, SickIOException) |
Protected Attributes | |
int | _sick_fd |
bool | _sick_initialized |
SICK_MONITOR_CLASS * | _sick_buffer_monitor |
bool | _sick_monitor_running |
SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::SickLIDAR | ( | ) |
Initializes the buffer monitor.
The primary constructor
SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::~SickLIDAR | ( | ) | [virtual] |
Destructor tears down buffer monitor.
A virtual destructor
bool SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::IsInitialized | ( | ) | [inline] |
Indicates whether device is initialized
virtual void SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_setupConnection | ( | ) | [protected, pure virtual] |
A method for setting up a general connection
Implemented in SickToolbox::SickLMS.
virtual void SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_teardownConnection | ( | ) | [protected, pure virtual] |
A method for tearing down a connection to the Sick
Implemented in SickToolbox::SickLMS.
void SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_startListening | ( | ) | throw ( SickThreadException ) [protected] |
Activates the buffer monitor for the driver.
Starts the driver listening for messages
void SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_stopListening | ( | ) | throw ( SickThreadException ) [protected] |
Activates the buffer monitor for the driver.
Stops the driver from listening
bool SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_monitorRunning | ( | ) | const [inline, protected] |
Indicates whether there is a monitor currently running
void SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_setBlockingIO | ( | ) | const throw ( SickIOException ) [protected] |
A simple method for setting blocking I/O.
Make the associated file descriptor non blocking
void SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_setNonBlockingIO | ( | ) | const throw ( SickIOException ) [protected] |
A simple method for setting non-blocking I/O.
Make the associated file descriptor non blocking
void SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_sendMessage | ( | const SICK_MSG_CLASS & | sick_message, | |
const unsigned int | byte_interval | |||
) | const throw ( SickIOException ) [protected] |
Sends a message to the Sick device.
Send a message to the Sick LD (allows specifying min time between transmitted bytes)
void SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_recvMessage | ( | SICK_MSG_CLASS & | sick_message, | |
const unsigned int | timeout_value | |||
) | const throw ( SickTimeoutException ) [protected] |
Attempt to acquire the latest available message from the device.
Acquire the next message from the message container
void SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_recvMessage | ( | SICK_MSG_CLASS & | sick_message, | |
const uint8_t *const | byte_sequence, | |||
const unsigned int | byte_sequence_length, | |||
const unsigned int | timeout_value | |||
) | const throw ( SickTimeoutException ) [protected] |
Attempt to acquire a message having a payload beginning w/ the given byte sequence.
Search the stream for a payload with a particular "header" byte string
double SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_computeElapsedTime | ( | const struct timeval & | beg_time, | |
const struct timeval & | end_time | |||
) | const [inline, protected] |
An inline function for computing elapsed time
void SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_sendMessageAndGetReply | ( | const SICK_MSG_CLASS & | send_message, | |
SICK_MSG_CLASS & | recv_message, | |||
const uint8_t *const | byte_sequence, | |||
const unsigned int | byte_sequence_length, | |||
const unsigned int | byte_interval, | |||
const unsigned int | timeout_value, | |||
const unsigned int | num_tries | |||
) | throw ( SickTimeoutException, SickIOException) [protected, virtual] |
Sends a request to the Sick and acquires looks for the reply
int SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_sick_fd [protected] |
Sick device file descriptor
bool SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_sick_initialized [protected] |
A flag to indicated whether the device is properly initialized
SICK_MONITOR_CLASS* SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_sick_buffer_monitor [protected] |
A pointer to the driver's buffer monitor
bool SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_sick_monitor_running [protected] |
Indicates whether the Sick buffer monitor is running