Go to the documentation of this file.
16 #ifndef PSEN_SCAN_V2_STANDALONE_SCANNER_CONFIG_BUILDER_H
17 #define PSEN_SCAN_V2_STANDALONE_SCANNER_CONFIG_BUILDER_H
72 throw std::runtime_error(
"Scanner configuration not complete");
76 throw std::invalid_argument(
"Scanner configuration not valid");
84 if (!ip.empty() && ip !=
"auto")
132 throw std::invalid_argument(
"Scan resolution has to be between 0.1 and 10 degrees.");
160 throw std::invalid_argument(
"No more than 3 subscribers are supported.");
173 #endif // PSEN_SCAN_V2_STANDALONE_SCANNER_CONFIG_BUILDER_H
ScannerConfigurationBuilder & hostIP(const std::string &host_ip)
ScannerConfigurationBuilder(const std::string &scanner_ip)
ScannerConfigurationBuilder & nrSubscribers(const uint8_t &nr_subscribers)
uint16_t scanner_control_port_
static const int MAX_NR_SUBSCRIBERS
ScannerConfigurationBuilder & enableDiagnostics(const bool &enable)
boost::optional< uint32_t > scanner_ip_
ScannerConfiguration config_
static uint16_t convertPort(const int &port)
ScannerConfigurationBuilder & scanRange(const ScanRange &scan_range)
boost::optional< uint32_t > host_ip_
ScannerConfigurationBuilder & scanResolution(const util::TenthOfDegree &scan_resolution)
bool diagnostics_enabled_
ScannerConfiguration build() const
ScannerConfigurationBuilder & scannerDataPort(const int &scanner_data_port)
ScannerConfigurationBuilder & scannerIp(const std::string &scanner_ip)
ScannerConfigurationBuilder & enableIntensities(const bool &enable)
ScannerConfigurationBuilder & scannerControlPort(const int &scanner_control_port)
util::TenthOfDegree scan_resolution_
uint16_t convertPort(const int &port)
uint16_t scanner_data_port_
Helper class to simplify/improve the construction of the psen_scan_v2_standalone::ScannerConfiguratio...
Root namespace in which the software components to communicate with the scanner (firmware-version: 2)...
boost::optional< ScanRange > scan_range_
Higher level data type storing the range in which the scanner takes measurements.
ScannerConfigurationBuilder & enableFragmentedScans(const bool &enable)
uint16_t host_control_port_
ScannerConfigurationBuilder & hostDataPort(const int &host_data_port)
Helper class representing angles in tenth of degree.
bool intensities_enabled_
ScannerConfigurationBuilder & hostControlPort(const int &host_control_port)
Higher level data type storing the configuration details of the scanner like scanner IP,...
psen_scan_v2
Author(s): Pilz GmbH + Co. KG
autogenerated on Sat Jun 22 2024 02:46:12