30 #ifndef R2000_DRIVER_H 31 #define R2000_DRIVER_H 36 #include <boost/optional.hpp> 42 class HttpCommandInterface;
43 class ScanDataReceiver;
59 bool connect(
const std::string hostname,
int port=80);
136 bool setParameter(
const std::string& name,
const std::string& value );
172 #endif // R2000_DRIVER_H double watchdog_feed_time_
Last time the watchdog was fed.
ScanDataReceiver * data_receiver_
Asynchronous data receiver.
Driver for the laserscanner R2000 of Pepperl+Fuchs.
const std::map< std::string, std::string > & getParametersCached() const
Information about the HTTP/JSON protocol.
bool resetParameters(const std::vector< std::string > &names)
~R2000Driver()
Cleanly disconnect in case of destruction.
bool setSamplesPerScan(unsigned int samples)
std::size_t getScansAvailable() const
Get the total number of laserscans available (even scans which are not fully reveived yet) ...
const ProtocolInfo & getProtocolInfo()
bool setScanFrequency(unsigned int frequency)
HttpCommandInterface * command_interface_
HTTP/JSON interface of the scanner.
ProtocolInfo protocol_info_
Cached version of the protocol info.
bool isConnected()
Return connection status.
void feedWatchdog(bool feed_always=false)
Feed the watchdog with the current handle ID, to keep the data connection alive.
Normally contains one complete laserscan (a full rotation of the scanner head)
R2000Driver()
Initialize driver.
void disconnect()
Disconnect from the laserscanner and reset internal state.
Allows accessing the HTTP/JSON interface of the Pepperl+Fuchs Laserscanner R2000. ...
std::map< std::string, std::string > parameters_
Cached version of all parameter values.
bool connect(const std::string hostname, int port=80)
bool setParameter(const std::string &name, const std::string &value)
bool is_connected_
Internal connection state.
boost::optional< HandleInfo > handle_info_
Handle information about data connection.
Receives data of the laser range finder via IP socket Receives the scanner data with asynchronous fun...
std::size_t getFullScansAvailable() const
Get the total number of fully received laserscans available.
bool is_capturing_
Internal capturing state.
const std::map< std::string, std::string > & getParameters()
double food_timeout_
Feeding interval (in seconds)