16 #ifndef PSEN_SCAN_V2_STANDALONE_SCANNER_CONFIG_BUILDER_H 17 #define PSEN_SCAN_V2_STANDALONE_SCANNER_CONFIG_BUILDER_H 70 throw std::runtime_error(
"Scanner configuration not complete");
74 throw std::invalid_argument(
"Scanner configuration not valid");
82 if (!ip.empty() && ip !=
"auto")
130 throw std::invalid_argument(
"Scan resolution has to be between 0.1 and 10 degrees.");
161 #endif // PSEN_SCAN_V2_STANDALONE_SCANNER_CONFIG_BUILDER_H boost::optional< ScanRange > scan_range_
uint16_t host_control_port_
ScannerConfigurationBuilder & hostIP(const std::string &host_ip)
uint16_t scanner_control_port_
ScannerConfigurationBuilder & scannerIp(const std::string &scanner_ip)
boost::optional< uint32_t > scanner_ip_
ScannerConfigurationBuilder & enableDiagnostics(const bool &enable)
uint16_t convertPort(const int &port)
ScannerConfigurationBuilder & hostDataPort(const int &host_data_port)
Higher level data type storing the configuration details of the scanner like scanner IP...
bool diagnostics_enabled_
ScannerConfigurationBuilder & scannerControlPort(const int &scanner_control_port)
Root namespace in which the software components to communicate with the scanner (firmware-version: 2)...
static uint16_t convertPort(const int &port)
uint16_t scanner_data_port_
Higher level data type storing the range in which the scanner takes measurements. ...
ScannerConfigurationBuilder & hostControlPort(const int &host_control_port)
boost::optional< uint32_t > host_ip_
ScannerConfigurationBuilder & scannerDataPort(const int &scanner_data_port)
util::TenthOfDegree scan_resolution_
ScannerConfigurationBuilder & enableIntensities(const bool &enable)
Helper class to simplify/improve the construction of the psen_scan_v2_standalone::ScannerConfiguratio...
bool intensities_enabled_
ScannerConfiguration config_
ScannerConfigurationBuilder & scanRange(const ScanRange &scan_range)
ScannerConfigurationBuilder & scanResolution(const util::TenthOfDegree &scan_resolution)
ScannerConfigurationBuilder & enableFragmentedScans(const bool &enable)
ScannerConfigurationBuilder(const std::string &scanner_ip)
ScannerConfiguration build() const
Helper class representing angles in tenth of degree.