15 #ifndef PSEN_SCAN_V2_STANDALONE_SCANNER_V2_H 16 #define PSEN_SCAN_V2_STANDALONE_SCANNER_V2_H 23 #include <boost/optional.hpp> 37 class ScannerConfiguration;
39 using std::placeholders::_1;
40 using std::placeholders::_2;
68 std::future<void>
start()
override;
71 std::future<void> stop()
override;
75 void triggerEventWithParam(
const T& event);
80 void scannerStartedCallback();
81 void scannerStoppedCallback();
82 void scannerStartErrorCallback(
const std::string& error_msg);
83 void scannerStopErrorCallback(
const std::string& error_msg);
99 std::unique_ptr<ScannerStateMachine>
sm_;
105 const std::lock_guard<std::mutex> lock(member_mutex_);
106 sm_->process_event(event);
112 triggerEventWithParam<T>(T());
117 #endif // PSEN_SCAN_V2_STANDALONE_SCANNER_V2_H std::mutex member_mutex_
This Mutex protects ALL members of the Scanner against concurrent access. So far there exist at least...
boost::optional< std::promise< void > > OptionalPromise
Higher level data type storing the configuration details of the scanner like scanner IP...
Root namespace in which the software components to communicate with the scanner (firmware-version: 2)...
Namespace for the implementation of the scanner protocol state machine.
This is the implementation of the Scanner API defined by IScanner.
std::function< void(const LaserScan &)> LaserScanCallback
Represents the user-provided callback for processing incoming scan data.
This is the API definition for external interaction with the scanner driver.
std::unique_ptr< ScannerStateMachine > sm_
void triggerEventWithParam(const T &event)