|
Regilo
A simple C++ library for controlling the Neato XV robot and the Hokuyo scanner.
|
The HokuyoController class is used to communicate with the Hokuyo scanner. More...
#include <hokuyocontroller.hpp>
Public Member Functions | |
| HokuyoController () | |
| Default constructor. | |
| HokuyoController (const std::string &logPath) | |
| Constructor with a log file specified by a path. More... | |
| HokuyoController (std::iostream &logStream) | |
| Constructor with a log specified by a stream. More... | |
| virtual | ~HokuyoController ()=default |
| Default destructor. | |
| virtual std::map< std::string, std::string > | getVersionInfo () override |
| Return information about the scanner version. More... | |
| void | setScanParameters (std::size_t fromStep, std::size_t toStep, std::size_t clusterCount) |
| Set parameters for the scan command. More... | |
Public Member Functions inherited from regilo::IHokuyoController | |
| virtual | ~IHokuyoController ()=default |
| Default destructor. | |
Public Member Functions inherited from regilo::IScanController | |
| virtual | ~IScanController ()=default |
| Default destructor. | |
Public Member Functions inherited from regilo::IController | |
| virtual | ~IController ()=default |
| Default destructor. | |
| virtual void | connect (const std::string &endpoint)=0 |
| Connect the controller to a device. More... | |
| virtual bool | isConnected () const =0 |
| Test if the controller is connected. More... | |
| virtual std::string | getEndpoint () const =0 |
| Get the endpoint of device. More... | |
| virtual std::shared_ptr< ILog > | getLog ()=0 |
| Get the current Log. More... | |
| virtual std::shared_ptr< const ILog > | getLog () const =0 |
| Get the current Log (a const variant). More... | |
| virtual void | setLog (std::shared_ptr< ILog > log)=0 |
| Set a Log (it can be shared between more controllers). More... | |
| virtual std::string | sendCommand (const std::string &command)=0 |
| Send a command to the device. More... | |
Public Member Functions inherited from regilo::ScanController< ProtocolController > | |
| virtual | ~ScanController ()=default |
| Default destructor. | |
| virtual ScanData | getScan (bool fromDevice=true) override final |
| Get a scan from the device. More... | |
Static Public Attributes | |
| static std::string | CMD_GET_VERSION = "V" |
| A command for getting the scanner version. | |
| static std::string | CMD_GET_SCAN = "G%03d%03d%02d" |
| A command for getting a scan. | |
Protected Member Functions | |
| virtual std::string | getScanCommand () const override |
| Get a string that can be used for getting a scan. More... | |
| virtual bool | parseScanData (std::istream &in, ScanData &data) override |
| Parse the raw scan data. More... | |
Additional Inherited Members | |
Protected Attributes inherited from regilo::ScanController< ProtocolController > | |
| std::size_t | lastScanId = 0 |
| A scan id (starting from zero) that is used for new scans. | |
The HokuyoController class is used to communicate with the Hokuyo scanner.
| regilo::HokuyoController< ProtocolController >::HokuyoController | ( | const std::string & | logPath | ) |
Constructor with a log file specified by a path.
| logPath | Path to the log file. |
| regilo::HokuyoController< ProtocolController >::HokuyoController | ( | std::iostream & | logStream | ) |
Constructor with a log specified by a stream.
| logStream | The log stream. |
|
inlineoverrideprotectedvirtual |
Get a string that can be used for getting a scan.
Implements regilo::ScanController< ProtocolController >.
|
overridevirtual |
Return information about the scanner version.
Implements regilo::IHokuyoController.
|
overrideprotectedvirtual |
Parse the raw scan data.
| in | The input stream that stores the raw scan data. |
| data | Output for the scanned data. |
Implements regilo::ScanController< ProtocolController >.
| void regilo::HokuyoController< ProtocolController >::setScanParameters | ( | std::size_t | fromStep, |
| std::size_t | toStep, | ||
| std::size_t | clusterCount | ||
| ) |
Set parameters for the scan command.
| fromStep | The starting step [0; maxStep]. |
| toStep | The ending steop [0; maxStep]. |
| clusterCount | The cluster count [0; 99]. |