#include <c++/drivers/base/src/SickBufferMonitor.hh>
Inheritance diagram for SickToolbox::SickBufferMonitor< SICK_MONITOR_CLASS, SICK_MSG_CLASS >:


Public Member Functions | |
| SickBufferMonitor (SICK_MONITOR_CLASS *const monitor_instance) throw ( SickThreadException ) | |
| Primary constructor. | |
| void | SetDataStream (const unsigned int sick_fd) throw ( SickThreadException ) |
| A method for setting/changing the current data stream. | |
| void | StartMonitor (const unsigned int sick_fd) throw ( SickThreadException ) |
| Creates and starts the buffer monitor thread. | |
| bool | GetNextMessageFromMonitor (SICK_MSG_CLASS &sick_message) throw ( SickThreadException ) |
| Checks the message container for the next available Sick message. | |
| void | StopMonitor () throw ( SickThreadException ) |
| Cancels the buffer monitor thread. | |
| void | AcquireDataStream () throw ( SickThreadException ) |
| Acquires a lock on the data stream. | |
| void | GetNextMessageFromDataStream (SICK_MSG_CLASS &sick_message) |
| void | ReleaseDataStream () throw ( SickThreadException ) |
| Releases a lock on the data stream. | |
| ~SickBufferMonitor () throw ( SickThreadException ) | |
| The destructor (kills the mutex). | |
Protected Member Functions | |
| void | _readBytes (uint8_t *const dest_buffer, const int num_bytes_to_read, const unsigned int timeout_value=0) const throw ( SickTimeoutException, SickIOException ) |
| Attempt to read a certain number of bytes from the stream. | |
Protected Attributes | |
| unsigned int | _sick_fd |
| SickToolbox::SickBufferMonitor< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::SickBufferMonitor | ( | SICK_MONITOR_CLASS *const | monitor_instance | ) | throw ( SickThreadException ) |
Primary constructor.
A standard constructor
| SickToolbox::SickBufferMonitor< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::~SickBufferMonitor | ( | ) | throw ( SickThreadException ) |
The destructor (kills the mutex).
A standard destructor
| void SickToolbox::SickBufferMonitor< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::SetDataStream | ( | const unsigned int | sick_fd | ) | throw ( SickThreadException ) |
A method for setting/changing the current data stream.
A method for setting the target data stream
| void SickToolbox::SickBufferMonitor< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::StartMonitor | ( | const unsigned int | sick_fd | ) | throw ( SickThreadException ) |
Creates and starts the buffer monitor thread.
Start the buffer monitor for the device
| bool SickToolbox::SickBufferMonitor< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::GetNextMessageFromMonitor | ( | SICK_MSG_CLASS & | sick_message | ) | throw ( SickThreadException ) |
Checks the message container for the next available Sick message.
Acquire the most recent message buffered by the monitor
| void SickToolbox::SickBufferMonitor< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::StopMonitor | ( | ) | throw ( SickThreadException ) |
Cancels the buffer monitor thread.
Stop the buffer monitor for the device
| void SickToolbox::SickBufferMonitor< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::AcquireDataStream | ( | ) | throw ( SickThreadException ) |
Acquires a lock on the data stream.
Locks access to the data stream
| void SickToolbox::SickBufferMonitor< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::GetNextMessageFromDataStream | ( | SICK_MSG_CLASS & | sick_message | ) |
Acquire the next message from raw byte stream
| void SickToolbox::SickBufferMonitor< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::ReleaseDataStream | ( | ) | throw ( SickThreadException ) |
Releases a lock on the data stream.
Unlock access to the data stream
| void SickToolbox::SickBufferMonitor< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_readBytes | ( | uint8_t *const | dest_buffer, | |
| const int | num_bytes_to_read, | |||
| const unsigned int | timeout_value = 0 | |||
| ) | const throw ( SickTimeoutException, SickIOException ) [protected] |
Attempt to read a certain number of bytes from the stream.
Reads n bytes into the destination buffer
unsigned int SickToolbox::SickBufferMonitor< SICK_MONITOR_CLASS, SICK_MSG_CLASS >::_sick_fd [protected] |
Sick data stream file descriptor
1.5.1