SickToolbox::SickLMS Class Reference

A general class for interfacing w/ SickLMS2xx laser range finders. More...

#include <c++/drivers/lms/sicklms-1.0/SickLMS.hh>

Inheritance diagram for SickToolbox::SickLMS:

Inheritance graph
[legend]
Collaboration diagram for SickToolbox::SickLMS:

Collaboration graph
[legend]
List of all members.

Public Types

enum  sick_lms_type_t {
  SICK_LMS_TYPE_200_30106, SICK_LMS_TYPE_211_30106, SICK_LMS_TYPE_211_30206, SICK_LMS_TYPE_211_S07,
  SICK_LMS_TYPE_211_S14, SICK_LMS_TYPE_211_S15, SICK_LMS_TYPE_211_S19, SICK_LMS_TYPE_211_S20,
  SICK_LMS_TYPE_220_30106, SICK_LMS_TYPE_221_30106, SICK_LMS_TYPE_221_30206, SICK_LMS_TYPE_221_S07,
  SICK_LMS_TYPE_221_S14, SICK_LMS_TYPE_221_S15, SICK_LMS_TYPE_221_S16, SICK_LMS_TYPE_221_S19,
  SICK_LMS_TYPE_221_S20, SICK_LMS_TYPE_291_S05, SICK_LMS_TYPE_291_S14, SICK_LMS_TYPE_291_S15,
  SICK_LMS_TYPE_UNKNOWN = 0xFF
}
 Defines the Sick LMS 2xx types. This enum lists all of the supported Sick LMS models. More...
enum  sick_lms_variant_t { SICK_LMS_VARIANT_2XX_TYPE_6 = 0x00, SICK_LMS_VARIANT_SPECIAL = 0x01, SICK_LMS_VARIANT_UNKNOWN = 0xFF }
 Defines the Sick LMS 2xx variant type. More...
enum  sick_lms_scan_angle_t { SICK_SCAN_ANGLE_90 = 90, SICK_SCAN_ANGLE_100 = 100, SICK_SCAN_ANGLE_180 = 180, SICK_SCAN_ANGLE_UNKNOWN = 0xFF }
 Defines the scan angle for the Sick LMS 2xx. More...
enum  sick_lms_scan_resolution_t { SICK_SCAN_RESOLUTION_25 = 25, SICK_SCAN_RESOLUTION_50 = 50, SICK_SCAN_RESOLUTION_100 = 100, SICK_SCAN_RESOLUTION_UNKNOWN = 0xFF }
 Defines the available resolution settings for the Sick LMS 2xx. More...
enum  sick_lms_measuring_units_t { SICK_MEASURING_UNITS_CM = 0x00, SICK_MEASURING_UNITS_MM = 0x01, SICK_MEASURING_UNITS_UNKNOWN = 0xFF }
 Defines the available Sick LMS 2xx measured value units. More...
enum  sick_lms_sensitivity_t {
  SICK_SENSITIVITY_STANDARD = 0x00, SICK_SENSITIVITY_MEDIUM = 0x01, SICK_SENSITIVITY_LOW = 0x02, SICK_SENSITIVITY_HIGH = 0x03,
  SICK_SENSITIVITY_UNKNOWN = 0xFF
}
 Sick sensitivities. Only valid for Sick LMS 211/221/291! More...
enum  sick_lms_peak_threshold_t {
  SICK_PEAK_THRESHOLD_DETECTION_WITH_NO_BLACK_EXTENSION = 0x00, SICK_PEAK_THRESHOLD_DETECTION_WITH_BLACK_EXTENSION = 0x01, SICK_PEAK_THRESHOLD_NO_DETECTION_WITH_NO_BLACK_EXTENSION = 0x02, SICK_PEAK_THRESHOLD_NO_DETECTION_WITH_BLACK_EXTENSION = 0x03,
  SICK_PEAK_THRESHOLD_UNKNOWN = 0xFF
}
 Sick peak threshold. Only valid for Sick LMS 200/220! More...
enum  sick_lms_status_t { SICK_STATUS_OK = 0x00, SICK_STATUS_ERROR = 0x01, SICK_STATUS_UNKNOWN = 0xFF }
 Defines the status of the Sick LMS 2xx unit. More...
enum  sick_lms_measuring_mode_t {
  SICK_MS_MODE_8_OR_80_FA_FB_DAZZLE = 0x00, SICK_MS_MODE_8_OR_80_REFLECTOR = 0x01, SICK_MS_MODE_8_OR_80_FA_FB_FC = 0x02, SICK_MS_MODE_16_REFLECTOR = 0x03,
  SICK_MS_MODE_16_FA_FB = 0x04, SICK_MS_MODE_32_REFLECTOR = 0x05, SICK_MS_MODE_32_FA = 0x06, SICK_MS_MODE_32_IMMEDIATE = 0x0F,
  SICK_MS_MODE_REFLECTIVITY = 0x3F, SICK_MS_MODE_UNKNOWN = 0xFF
}
 Defines the measurment modes supported by Sick LMS 2xx. More...
enum  sick_lms_operating_mode_t {
  SICK_OP_MODE_INSTALLATION = 0x00, SICK_OP_MODE_DIAGNOSTIC = 0x10, SICK_OP_MODE_MONITOR_STREAM_MIN_VALUE_FOR_EACH_SEGMENT = 0x20, SICK_OP_MODE_MONITOR_TRIGGER_MIN_VALUE_ON_OBJECT = 0x21,
  SICK_OP_MODE_MONITOR_STREAM_MIN_VERT_DIST_TO_OBJECT = 0x22, SICK_OP_MODE_MONITOR_TRIGGER_MIN_VERT_DIST_TO_OBJECT = 0x23, SICK_OP_MODE_MONITOR_STREAM_VALUES = 0x24, SICK_OP_MODE_MONITOR_REQUEST_VALUES = 0x25,
  SICK_OP_MODE_MONITOR_STREAM_MEAN_VALUES = 0x26, SICK_OP_MODE_MONITOR_STREAM_VALUES_SUBRANGE = 0x27, SICK_OP_MODE_MONITOR_STREAM_MEAN_VALUES_SUBRANGE = 0x28, SICK_OP_MODE_MONITOR_STREAM_VALUES_WITH_FIELDS = 0x29,
  SICK_OP_MODE_MONITOR_STREAM_VALUES_FROM_PARTIAL_SCAN = 0x2A, SICK_OP_MODE_MONITOR_STREAM_RANGE_AND_REFLECT_FROM_PARTIAL_SCAN = 0x2B, SICK_OP_MODE_MONITOR_STREAM_MIN_VALUES_FOR_EACH_SEGMENT_SUBRANGE = 0x2C, SICK_OP_MODE_MONITOR_NAVIGATION = 0x2E,
  SICK_OP_MODE_MONITOR_STREAM_RANGE_AND_REFLECT = 0x50, SICK_OP_MODE_UNKNOWN = 0xFF
}
 Defines the operating modes supported by Sick LMS 2xx. See page 41 of the LMS 2xx telegram manual for additional descriptions of these modes. More...
enum  sick_lms_baud_t {
  SICK_BAUD_9600 = 0x42, SICK_BAUD_19200 = 0x41, SICK_BAUD_38400 = 0x40, SICK_BAUD_500K = 0x48,
  SICK_BAUD_UNKNOWN = 0xFF
}
 Defines available Sick LMS 2xx baud rates. More...
typedef SickToolbox::SickLMS::sick_lms_operating_status_tag sick_lms_operating_status_t
 Adopt c-style convention.
typedef SickToolbox::SickLMS::sick_lms_software_status_tag sick_lms_software_status_t
 Adopt c-style convention.
typedef SickToolbox::SickLMS::sick_lms_restart_status_tag sick_lms_restart_status_t
typedef SickToolbox::SickLMS::sick_lms_pollution_status_tag sick_lms_pollution_status_t
 Adopt c-style convention.
typedef SickToolbox::SickLMS::sick_lms_signal_status_tag sick_lms_signal_status_t
 Adopt c-style convention.
typedef SickToolbox::SickLMS::sick_lms_field_status_tag sick_lms_field_status_t
 Adopt c-style convention.
typedef SickToolbox::SickLMS::sick_lms_baud_status_tag sick_lms_baud_status_t
 Adopt c-style convention.
typedef SickToolbox::SickLMS::sick_lms_device_config_tag sick_lms_device_config_t
 Adopt c-style convention.
typedef SickToolbox::SickLMS::sick_lms_scan_profile_b0_tag sick_lms_scan_profile_b0_t
 Adopt c-style convention.
typedef SickToolbox::SickLMS::sick_lms_scan_profile_b6_tag sick_lms_scan_profile_b6_t
 Adopt c-style convention.
typedef SickToolbox::SickLMS::sick_lms_scan_profile_b7_tag sick_lms_scan_profile_b7_t
 Adopt c-style convention.
typedef SickToolbox::SickLMS::sick_lms_scan_profile_bf_tag sick_lms_scan_profile_bf_t
 Adopt c-style convention.
typedef SickToolbox::SickLMS::sick_lms_scan_profile_c4_tag sick_lms_scan_profile_c4_t
 Adopt c-style convention.

Public Member Functions

 SickLMS (const std::string sick_device_path)
 Primary constructor.
 ~SickLMS ()
 Destructor.
void Initialize (const sick_lms_baud_t desired_baud_rate) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Attempts to initialize the Sick LMS 2xx and then sets communication at at the given baud rate.
void Uninitialize () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Uninitializes the LMS by putting it in a mode where it stops streaming data, and returns it to the default baud rate (specified in the header).
sick_lms_type_t GetSickType () const throw ( SickConfigException )
 Gets the Sick LMS 2xx type.
double GetSickScanAngle () const throw ( SickConfigException )
 Gets the current scan angle of the device.
double GetSickScanResolution () const throw ( SickConfigException )
 Gets the current angular resolution.
void SetSickMeasuringUnits (const sick_lms_measuring_units_t sick_units=SICK_MEASURING_UNITS_MM) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Sets the measurement units for the device.
SickLMS::sick_lms_measuring_units_t GetSickMeasuringUnits () const throw ( SickConfigException )
 Gets the current Sick LMS 2xx measuring units.
void SetSickSensitivity (const sick_lms_sensitivity_t sick_sensitivity=SICK_SENSITIVITY_STANDARD) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Sets the Sick LMS sensitivity level.
sick_lms_sensitivity_t GetSickSensitivity () const throw ( SickConfigException )
 Gets the current Sick LMS 2xx sensitivity level.
void SetSickPeakThreshold (const sick_lms_peak_threshold_t sick_peak_threshold=SICK_PEAK_THRESHOLD_DETECTION_WITH_NO_BLACK_EXTENSION) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Sets the Sick LMS sensitivity level.
sick_lms_peak_threshold_t GetSickPeakThreshold () const throw ( SickConfigException )
 Gets the current Sick LMS 2xx sensitivity level.
void SetSickMeasuringMode (const sick_lms_measuring_mode_t sick_measuring_mode=SICK_MS_MODE_8_OR_80_FA_FB_DAZZLE) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Sets the measuring mode for the device.
sick_lms_measuring_mode_t GetSickMeasuringMode () const throw ( SickConfigException )
 Gets the current Sick LMS 2xx measuring mode.
sick_lms_operating_mode_t GetSickOperatingMode () const throw ( SickConfigException )
 Gets the current Sick LMS 2xx operating mode.
void SetSickAvailability (const uint8_t sick_availability_flags=SICK_FLAG_AVAILABILITY_DEFAULT) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Sets the availability level of the device.
uint8_t GetSickAvailability () const throw ( SickConfigException )
 Gets the current Sick LMS 2xx availability level flags.
void SetSickVariant (const sick_lms_scan_angle_t scan_angle, const sick_lms_scan_resolution_t scan_resolution) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the variant of the Sick LMS 2xx (scan angle and scan resolution).
void GetSickScan (unsigned int *const measurement_values, unsigned int &num_measurement_values, unsigned int *const sick_field_a_values=NULL, unsigned int *const sick_field_b_values=NULL, unsigned int *const sick_field_c_values=NULL, unsigned int *const sick_telegram_index=NULL, unsigned int *const sick_real_time_scan_index=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Returns the most recent measured values obtained by the Sick LMS 2xx.
void GetSickScan (unsigned int *const range_values, unsigned int *const reflect_values, unsigned int &num_range_measurements, unsigned int &num_reflect_measurements, unsigned int *const sick_field_a_values=NULL, unsigned int *const sick_field_b_values=NULL, unsigned int *const sick_field_c_values=NULL, unsigned int *const sick_telegram_index=NULL, unsigned int *const sick_real_time_scan_index=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Acquires both range and reflectivity values from the Sick LMS 211/221/291-S14 (LMS-FAST).
void GetSickScanSubrange (const uint16_t sick_subrange_start_index, const uint16_t sick_subrange_stop_index, unsigned int *const measurement_values, unsigned int &num_measurement_values, unsigned int *const sick_field_a_values=NULL, unsigned int *const sick_field_b_values=NULL, unsigned int *const sick_field_c_values=NULL, unsigned int *const sick_telegram_index=NULL, unsigned int *const sick_real_time_scan_index=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Returns the most recent measured values from the corresponding subrange.
void GetSickPartialScan (unsigned int *const measurement_values, unsigned int &num_measurement_values, unsigned int &partial_scan_index, unsigned int *const sick_field_a_values=NULL, unsigned int *const sick_field_b_values=NULL, unsigned int *const sick_field_c_values=NULL, unsigned int *const sick_telegram_index=NULL, unsigned int *const sick_real_time_scan_index=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Returns the most recent partial scan obtained by Sick LMS 2xx.
void GetSickMeanValues (const uint8_t sick_sample_size, unsigned int *const measurement_values, unsigned int &num_measurement_values, unsigned int *const sick_telegram_index=NULL, unsigned int *const sick_real_time_index=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Returns the most recent mean measured values from the Sick LMS 2xx.
void GetSickMeanValuesSubrange (const uint8_t sick_sample_size, const uint16_t sick_subrange_start_index, const uint16_t sick_subrange_stop_index, unsigned int *const measurement_values, unsigned int &num_measurement_values, unsigned int *const sick_telegram_index=NULL, unsigned int *const sick_real_time_index=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Returns the most recent mean measured values from the specified subrange.
sick_lms_status_t GetSickStatus () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Acquire the Sick LMS 2xx status.
bool IsSickLMSFast () const throw ( SickConfigException )
 Indicates whether the device is an LMS Fast.
void ResetSick () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Reset the Sick LMS 2xx active field values NOTE: Considered successful if the LMS ready message is received.
std::string GetSickStatusAsString () const
 Acquire the Sick LMS's status as a printable string.
std::string GetSickSoftwareVersionAsString () const
 Acquire the Sick LMS's operating params as a printable string.
std::string GetSickConfigAsString () const
 Acquire the Sick LMS's config as a printable string.
void PrintSickStatus () const
 Prints ths status of the Sick LMS 2xx unit.
void PrintSickSoftwareVersion () const
 Prints out relevant software versioning information.
void PrintSickConfig () const
 Prints out the Sick LMS configurations parameters.

Static Public Member Functions

static std::string SickTypeToString (const sick_lms_type_t sick_type)
 Converts the Sick LMS type to a corresponding string.
static sick_lms_scan_angle_t IntToSickScanAngle (const int scan_angle_int)
 Converts integer to corresponding Sick LMS scan angle.
static sick_lms_scan_resolution_t IntToSickScanResolution (const int scan_resolution_int)
 Converts integer to corresponding Sick LMS scan resolution.
static sick_lms_scan_resolution_t DoubleToSickScanResolution (const double scan_resolution_double)
 Converts double to corresponding Sick LMS scan resolution.
static std::string SickBaudToString (const sick_lms_baud_t baud_rate)
 Converts Sick LMS baud to a corresponding string.
static sick_lms_baud_t IntToSickBaud (const int baud_int)
 Converts integer to corresponding Sick LMS baud.
static sick_lms_baud_t StringToSickBaud (const std::string baud_str)
 Converts string to corresponding Sick LMS baud.
static std::string SickStatusToString (const sick_lms_status_t sick_status)
 Converts the Sick LMS 2xx status code to a string.
static std::string SickMeasuringModeToString (const sick_lms_measuring_mode_t sick_measuring_mode)
 Converts the Sick measuring mode to a corresponding string.
static std::string SickOperatingModeToString (const sick_lms_operating_mode_t sick_operating_mode)
 Converts the Sick operating mode to a corresponding string.
static std::string SickSensitivityToString (const sick_lms_sensitivity_t sick_sensitivity)
 Converts Sick LMS 2xx sensitivity level to a corresponding string.
static std::string SickPeakThresholdToString (const sick_lms_peak_threshold_t sick_peak_threshold)
 Converts Sick LMS 2xx peak threshold to a corresponding string.
static std::string SickMeasuringUnitsToString (const sick_lms_measuring_units_t sick_units)
 Converts the Sick LMS measurement units to a corresponding string.

Static Public Attributes

static const uint16_t SICK_MAX_NUM_MEASUREMENTS = 721
 Maximum number of measurements returned by the Sick LMS.
static const uint8_t SICK_FLAG_AVAILABILITY_DEFAULT = 0x00
 Availability unspecified.
static const uint8_t SICK_FLAG_AVAILABILITY_HIGH = 0x01
 Highest availability (comparable to LMS types 1 to 5).
static const uint8_t SICK_FLAG_AVAILABILITY_REAL_TIME_INDICES = 0x02
 Send real-time indices.
static const uint8_t SICK_FLAG_AVAILABILITY_DAZZLE_NO_EFFECT = 0x04
 Dazzle evalutation has no effect on switching outputs.

Protected Member Functions

void _setupConnection () throw ( SickIOException, SickThreadException )
 Attempts to open a I/O stream using the device path given at object instantiation.
void _teardownConnection () throw ( SickIOException )
 Closes the data connection associated with the device.
void _sendMessageAndGetReply (const SickLMSMessage &sick_send_message, SickLMSMessage &sick_recv_message, const unsigned int timeout_value, const unsigned int num_tries) throw ( SickIOException, SickThreadException, SickTimeoutException )
 Sends a message and searches for the corresponding reply.
void _sendMessageAndGetReply (const SickLMSMessage &sick_send_message, SickLMSMessage &sick_recv_message, const uint8_t reply_code, const unsigned int timeout_value, const unsigned int num_tries) throw ( SickIOException, SickThreadException, SickTimeoutException )
 Sends a message and searches for the reply with given reply code.
void _flushTerminalBuffer () throw ( SickThreadException )
 Flushes terminal I/O buffers.
void _setSessionBaud (const sick_lms_baud_t baud_rate) throw ( SickIOException, SickThreadException, SickTimeoutException )
 Sets the baud rate for the current communication session.
bool _testSickBaud (const sick_lms_baud_t baud_rate) throw ( SickIOException, SickThreadException )
 Attempts to detect whether the LMS is operating at the given baud rate.
void _setTerminalBaud (const sick_lms_baud_t sick_baud) throw ( SickIOException, SickThreadException )
 Sets the local terminal baud rate.
void _getSickType () throw ( SickTimeoutException, SickIOException, SickThreadException )
 Acquires the sick device type (as a string) from the unit.
void _getSickConfig () throw ( SickTimeoutException, SickIOException, SickThreadException )
 Acquires (and buffers) the current Sick LMS configuration from the device.
void _setSickConfig (const sick_lms_device_config_t &sick_config) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )
 Sets the current configuration in flash.
void _getSickStatus () throw ( SickTimeoutException, SickIOException, SickThreadException )
 Acquires (and buffers) the status of the Sick LMS 2xx.
void _getSickErrors (unsigned int *const num_sick_errors=NULL, uint8_t *const error_type_buffer=NULL, uint8_t *const error_num_buffer=NULL) throw ( SickTimeoutException, SickIOException, SickThreadException )
 Obtains any error codes from the Sick LMS.
void _setSickOpModeInstallation () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to installation mode.
void _setSickOpModeDiagnostic () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to diagnostic mode.
void _setSickOpModeMonitorRequestValues () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to send values only upon request.
void _setSickOpModeMonitorStreamValues () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to stream measured values.
void _setSickOpModeMonitorStreamRangeAndReflectivity () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to stream both range and reflectivity values.
void _setSickOpModeMonitorStreamValuesFromPartialScan () throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to start sending partial scans.
void _setSickOpModeMonitorStreamMeanValues (const uint8_t sample_size) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to send mean measured values.
void _setSickOpModeMonitorStreamValuesSubrange (const uint16_t subrange_start_index, const uint16_t subrange_stop_index) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to send a measured value subrange.
void _setSickOpModeMonitorStreamMeanValuesSubrange (const uint16_t sample_size, const uint16_t subrange_start_index, const uint16_t subrange_stop_index) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Sets the device to monitor mode and tells it to send a mean value subrange.
void _switchSickOperatingMode (const uint8_t sick_mode, const uint8_t *const mode_params=NULL) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)
 Attempts to switch the operating mode of the Sick LMS 2xx.
void _parseSickScanProfileB0 (const uint8_t *const src_buffer, sick_lms_scan_profile_b0_t &sick_scan_profile) const
 Parses a byte sequence into a scan profile corresponding to message B0.
void _parseSickScanProfileB6 (const uint8_t *const src_buffer, sick_lms_scan_profile_b6_t &sick_scan_profile) const
 Parses a byte sequence into a scan profile corresponding to message B6.
void _parseSickScanProfileB7 (const uint8_t *const src_buffer, sick_lms_scan_profile_b7_t &sick_scan_profile) const
 Parses a byte sequence into a scan profile corresponding to message B7.
void _parseSickScanProfileBF (const uint8_t *const src_buffer, sick_lms_scan_profile_bf_t &sick_scan_profile) const
 Parses a byte sequence into a scan profile corresponding to message B6.
void _parseSickScanProfileC4 (const uint8_t *const src_buffer, sick_lms_scan_profile_c4_t &sick_scan_profile) const
 Parses a byte sequence into a scan profile corresponding to message C4.
void _parseSickConfigProfile (const uint8_t *const src_buffer, sick_lms_device_config_t &sick_device_config) const
 Parses a byte sequence into a Sick config structure.
void _extractSickMeasurementValues (const uint8_t *const byte_sequence, const uint16_t num_measurements, uint16_t *const measured_values, uint8_t *const field_a_values=NULL, uint8_t *const field_b_values=NULL, uint8_t *const field_c_values=NULL) const
 Extracts the measured values (w/ flags) that were returned by the device.
bool _returningRealTimeIndices () const
bool _validSickMeasuringUnits (const sick_lms_measuring_units_t sick_units) const
 Indicates whether the given measuring units are valid/defined.
bool _validSickScanAngle (const sick_lms_scan_angle_t sick_scan_angle) const
 Indicates whether the given scan angle is defined.
bool _validSickScanResolution (const sick_lms_scan_resolution_t sick_scan_resolution) const
 Indicates whether the given scan resolution is defined.
bool _validSickSensitivity (const sick_lms_sensitivity_t sick_sensitivity) const
 Indicates whether the given sensitivity is defined.
bool _validSickPeakThreshold (const sick_lms_peak_threshold_t sick_peak_threshold) const
 Indicates whether the given peak threshold is valid.
bool _validSickMeasuringMode (const sick_lms_measuring_mode_t sick_measuring_mode) const
 Indicates whether the given measuring mode is defined.
bool _isSickLMS200 () const
 Indicates whether the Sick is an LMS 200.
bool _isSickLMS211 () const
 Indicates whether the Sick is an LMS 211.
bool _isSickLMS220 () const
 Indicates whether the Sick is an LMS 220.
bool _isSickLMS221 () const
 Indicates whether the Sick is an LMS 221.
bool _isSickLMS291 () const
 Indicates whether the Sick is an LMS 291.
bool _isSickUnknown () const
 Indicates whether the Sick type is unknown.
sick_lms_baud_t _baudToSickBaud (const int baud_rate) const
 Converts a termios baud to an equivalent Sick baud.
std::string _sickAvailabilityToString (const uint8_t availability_code) const
 Converts given restart level to a corresponding string.
std::string _sickRestartToString (const uint8_t restart_code) const
 Converts restart code to a corresponding string.
std::string _sickTemporaryFieldToString (const uint8_t temp_field_code) const
 Converts Sick LMS temporary field code to a corresponding string.
std::string _sickSubtractiveFieldsToString (const uint8_t subt_field_code) const
 Converts Sick LMS subtractive fields code to a corresponding string.
std::string _sickContourFunctionToString (const uint8_t contour_function_code) const
 Converts Sick LMS contour function code to a corresponding string.
std::string _sickVariantToString (const unsigned int sick_variant) const
 Converts the Sick LMS variant to a corresponding string.

Protected Attributes

std::string _sick_device_path
sick_lms_baud_t _curr_session_baud
sick_lms_baud_t _desired_session_baud
sick_lms_type_t _sick_type
sick_lms_operating_status_t _sick_operating_status
sick_lms_software_status_t _sick_software_status
sick_lms_restart_status_t _sick_restart_status
sick_lms_pollution_status_t _sick_pollution_status
sick_lms_signal_status_t _sick_signal_status
sick_lms_field_status_t _sick_field_status
sick_lms_baud_status_t _sick_baud_status
sick_lms_device_config_t _sick_device_config
uint8_t _sick_mean_value_sample_size
uint16_t _sick_values_subrange_start_index
uint16_t _sick_values_subrange_stop_index
termios _old_term

Classes

struct  sick_lms_baud_status_tag
 A structure for aggregating the data that collectively define the baud config. More...
struct  sick_lms_device_config_tag
 A structure for aggregating the data that collectively defines the Sick's config. More...
struct  sick_lms_field_status_tag
 A structure for aggregating the data that collectively define the signal config and status. More...
struct  sick_lms_operating_status_tag
 A structure for aggregating the data that collectively defines the operating status of the device. More...
struct  sick_lms_pollution_status_tag
 A structure for aggregating the data that collectively defines the pollution values and settings for the device. More...
struct  sick_lms_restart_status_tag
 A structure for aggregating the data that collectively defines the system restart config for the Sick LMS 2xx unit. More...
struct  sick_lms_scan_profile_b0_tag
 A structure for aggregating the data that define a scan profile obtained from reply B0 (See page 49 Telegram listing). More...
struct  sick_lms_scan_profile_b6_tag
 A structure for aggregating the data that define a scan profile obtained from reply B6 (See page 61 Telegram listing). More...
struct  sick_lms_scan_profile_b7_tag
 A structure for aggregating the data that define a scan profile obtained from reply B7 (See page 63 Telegram listing). More...
struct  sick_lms_scan_profile_bf_tag
 A structure for aggregating the data that define a scan profile obtained from reply BF (See page 71 Telegram listing). More...
struct  sick_lms_scan_profile_c4_tag
 A structure for aggregating the data that define a scan profile obtained from reply B4 (See page 79 Telegram listing). More...
struct  sick_lms_signal_status_tag
 A structure for aggregating the data that collectively define the signal config and status. More...
struct  sick_lms_software_status_tag
 A structure for aggregating the data that collectively defines the system software for the Sick LMS 2xx unit. More...

Detailed Description

A general class for interfacing w/ SickLMS2xx laser range finders.

This class implements the basic telegram protocol for SickLMS2xx range finders. It allows the setting of such parameters as angular resolution, fov, etc...


Member Typedef Documentation

SickToolbox::SickLMS::sick_lms_operating_status_t

Adopt c-style convention.

SickToolbox::SickLMS::sick_lms_software_status_t

Adopt c-style convention.

typedef struct SickToolbox::SickLMS::sick_lms_restart_status_tag SickToolbox::SickLMS::sick_lms_restart_status_t

SickToolbox::SickLMS::sick_lms_pollution_status_t

Adopt c-style convention.

SickToolbox::SickLMS::sick_lms_signal_status_t

Adopt c-style convention.

SickToolbox::SickLMS::sick_lms_field_status_t

Adopt c-style convention.

SickToolbox::SickLMS::sick_lms_baud_status_t

Adopt c-style convention.

SickToolbox::SickLMS::sick_lms_device_config_t

Adopt c-style convention.

SickToolbox::SickLMS::sick_lms_scan_profile_b0_t

Adopt c-style convention.

SickToolbox::SickLMS::sick_lms_scan_profile_b6_t

Adopt c-style convention.

SickToolbox::SickLMS::sick_lms_scan_profile_b7_t

Adopt c-style convention.

SickToolbox::SickLMS::sick_lms_scan_profile_bf_t

Adopt c-style convention.

SickToolbox::SickLMS::sick_lms_scan_profile_c4_t

Adopt c-style convention.


Member Enumeration Documentation

enum SickToolbox::SickLMS::sick_lms_type_t

Defines the Sick LMS 2xx types. This enum lists all of the supported Sick LMS models.

Enumerator:
SICK_LMS_TYPE_200_30106  Sick LMS type 200-30106.
SICK_LMS_TYPE_211_30106  Sick LMS type 211-30106.
SICK_LMS_TYPE_211_30206  Sick LMS type 211-30206.
SICK_LMS_TYPE_211_S07  Sick LMS type 211-S07.
SICK_LMS_TYPE_211_S14  Sick LMS type 211-S14.
SICK_LMS_TYPE_211_S15  Sick LMS type 211-S15.
SICK_LMS_TYPE_211_S19  Sick LMS type 211-S19.
SICK_LMS_TYPE_211_S20  Sick LMS type 211-S20.
SICK_LMS_TYPE_220_30106  Sick LMS type 220-30106.
SICK_LMS_TYPE_221_30106  Sick LMS type 221-30106.
SICK_LMS_TYPE_221_30206  Sick LMS type 221-30206.
SICK_LMS_TYPE_221_S07  Sick LMS type 221-S07.
SICK_LMS_TYPE_221_S14  Sick LMS type 221-S14.
SICK_LMS_TYPE_221_S15  Sick LMS type 221-S15.
SICK_LMS_TYPE_221_S16  Sick LMS type 221-S16.
SICK_LMS_TYPE_221_S19  Sick LMS type 221-S19.
SICK_LMS_TYPE_221_S20  Sick LMS type 221-S20.
SICK_LMS_TYPE_291_S05  Sick LMS type 291-S05.
SICK_LMS_TYPE_291_S14  Sick LMS type 291-S14 (LMS Fast).
SICK_LMS_TYPE_291_S15  Sick LMS type 291-S15.
SICK_LMS_TYPE_UNKNOWN  Unknown sick type.

enum SickToolbox::SickLMS::sick_lms_variant_t

Defines the Sick LMS 2xx variant type.

Enumerator:
SICK_LMS_VARIANT_2XX_TYPE_6  Standard LMS 2xx type 6 models.
SICK_LMS_VARIANT_SPECIAL  Special models (i.e. LMS211-/221-S19/-S20.
SICK_LMS_VARIANT_UNKNOWN  Unknown LMS variant.

enum SickToolbox::SickLMS::sick_lms_scan_angle_t

Defines the scan angle for the Sick LMS 2xx.

Enumerator:
SICK_SCAN_ANGLE_90  Scanning angle of 90 degrees.
SICK_SCAN_ANGLE_100  Scanning angle of 100 degrees.
SICK_SCAN_ANGLE_180  Scanning angle of 180 degrees.
SICK_SCAN_ANGLE_UNKNOWN  Unknown scanning angle.

enum SickToolbox::SickLMS::sick_lms_scan_resolution_t

Defines the available resolution settings for the Sick LMS 2xx.

Enumerator:
SICK_SCAN_RESOLUTION_25  0.25 degree angular resolution
SICK_SCAN_RESOLUTION_50  0.50 degree angular resolution
SICK_SCAN_RESOLUTION_100  1.00 degree angular resolution
SICK_SCAN_RESOLUTION_UNKNOWN  Unknown angular resolution.

enum SickToolbox::SickLMS::sick_lms_measuring_units_t

Defines the available Sick LMS 2xx measured value units.

Enumerator:
SICK_MEASURING_UNITS_CM  Measured values are in centimeters.
SICK_MEASURING_UNITS_MM  Measured values are in milimeters.
SICK_MEASURING_UNITS_UNKNOWN  Unknown units.

enum SickToolbox::SickLMS::sick_lms_sensitivity_t

Sick sensitivities. Only valid for Sick LMS 211/221/291!

Enumerator:
SICK_SENSITIVITY_STANDARD  Standard sensitivity: 30m @ 10% reflectivity.
SICK_SENSITIVITY_MEDIUM  Medium sensitivity: 25m @ 10% reflectivity.
SICK_SENSITIVITY_LOW  Low sensitivity: 20m @ 10% reflectivity.
SICK_SENSITIVITY_HIGH  High sensitivity: 42m @ 10% reflectivity.
SICK_SENSITIVITY_UNKNOWN  Sensitivity unknown.

enum SickToolbox::SickLMS::sick_lms_peak_threshold_t

Sick peak threshold. Only valid for Sick LMS 200/220!

Enumerator:
SICK_PEAK_THRESHOLD_DETECTION_WITH_NO_BLACK_EXTENSION  Standard: peak threshold detection, no black extension.
SICK_PEAK_THRESHOLD_DETECTION_WITH_BLACK_EXTENSION  Peak threshold detection, active black extension.
SICK_PEAK_THRESHOLD_NO_DETECTION_WITH_NO_BLACK_EXTENSION  No peak threshold detection, no black extension.
SICK_PEAK_THRESHOLD_NO_DETECTION_WITH_BLACK_EXTENSION  No peak threshold detection, active black extension.
SICK_PEAK_THRESHOLD_UNKNOWN  Peak threshold unknown.

enum SickToolbox::SickLMS::sick_lms_status_t

Defines the status of the Sick LMS 2xx unit.

Enumerator:
SICK_STATUS_OK  LMS is OK.
SICK_STATUS_ERROR  LMS has encountered an error.
SICK_STATUS_UNKNOWN  Unknown LMS status.

enum SickToolbox::SickLMS::sick_lms_measuring_mode_t

Defines the measurment modes supported by Sick LMS 2xx.

Enumerator:
SICK_MS_MODE_8_OR_80_FA_FB_DAZZLE  Measurement range 8m/80m; fields A,B and Dazzle (Default).
SICK_MS_MODE_8_OR_80_REFLECTOR  Measurement range 8/80m; reflector bits in 8 levels.
SICK_MS_MODE_8_OR_80_FA_FB_FC  Measurement range 8/80m; fields A,B, and C.
SICK_MS_MODE_16_REFLECTOR  Measurement range 16m; reflector bits in 4 levels.
SICK_MS_MODE_16_FA_FB  Measurement range 16m; fields A and B.
SICK_MS_MODE_32_REFLECTOR  Measurement range 32m; reflector bit in 2 levels.
SICK_MS_MODE_32_FA  Measurement range 32m; field A.
SICK_MS_MODE_32_IMMEDIATE  Measurement range 32m; immediate data transmission, no flags.
SICK_MS_MODE_REFLECTIVITY  Sick LMS 2xx returns reflectivity (echo amplitude) values instead of range measurements.
SICK_MS_MODE_UNKNOWN  Unknown range.

enum SickToolbox::SickLMS::sick_lms_operating_mode_t

Defines the operating modes supported by Sick LMS 2xx. See page 41 of the LMS 2xx telegram manual for additional descriptions of these modes.

Enumerator:
SICK_OP_MODE_INSTALLATION  Installation mode for writing EEPROM.
SICK_OP_MODE_DIAGNOSTIC  Diagnostic mode for testing purposes.
SICK_OP_MODE_MONITOR_STREAM_MIN_VALUE_FOR_EACH_SEGMENT  Streams minimum measured values for each segement.
SICK_OP_MODE_MONITOR_TRIGGER_MIN_VALUE_ON_OBJECT  Sends the min measured values when object is detected.
SICK_OP_MODE_MONITOR_STREAM_MIN_VERT_DIST_TO_OBJECT  Streams min "vertical distance" to objects.
SICK_OP_MODE_MONITOR_TRIGGER_MIN_VERT_DIST_TO_OBJECT  Sends min vertical distance to object when detected.
SICK_OP_MODE_MONITOR_STREAM_VALUES  Streams all measured values in a scan.
SICK_OP_MODE_MONITOR_REQUEST_VALUES  Sends measured range values on request (i.e. when polled).
SICK_OP_MODE_MONITOR_STREAM_MEAN_VALUES  Streams mean values from a sample size of n consecutive scans.
SICK_OP_MODE_MONITOR_STREAM_VALUES_SUBRANGE  Streams data from given subrange.
SICK_OP_MODE_MONITOR_STREAM_MEAN_VALUES_SUBRANGE  Streams mean values over requested subrange.
SICK_OP_MODE_MONITOR_STREAM_VALUES_WITH_FIELDS  Streams measured values with associated flags.
SICK_OP_MODE_MONITOR_STREAM_VALUES_FROM_PARTIAL_SCAN  Streams measured values of partial scan directly after measurement.
SICK_OP_MODE_MONITOR_STREAM_RANGE_AND_REFLECT_FROM_PARTIAL_SCAN  Streams range and intensity from n partial scans.
SICK_OP_MODE_MONITOR_STREAM_MIN_VALUES_FOR_EACH_SEGMENT_SUBRANGE  Streams minimum measured values for each segment in a sub-range.
SICK_OP_MODE_MONITOR_NAVIGATION  Sick outputs navigation data records.
SICK_OP_MODE_MONITOR_STREAM_RANGE_AND_REFLECT  Streams measured range from a scan and sub-range of reflectivity values.
SICK_OP_MODE_UNKNOWN  Unknown operating mode.

enum SickToolbox::SickLMS::sick_lms_baud_t

Defines available Sick LMS 2xx baud rates.

Enumerator:
SICK_BAUD_9600  9600 baud
SICK_BAUD_19200  19200 baud
SICK_BAUD_38400  38400 baud
SICK_BAUD_500K  500000 baud
SICK_BAUD_UNKNOWN  Unknown baud rate.


Constructor & Destructor Documentation

SickToolbox::SickLMS::SickLMS ( const std::string  sick_device_path  ) 

Primary constructor.

Constructor

SickToolbox::SickLMS::~SickLMS (  ) 

Destructor.

Destructor


Member Function Documentation

void SickToolbox::SickLMS::Initialize ( const sick_lms_baud_t  desired_baud_rate  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)

Attempts to initialize the Sick LMS 2xx and then sets communication at at the given baud rate.

Initializes the Sick

void SickToolbox::SickLMS::Uninitialize (  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )

Uninitializes the LMS by putting it in a mode where it stops streaming data, and returns it to the default baud rate (specified in the header).

Uninitializes the Sick

sick_lms_type_t SickToolbox::SickLMS::GetSickType (  )  const throw ( SickConfigException )

Gets the Sick LMS 2xx type.

Get the Sick LMS 2xx device type

double SickToolbox::SickLMS::GetSickScanAngle (  )  const throw ( SickConfigException )

Gets the current scan angle of the device.

Gets the scan angle currently being used by the device

double SickToolbox::SickLMS::GetSickScanResolution (  )  const throw ( SickConfigException )

Gets the current angular resolution.

Gets the scan resolution currently being used by the device

void SickToolbox::SickLMS::SetSickMeasuringUnits ( const sick_lms_measuring_units_t  sick_units = SICK_MEASURING_UNITS_MM  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )

Sets the measurement units for the device.

Set the measurement units of the device (in EEPROM)

sick_lms_measuring_units_t SickToolbox::SickLMS::GetSickMeasuringUnits (  )  const throw ( SickConfigException )

Gets the current Sick LMS 2xx measuring units.

Get the current measurement units of the device

void SickToolbox::SickLMS::SetSickSensitivity ( const sick_lms_sensitivity_t  sick_sensitivity = SICK_SENSITIVITY_STANDARD  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )

Sets the Sick LMS sensitivity level.

Sets the sensitivity value for the device (in EEPROM). NOTE: Only applies to LMS 211/221/291 models.

sick_lms_sensitivity_t SickToolbox::SickLMS::GetSickSensitivity (  )  const throw ( SickConfigException )

Gets the current Sick LMS 2xx sensitivity level.

Get the current Sick LMS 2xx sensitivity level. NOTE: Only applies to LMS 211/221/291 models.

void SickToolbox::SickLMS::SetSickPeakThreshold ( const sick_lms_peak_threshold_t  sick_peak_threshold = SICK_PEAK_THRESHOLD_DETECTION_WITH_NO_BLACK_EXTENSION  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )

Sets the Sick LMS sensitivity level.

Sets the peak threshold mode for the device (in EEPROM). NOTE: Only applies to LMS 200/220 models

sick_lms_peak_threshold_t SickToolbox::SickLMS::GetSickPeakThreshold (  )  const throw ( SickConfigException )

Gets the current Sick LMS 2xx sensitivity level.

Get the current Sick LMS 2xx sensitivity level. NOTE: Only applies to LMS 211/221/291 models.

void SickToolbox::SickLMS::SetSickMeasuringMode ( const sick_lms_measuring_mode_t  sick_measuring_mode = SICK_MS_MODE_8_OR_80_FA_FB_DAZZLE  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )

Sets the measuring mode for the device.

Sets the measuring mode for the device (in EEPROM). See page 98 of the telegram listing for more details.

sick_lms_measuring_mode_t SickToolbox::SickLMS::GetSickMeasuringMode (  )  const throw ( SickConfigException )

Gets the current Sick LMS 2xx measuring mode.

Get the current Sick LMS 2xx measuring mode

sick_lms_operating_mode_t SickToolbox::SickLMS::GetSickOperatingMode (  )  const throw ( SickConfigException )

Gets the current Sick LMS 2xx operating mode.

Get the current Sick LMS 2xx operating mode

void SickToolbox::SickLMS::SetSickAvailability ( const uint8_t  sick_availability_flags = SICK_FLAG_AVAILABILITY_DEFAULT  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )

Sets the availability level of the device.

Sets the availability of the device (in EEPROM). See page 98 of the telegram listing for more details.

uint8_t SickToolbox::SickLMS::GetSickAvailability (  )  const throw ( SickConfigException )

Gets the current Sick LMS 2xx availability level flags.

Gets the current availability flags for the device

void SickToolbox::SickLMS::SetSickVariant ( const sick_lms_scan_angle_t  scan_angle,
const sick_lms_scan_resolution_t  scan_resolution 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)

Sets the variant of the Sick LMS 2xx (scan angle and scan resolution).

Sets the variant type for the device (in EEPROM)

void SickToolbox::SickLMS::GetSickScan ( unsigned int *const   measurement_values,
unsigned int &  num_measurement_values,
unsigned int *const   sick_field_a_values = NULL,
unsigned int *const   sick_field_b_values = NULL,
unsigned int *const   sick_field_c_values = NULL,
unsigned int *const   sick_telegram_index = NULL,
unsigned int *const   sick_real_time_scan_index = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)

Returns the most recent measured values obtained by the Sick LMS 2xx.

Gets measurement data from the Sick. NOTE: Data can be either range or reflectivity given the Sick mode.

void SickToolbox::SickLMS::GetSickScan ( unsigned int *const   range_values,
unsigned int *const   reflect_values,
unsigned int &  num_range_measurements,
unsigned int &  num_reflect_measurements,
unsigned int *const   sick_field_a_values = NULL,
unsigned int *const   sick_field_b_values = NULL,
unsigned int *const   sick_field_c_values = NULL,
unsigned int *const   sick_telegram_index = NULL,
unsigned int *const   sick_real_time_scan_index = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)

Acquires both range and reflectivity values from the Sick LMS 211/221/291-S14 (LMS-FAST).

Gets range and reflectivity data from the Sick. NOTE: This only applies to Sick LMS 211/221/291-S14!

void SickToolbox::SickLMS::GetSickScanSubrange ( const uint16_t  sick_subrange_start_index,
const uint16_t  sick_subrange_stop_index,
unsigned int *const   measurement_values,
unsigned int &  num_measurement_values,
unsigned int *const   sick_field_a_values = NULL,
unsigned int *const   sick_field_b_values = NULL,
unsigned int *const   sick_field_c_values = NULL,
unsigned int *const   sick_telegram_index = NULL,
unsigned int *const   sick_real_time_scan_index = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)

Returns the most recent measured values from the corresponding subrange.

Gets measurement data from the Sick. NOTE: Data can be either range or reflectivity given the Sick mode.

void SickToolbox::SickLMS::GetSickPartialScan ( unsigned int *const   measurement_values,
unsigned int &  num_measurement_values,
unsigned int &  partial_scan_index,
unsigned int *const   sick_field_a_values = NULL,
unsigned int *const   sick_field_b_values = NULL,
unsigned int *const   sick_field_c_values = NULL,
unsigned int *const   sick_telegram_index = NULL,
unsigned int *const   sick_real_time_scan_index = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException)

Returns the most recent partial scan obtained by Sick LMS 2xx.

Gets partial scan measurements from the Sick LMS 2xx. NOTE: Data can be either range or reflectivity depending upon the given Sick mode.

void SickToolbox::SickLMS::GetSickMeanValues ( const uint8_t  sick_sample_size,
unsigned int *const   measurement_values,
unsigned int &  num_measurement_values,
unsigned int *const   sick_telegram_index = NULL,
unsigned int *const   sick_real_time_index = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )

Returns the most recent mean measured values from the Sick LMS 2xx.

Gets mean measured values from the Sick LMS

void SickToolbox::SickLMS::GetSickMeanValuesSubrange ( const uint8_t  sick_sample_size,
const uint16_t  sick_subrange_start_index,
const uint16_t  sick_subrange_stop_index,
unsigned int *const   measurement_values,
unsigned int &  num_measurement_values,
unsigned int *const   sick_telegram_index = NULL,
unsigned int *const   sick_real_time_index = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )

Returns the most recent mean measured values from the specified subrange.

Gets mean measured values from the Sick LMS

sick_lms_status_t SickToolbox::SickLMS::GetSickStatus (  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )

Acquire the Sick LMS 2xx status.

Acquire the Sick LMS status

bool SickToolbox::SickLMS::IsSickLMSFast (  )  const throw ( SickConfigException )

Indicates whether the device is an LMS Fast.

Indicates whether the Sick is an LMS Fast

void SickToolbox::SickLMS::ResetSick (  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException )

Reset the Sick LMS 2xx active field values NOTE: Considered successful if the LMS ready message is received.

Resets Sick LMS field values

std::string SickToolbox::SickLMS::GetSickStatusAsString (  )  const

Acquire the Sick LMS's status as a printable string.

Get Sick status as a string

std::string SickToolbox::SickLMS::GetSickSoftwareVersionAsString (  )  const

Acquire the Sick LMS's operating params as a printable string.

Get Sick software info as a string

std::string SickToolbox::SickLMS::GetSickConfigAsString (  )  const

Acquire the Sick LMS's config as a printable string.

Get Sick config as a string

void SickToolbox::SickLMS::PrintSickStatus (  )  const

Prints ths status of the Sick LMS 2xx unit.

Print the Sick LMS status

void SickToolbox::SickLMS::PrintSickSoftwareVersion (  )  const

Prints out relevant software versioning information.

Print the Sick LMS software versions

void SickToolbox::SickLMS::PrintSickConfig (  )  const

Prints out the Sick LMS configurations parameters.

Print the Sick LMS configuration

std::string SickToolbox::SickLMS::SickTypeToString ( const sick_lms_type_t  sick_type  )  [static]

Converts the Sick LMS type to a corresponding string.

Converts the LMS's type to a corresponding string

sick_lms_scan_angle_t SickToolbox::SickLMS::IntToSickScanAngle ( const int  scan_angle_int  )  [static]

Converts integer to corresponding Sick LMS scan angle.

A utility function for converting integers to lms_sick_scan_angle_t

sick_lms_scan_resolution_t SickToolbox::SickLMS::IntToSickScanResolution ( const int  scan_resolution_int  )  [static]

Converts integer to corresponding Sick LMS scan resolution.

A utility function for converting ints to lms_sick_scan_resolution_t

sick_lms_scan_resolution_t SickToolbox::SickLMS::DoubleToSickScanResolution ( const double  scan_resolution_double  )  [static]

Converts double to corresponding Sick LMS scan resolution.

A utility function for converting doubles to lms_sick_scan_resolution_t

std::string SickToolbox::SickLMS::SickBaudToString ( const sick_lms_baud_t  baud_rate  )  [static]

Converts Sick LMS baud to a corresponding string.

Converts the given bad, returns a string representing that baud rate.

sick_lms_baud_t SickToolbox::SickLMS::IntToSickBaud ( const int  baud_int  )  [static]

Converts integer to corresponding Sick LMS baud.

A utility function for converting integers to lms_baud_t

sick_lms_baud_t SickToolbox::SickLMS::StringToSickBaud ( const std::string  baud_str  )  [static]

Converts string to corresponding Sick LMS baud.

A utility function for converting baud strings to lms_baud_t

std::string SickToolbox::SickLMS::SickStatusToString ( const sick_lms_status_t  sick_status  )  [static]

Converts the Sick LMS 2xx status code to a string.

Converts the LMS's status to a corresponding string

std::string SickToolbox::SickLMS::SickMeasuringModeToString ( const sick_lms_measuring_mode_t  sick_measuring_mode  )  [static]

Converts the Sick measuring mode to a corresponding string.

Converts the LMS's measuring mode to a corresponding string

std::string SickToolbox::SickLMS::SickOperatingModeToString ( const sick_lms_operating_mode_t  sick_operating_mode  )  [static]

Converts the Sick operating mode to a corresponding string.

Converts the LMS's measuring mode to a corresponding string

std::string SickToolbox::SickLMS::SickSensitivityToString ( const sick_lms_sensitivity_t  sick_sensitivity  )  [static]

Converts Sick LMS 2xx sensitivity level to a corresponding string.

Converts the LMS's sensitivity to string

std::string SickToolbox::SickLMS::SickPeakThresholdToString ( const sick_lms_peak_threshold_t  sick_peak_threshold  )  [static]

Converts Sick LMS 2xx peak threshold to a corresponding string.

Converts the LMS's peak threshold to string

std::string SickToolbox::SickLMS::SickMeasuringUnitsToString ( const sick_lms_measuring_units_t  sick_units  )  [static]

Converts the Sick LMS measurement units to a corresponding string.

Converts the LMS's measuring units to a corresponding string

void SickToolbox::SickLMS::_setupConnection (  )  throw ( SickIOException, SickThreadException ) [protected, virtual]

Attempts to open a I/O stream using the device path given at object instantiation.

Opens the terminal for serial communication.

Implements SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >.

void SickToolbox::SickLMS::_teardownConnection (  )  throw ( SickIOException ) [protected, virtual]

Closes the data connection associated with the device.

Closes the serial communication terminal.

Implements SickToolbox::SickLIDAR< SICK_MONITOR_CLASS, SICK_MSG_CLASS >.

void SickToolbox::SickLMS::_sendMessageAndGetReply ( const SickLMSMessage sick_send_message,
SickLMSMessage sick_recv_message,
const unsigned int  timeout_value,
const unsigned int  num_tries 
) throw ( SickIOException, SickThreadException, SickTimeoutException ) [protected]

Sends a message and searches for the corresponding reply.

Sends a message to the LMS and get the expected reply using th 0x80 rule.

Todo:
Check difference in comments?

void SickToolbox::SickLMS::_sendMessageAndGetReply ( const SickLMSMessage sick_send_message,
SickLMSMessage sick_recv_message,
const uint8_t  reply_code,
const unsigned int  timeout_value,
const unsigned int  num_tries 
) throw ( SickIOException, SickThreadException, SickTimeoutException ) [protected]

Sends a message and searches for the reply with given reply code.

Sends a message to the LMS and get the expected reply using th 0x80 rule.

Todo:
Check difference in comments?

void SickToolbox::SickLMS::_flushTerminalBuffer (  )  throw ( SickThreadException ) [protected]

Flushes terminal I/O buffers.

Flushes the terminal I/O buffers

void SickToolbox::SickLMS::_setSessionBaud ( const sick_lms_baud_t  baud_rate  )  throw ( SickIOException, SickThreadException, SickTimeoutException ) [protected]

Sets the baud rate for the current communication session.

Sets the baud rate for communication with the LMS.

bool SickToolbox::SickLMS::_testSickBaud ( const sick_lms_baud_t  baud_rate  )  throw ( SickIOException, SickThreadException ) [protected]

Attempts to detect whether the LMS is operating at the given baud rate.

Tests communication wit the LMS at a particular baud rate.

void SickToolbox::SickLMS::_setTerminalBaud ( const sick_lms_baud_t  sick_baud  )  throw ( SickIOException, SickThreadException ) [protected]

Sets the local terminal baud rate.

Changes the terminal's baud rate.

void SickToolbox::SickLMS::_getSickType (  )  throw ( SickTimeoutException, SickIOException, SickThreadException ) [protected]

Acquires the sick device type (as a string) from the unit.

Gets the type of Sick LMS

void SickToolbox::SickLMS::_getSickConfig (  )  throw ( SickTimeoutException, SickIOException, SickThreadException ) [protected]

Acquires (and buffers) the current Sick LMS configuration from the device.

Gets the current Sick configuration settings

void SickToolbox::SickLMS::_setSickConfig ( const sick_lms_device_config_t sick_config  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException ) [protected]

Sets the current configuration in flash.

Sets the Sick configuration in flash

void SickToolbox::SickLMS::_getSickStatus (  )  throw ( SickTimeoutException, SickIOException, SickThreadException ) [protected]

Acquires (and buffers) the status of the Sick LMS 2xx.

Gets the status of the LMS

void SickToolbox::SickLMS::_getSickErrors ( unsigned int *const   num_sick_errors = NULL,
uint8_t *const  error_type_buffer = NULL,
uint8_t *const  error_num_buffer = NULL 
) throw ( SickTimeoutException, SickIOException, SickThreadException ) [protected]

Obtains any error codes from the Sick LMS.

Gets the error status of the Sick LMS

void SickToolbox::SickLMS::_setSickOpModeInstallation (  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) [protected]

Sets the device to installation mode.

Switch Sick LMS to installation mode

void SickToolbox::SickLMS::_setSickOpModeDiagnostic (  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) [protected]

Sets the device to diagnostic mode.

Switch Sick LMS to diagnostic mode

void SickToolbox::SickLMS::_setSickOpModeMonitorRequestValues (  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) [protected]

Sets the device to monitor mode and tells it to send values only upon request.

Switch Sick LMS to monitor mode (request range data)

void SickToolbox::SickLMS::_setSickOpModeMonitorStreamValues (  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) [protected]

Sets the device to monitor mode and tells it to stream measured values.

Switch Sick LMS to monitor mode (stream range)

void SickToolbox::SickLMS::_setSickOpModeMonitorStreamRangeAndReflectivity (  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) [protected]

Sets the device to monitor mode and tells it to stream both range and reflectivity values.

Switch Sick LMS to monitor mode (stream range and reflectivity)

void SickToolbox::SickLMS::_setSickOpModeMonitorStreamValuesFromPartialScan (  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) [protected]

Sets the device to monitor mode and tells it to start sending partial scans.

Switch Sick LMS to monitor mode (stream range from a partial scan)

void SickToolbox::SickLMS::_setSickOpModeMonitorStreamMeanValues ( const uint8_t  sample_size  )  throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) [protected]

Sets the device to monitor mode and tells it to send mean measured values.

Switch Sick LMS to monitor mode (stream mean measured values)

void SickToolbox::SickLMS::_setSickOpModeMonitorStreamValuesSubrange ( const uint16_t  subrange_start_index,
const uint16_t  subrange_stop_index 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) [protected]

Sets the device to monitor mode and tells it to send a measured value subrange.

Switch Sick LMS to monitor mode (stream mean measured values)

void SickToolbox::SickLMS::_setSickOpModeMonitorStreamMeanValuesSubrange ( const uint16_t  sample_size,
const uint16_t  subrange_start_index,
const uint16_t  subrange_stop_index 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) [protected]

Sets the device to monitor mode and tells it to send a mean value subrange.

Switch Sick LMS to monitor mode (stream mean measured values subrange)

void SickToolbox::SickLMS::_switchSickOperatingMode ( const uint8_t  sick_mode,
const uint8_t *const   mode_params = NULL 
) throw ( SickConfigException, SickTimeoutException, SickIOException, SickThreadException) [protected]

Attempts to switch the operating mode of the Sick LMS 2xx.

Switches the operating mode of the LMS.

void SickToolbox::SickLMS::_parseSickScanProfileB0 ( const uint8_t *const   src_buffer,
sick_lms_scan_profile_b0_t sick_scan_profile 
) const [protected]

Parses a byte sequence into a scan profile corresponding to message B0.

Parses the scan profile returned w/ message B0

void SickToolbox::SickLMS::_parseSickScanProfileB6 ( const uint8_t *const   src_buffer,
sick_lms_scan_profile_b6_t sick_scan_profile 
) const [protected]

Parses a byte sequence into a scan profile corresponding to message B6.

Parses the scan profile returned w/ message B6

void SickToolbox::SickLMS::_parseSickScanProfileB7 ( const uint8_t *const   src_buffer,
sick_lms_scan_profile_b7_t sick_scan_profile 
) const [protected]

Parses a byte sequence into a scan profile corresponding to message B7.

Parses the scan profile returned w/ message B6

void SickToolbox::SickLMS::_parseSickScanProfileBF ( const uint8_t *const   src_buffer,
sick_lms_scan_profile_bf_t sick_scan_profile 
) const [protected]

Parses a byte sequence into a scan profile corresponding to message B6.

Parses the scan profile returned w/ message BF

void SickToolbox::SickLMS::_parseSickScanProfileC4 ( const uint8_t *const   src_buffer,
sick_lms_scan_profile_c4_t sick_scan_profile 
) const [protected]

Parses a byte sequence into a scan profile corresponding to message C4.

Parses the scan profile returned w/ message C4

void SickToolbox::SickLMS::_parseSickConfigProfile ( const uint8_t *const   src_buffer,
sick_lms_device_config_t sick_device_config 
) const [protected]

Parses a byte sequence into a Sick config structure.

A function for parsing a byte sequence into a device config structure

void SickToolbox::SickLMS::_extractSickMeasurementValues ( const uint8_t *const   byte_sequence,
const uint16_t  num_measurements,
uint16_t *const  measured_values,
uint8_t *const  field_a_values = NULL,
uint8_t *const  field_b_values = NULL,
uint8_t *const  field_c_values = NULL 
) const [protected]

Extracts the measured values (w/ flags) that were returned by the device.

Acquires the bit mask to extract the field bit values returned with each range measurement

bool SickToolbox::SickLMS::_returningRealTimeIndices (  )  const [inline, protected]

Tells whether the device is returning real-time indices

bool SickToolbox::SickLMS::_validSickMeasuringUnits ( const sick_lms_measuring_units_t  sick_units  )  const [protected]

Indicates whether the given measuring units are valid/defined.

Indicates whether the given unit value is defined

bool SickToolbox::SickLMS::_validSickScanAngle ( const sick_lms_scan_angle_t  sick_scan_angle  )  const [protected]

Indicates whether the given scan angle is defined.

Indicates whether the given scan angle is defined

bool SickToolbox::SickLMS::_validSickScanResolution ( const sick_lms_scan_resolution_t  sick_scan_resolution  )  const [protected]

Indicates whether the given scan resolution is defined.

Indicates whether the given scan resolution is defined

bool SickToolbox::SickLMS::_validSickSensitivity ( const sick_lms_sensitivity_t  sick_sensitivity  )  const [protected]

Indicates whether the given sensitivity is defined.

Indicates whether the given sensitivity is defined

bool SickToolbox::SickLMS::_validSickPeakThreshold ( const sick_lms_peak_threshold_t  sick_peak_threshold  )  const [protected]

Indicates whether the given peak threshold is valid.

Indicates whether the given peak threshold is defined

bool SickToolbox::SickLMS::_validSickMeasuringMode ( const sick_lms_measuring_mode_t  sick_measuring_mode  )  const [protected]

Indicates whether the given measuring mode is defined.

Indicates whether the given sensitivity is defined

bool SickToolbox::SickLMS::_isSickLMS200 (  )  const [protected]

Indicates whether the Sick is an LMS 200.

Indicates whether the Sick LMS is type 200

bool SickToolbox::SickLMS::_isSickLMS211 (  )  const [protected]

Indicates whether the Sick is an LMS 211.

Indicates whether the Sick LMS is type 211

bool SickToolbox::SickLMS::_isSickLMS220 (  )  const [protected]

Indicates whether the Sick is an LMS 220.

Indicates whether the Sick LMS is type 220

bool SickToolbox::SickLMS::_isSickLMS221 (  )  const [protected]

Indicates whether the Sick is an LMS 221.

Indicates whether the Sick LMS is type 221

bool SickToolbox::SickLMS::_isSickLMS291 (  )  const [protected]

Indicates whether the Sick is an LMS 291.

Indicates whether the Sick LMS is type 291

bool SickToolbox::SickLMS::_isSickUnknown (  )  const [protected]

Indicates whether the Sick type is unknown.

Indicates whether the Sick LMS type is unknown

sick_lms_baud_t SickToolbox::SickLMS::_baudToSickBaud ( const int  baud_rate  )  const [protected]

Converts a termios baud to an equivalent Sick baud.

Given a baud rate as an integer, gets a LMS baud rate command.

std::string SickToolbox::SickLMS::_sickAvailabilityToString ( const uint8_t  availability_code  )  const [protected]

Converts given restart level to a corresponding string.

Given a bytecode representing Sick LMS availability, returns a corresponding string

std::string SickToolbox::SickLMS::_sickRestartToString ( const uint8_t  restart_code  )  const [protected]

Converts restart code to a corresponding string.

Given a bytecode representing Sick LMS restart mode, returns a corresponding string

std::string SickToolbox::SickLMS::_sickTemporaryFieldToString ( const uint8_t  temp_field_code  )  const [protected]

Converts Sick LMS temporary field code to a corresponding string.

Converts the LMS's temporary field value to a string

std::string SickToolbox::SickLMS::_sickSubtractiveFieldsToString ( const uint8_t  subt_field_code  )  const [protected]

Converts Sick LMS subtractive fields code to a corresponding string.

Converts the LMS's subtractive field value to a string

std::string SickToolbox::SickLMS::_sickContourFunctionToString ( const uint8_t  contour_function_code  )  const [protected]

Converts Sick LMS contour function code to a corresponding string.

Converts the LMS's contour function status code to a string

std::string SickToolbox::SickLMS::_sickVariantToString ( const unsigned int  sick_variant  )  const [protected]

Converts the Sick LMS variant to a corresponding string.

Converts the LMS's variant to a corresponding string


Member Data Documentation

const uint16_t SickToolbox::SickLMS::SICK_MAX_NUM_MEASUREMENTS = 721 [static]

Maximum number of measurements returned by the Sick LMS.

Define the maximum number of measurements

const uint8_t SickToolbox::SickLMS::SICK_FLAG_AVAILABILITY_DEFAULT = 0x00 [static]

Availability unspecified.

Define Sick LMS 2xx availability levels

const uint8_t SickToolbox::SickLMS::SICK_FLAG_AVAILABILITY_HIGH = 0x01 [static]

Highest availability (comparable to LMS types 1 to 5).

const uint8_t SickToolbox::SickLMS::SICK_FLAG_AVAILABILITY_REAL_TIME_INDICES = 0x02 [static]

Send real-time indices.

const uint8_t SickToolbox::SickLMS::SICK_FLAG_AVAILABILITY_DAZZLE_NO_EFFECT = 0x04 [static]

Dazzle evalutation has no effect on switching outputs.

std::string SickToolbox::SickLMS::_sick_device_path [protected]

A path to the device at which the sick can be accessed.

sick_lms_baud_t SickToolbox::SickLMS::_curr_session_baud [protected]

The baud rate at which to communicate with the Sick

sick_lms_baud_t SickToolbox::SickLMS::_desired_session_baud [protected]

The desired baud rate for communicating w/ the Sick

sick_lms_type_t SickToolbox::SickLMS::_sick_type [protected]

A string representing the type of device

sick_lms_operating_status_t SickToolbox::SickLMS::_sick_operating_status [protected]

The operating parameters of the device

sick_lms_software_status_t SickToolbox::SickLMS::_sick_software_status [protected]

The current software version being run on the device

sick_lms_restart_status_t SickToolbox::SickLMS::_sick_restart_status [protected]

The restart configuration of the device

sick_lms_pollution_status_t SickToolbox::SickLMS::_sick_pollution_status [protected]

The pollution measurement status

sick_lms_signal_status_t SickToolbox::SickLMS::_sick_signal_status [protected]

The signal status of the device

sick_lms_field_status_t SickToolbox::SickLMS::_sick_field_status [protected]

The field configuration for the device

sick_lms_baud_status_t SickToolbox::SickLMS::_sick_baud_status [protected]

The baud configuration of the device

sick_lms_device_config_t SickToolbox::SickLMS::_sick_device_config [protected]

The device configuration for the Sick

uint8_t SickToolbox::SickLMS::_sick_mean_value_sample_size [protected]

Used when the device is streaming mean values

uint16_t SickToolbox::SickLMS::_sick_values_subrange_start_index [protected]

Used when the device is streaming a scan subrange

uint16_t SickToolbox::SickLMS::_sick_values_subrange_stop_index [protected]

Used when the device is streaming a scan subrange

struct termios SickToolbox::SickLMS::_old_term [protected]

Stores information about the original terminal settings


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