Robotics Library  0.7.0
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
rl::hal::SchmersalLss300 Class Reference

Schmersal LSS 300 safety laser scanner. More...

#include <SchmersalLss300.h>

Inheritance diagram for rl::hal::SchmersalLss300:
Inheritance graph
[legend]

Public Types

enum  BaudRate { BAUDRATE_9600BPS, BAUDRATE_19200BPS, BAUDRATE_38400BPS, BAUDRATE_57600BPS }
 
enum  Monitoring { MONITORING_CONTINUOUS, MONITORING_SINGLE }
 

Public Member Functions

 SchmersalLss300 (const ::std::string &device="/dev/ttyS0", const BaudRate &baudRate=BAUDRATE_9600BPS, const Monitoring &monitoring=MONITORING_SINGLE, const ::std::string &password="PASS_LSS")
 
virtual ~SchmersalLss300 ()
 
void close ()
 
BaudRate getBaudRate () const
 
::rl::math::Vector getDistances () const
 
::std::size_t getDistancesCount () const
 
::rl::math::Real getDistancesMaximum (const ::std::size_t &i) const
 
::rl::math::Real getDistancesMinimum (const ::std::size_t &i) const
 
Monitoring getMonitoring () const
 
::rl::math::Real getResolution () const
 
::rl::math::Real getStartAngle () const
 
::rl::math::Real getStopAngle () const
 
::std::string getType ()
 
void open ()
 
void reset ()
 
void setBaudRate (const BaudRate &baudRate)
 
void setMonitoring (const Monitoring &monitoring)
 
void start ()
 
void step ()
 
void stop ()
 
- Public Member Functions inherited from rl::hal::CyclicDevice
 CyclicDevice (const ::std::chrono::nanoseconds &updateRate)
 
virtual ~CyclicDevice ()
 
virtual ::std::chrono::nanoseconds getUpdateRate () const
 
- Public Member Functions inherited from rl::hal::Device
 Device ()
 
virtual ~Device ()
 
bool isConnected () const
 
bool isRunning () const
 
- Public Member Functions inherited from rl::hal::Lidar
 Lidar ()
 
virtual ~Lidar ()
 
- Public Member Functions inherited from rl::hal::RangeSensor
 RangeSensor ()
 
virtual ~RangeSensor ()
 

Private Member Functions

::std::uint16_t crc (const ::std::uint8_t *buf, const ::std::size_t &len) const
 
::std::size_t recv (::std::uint8_t *buf, const ::std::size_t &len, const ::std::uint8_t &command)
 
void send (::std::uint8_t *buf, const ::std::size_t &len)
 
bool waitAck ()
 

Private Attributes

BaudRate baudRate
 
::std::array< ::std::uint8_t, 1013 > data
 
BaudRate desired
 
Monitoring monitoring
 
::std::string password
 
Serial serial
 

Additional Inherited Members

- Protected Member Functions inherited from rl::hal::Device
void setConnected (const bool &connected)
 
void setRunning (const bool &running)
 

Detailed Description

Schmersal LSS 300 safety laser scanner.

Member Enumeration Documentation

◆ BaudRate

Enumerator
BAUDRATE_9600BPS 

9,600 bps.

BAUDRATE_19200BPS 

19,200 bps.

BAUDRATE_38400BPS 

38,400 bps.

BAUDRATE_57600BPS 

57,600 bps.

◆ Monitoring

Enumerator
MONITORING_CONTINUOUS 
MONITORING_SINGLE 

Constructor & Destructor Documentation

◆ SchmersalLss300()

rl::hal::SchmersalLss300::SchmersalLss300 ( const ::std::string &  device = "/dev/ttyS0",
const BaudRate baudRate = BAUDRATE_9600BPS,
const Monitoring monitoring = MONITORING_SINGLE,
const ::std::string &  password = "PASS_LSS" 
)
Parameters
[in]passwordString with 8 characters comprising "0...9", "a...z", "A...Z", and "_".

◆ ~SchmersalLss300()

rl::hal::SchmersalLss300::~SchmersalLss300 ( )
virtual

Member Function Documentation

◆ close()

void rl::hal::SchmersalLss300::close ( )
virtual
Precondition
stop()

Implements rl::hal::Device.

◆ crc()

std::uint16_t rl::hal::SchmersalLss300::crc ( const ::std::uint8_t *  buf,
const ::std::size_t &  len 
) const
private

◆ getBaudRate()

SchmersalLss300::BaudRate rl::hal::SchmersalLss300::getBaudRate ( ) const

◆ getDistances()

rl::math::Vector rl::hal::SchmersalLss300::getDistances ( ) const
virtual
Parameters
[out]distances[m]

Implements rl::hal::RangeSensor.

◆ getDistancesCount()

std::size_t rl::hal::SchmersalLss300::getDistancesCount ( ) const
virtual

Implements rl::hal::RangeSensor.

◆ getDistancesMaximum()

rl::math::Real rl::hal::SchmersalLss300::getDistancesMaximum ( const ::std::size_t &  i) const
virtual
Returns
[m]

Implements rl::hal::RangeSensor.

◆ getDistancesMinimum()

rl::math::Real rl::hal::SchmersalLss300::getDistancesMinimum ( const ::std::size_t &  i) const
virtual
Returns
[m]

Implements rl::hal::RangeSensor.

◆ getMonitoring()

SchmersalLss300::Monitoring rl::hal::SchmersalLss300::getMonitoring ( ) const

◆ getResolution()

rl::math::Real rl::hal::SchmersalLss300::getResolution ( ) const
virtual

Implements rl::hal::Lidar.

◆ getStartAngle()

rl::math::Real rl::hal::SchmersalLss300::getStartAngle ( ) const
virtual

Implements rl::hal::Lidar.

◆ getStopAngle()

rl::math::Real rl::hal::SchmersalLss300::getStopAngle ( ) const
virtual

Implements rl::hal::Lidar.

◆ getType()

std::string rl::hal::SchmersalLss300::getType ( )

◆ open()

void rl::hal::SchmersalLss300::open ( )
virtual

Implements rl::hal::Device.

◆ recv()

std::size_t rl::hal::SchmersalLss300::recv ( ::std::uint8_t *  buf,
const ::std::size_t &  len,
const ::std::uint8_t &  command 
)
private

◆ reset()

void rl::hal::SchmersalLss300::reset ( )

◆ send()

void rl::hal::SchmersalLss300::send ( ::std::uint8_t *  buf,
const ::std::size_t &  len 
)
private

◆ setBaudRate()

void rl::hal::SchmersalLss300::setBaudRate ( const BaudRate baudRate)

◆ setMonitoring()

void rl::hal::SchmersalLss300::setMonitoring ( const Monitoring monitoring)

◆ start()

void rl::hal::SchmersalLss300::start ( )
virtual
Precondition
open()

Implements rl::hal::Device.

◆ step()

void rl::hal::SchmersalLss300::step ( )
virtual
Precondition
start()

Implements rl::hal::CyclicDevice.

◆ stop()

void rl::hal::SchmersalLss300::stop ( )
virtual
Precondition
open()

Implements rl::hal::Device.

◆ waitAck()

bool rl::hal::SchmersalLss300::waitAck ( )
private

Member Data Documentation

◆ baudRate

BaudRate rl::hal::SchmersalLss300::baudRate
private

◆ data

::std::array< ::std::uint8_t, 1013> rl::hal::SchmersalLss300::data
private

◆ desired

BaudRate rl::hal::SchmersalLss300::desired
private

◆ monitoring

Monitoring rl::hal::SchmersalLss300::monitoring
private

◆ password

::std::string rl::hal::SchmersalLss300::password
private

◆ serial

Serial rl::hal::SchmersalLss300::serial
private

The documentation for this class was generated from the following files: