SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS > Class Template Reference

Provides an abstract parent for all Sick LIDAR devices. More...

#include <c++/drivers/base/src/SickLIDAR.hh>

Inheritance diagram for SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >:

Inheritance graph
[legend]
Collaboration diagram for SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >:

Collaboration graph
[legend]
List of all members.

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

Detailed Description

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
class SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >

Provides an abstract parent for all Sick LIDAR devices.


Constructor & Destructor Documentation

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::SickLIDAR (  ) 

Initializes the buffer monitor.

The primary constructor

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::~SickLIDAR (  )  [virtual]

Destructor tears down buffer monitor.

A virtual destructor


Member Function Documentation

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
bool SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::IsInitialized (  )  [inline]

Indicates whether device is initialized

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
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.

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
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.

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
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

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
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

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
bool SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_monitorRunning (  )  const [inline, protected]

Indicates whether there is a monitor currently running

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
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

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
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

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
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)

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
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

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
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

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
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

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
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


Member Data Documentation

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
int SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_sick_fd [protected]

Sick device file descriptor

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
bool SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_sick_initialized [protected]

A flag to indicated whether the device is properly initialized

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
SICK_MONITOR_CLASS* SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_sick_buffer_monitor [protected]

A pointer to the driver's buffer monitor

template<class SICK_MONITOR_CLASS, class SICK_MSG_CLASS>
bool SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_sick_monitor_running [protected]

Indicates whether the Sick buffer monitor is running


The documentation for this class was generated from the following file:
Generated on Thu Mar 20 09:41:46 2008 for sicktoolbox-1.0 by  doxygen 1.5.1