Namespaces | Classes | Typedefs | Functions | Variables
psen_scan_v2_standalone::data_conversion_layer Namespace Reference

Contains the data serialization and deserialization layer. More...

Namespaces

 monitoring_frame
 Namespace containing all things about the MonitoringFrame data strucure.
 
 raw_processing
 Contains functions, etc. needed to transform higher level data to raw data (sent to or received from scanner) or vice versa.
 
 scanner_reply
 Contains all things needed to define and implement a data_conversion_layer::scanner_reply::Message.
 
 start_request
 Contains all things needed to define and implement a data_conversion_layer::start_request::Message.
 
 stop_request
 Contains all things needed to define and implement a scanner stop request.
 

Classes

class  LaserScanConverter
 : Responsible for converting Monitoring frames into LaserScan messages. More...
 
class  ScannerProtocolViolationError
 : Exception thrown if data received from the scanner hardware could not be processed according to protocol. More...
 

Typedefs

using RawData = std::vector< char >
 
using RawDataConstPtr = std::shared_ptr< const RawData >
 
using RawDataPtr = std::shared_ptr< RawData >
 

Functions

uint32_t calculateCRC (const data_conversion_layer::RawData &data)
 
static constexpr double degreeToRadian (const double &angle_in_degree)
 
static int16_t degreeToTenthDegree (const double &angle_in_degree)
 
static std::vector< PinStategenerateChangedInputStates (const monitoring_frame::io::PinData &new_state, const monitoring_frame::io::PinData &old_state)
 
static std::vector< PinStategenerateChangedOutputStates (const monitoring_frame::io::PinData &new_state, const monitoring_frame::io::PinData &old_state)
 
static PinState generateInputPinState (const monitoring_frame::io::PinData &pin_data, std::size_t byte_location, std::size_t bit_location)
 
static std::vector< PinStategenerateInputPinStates (const monitoring_frame::io::PinData &pin_data)
 
static PinState generateOutputPinState (const monitoring_frame::io::PinData &pin_data, std::size_t byte_location, std::size_t bit_location)
 
static std::vector< PinStategenerateOutputPinStates (const monitoring_frame::io::PinData &pin_data)
 
static bool isUsedInputBit (std::size_t byte_n, std::size_t bit_n)
 
static bool isUsedOutputBit (std::size_t byte_n, std::size_t bit_n)
 
static constexpr double radianToDegree (const double &angle_in_rad)
 
static int16_t radToTenthDegree (const double &angle_in_rad)
 
static constexpr double tenthDegreeToRad (const int16_t &angle_in_tenth_degree)
 

Variables

static constexpr std::size_t MAX_UDP_PAKET_SIZE { 65507 }
 

Detailed Description

Contains the data serialization and deserialization layer.

Namespace defining all information/types needed to describe a monitoring frame.

The scanner splits up a full rotation in several parts and sends them in separate parts and sends them via UDP packages. Those parts are called monitoring frames.

Every single frame has to contain some general information about the scan in the fixed fields and can contain additional data like distances or intensities in additional fields.

See also
data_conversion_layer::monitoring_frame::FixedFields
data_conversion_layer::monitoring_frame::AdditionalFieldHeader
data_conversion_layer::monitoring_frame::AdditionalFieldHeaderID
protocol_layer::ScanValidator

Typedef Documentation

◆ RawData

Definition at line 25 of file raw_scanner_data.h.

◆ RawDataConstPtr

Definition at line 28 of file raw_scanner_data.h.

◆ RawDataPtr

Definition at line 27 of file raw_scanner_data.h.

Function Documentation

◆ calculateCRC()

uint32_t psen_scan_v2_standalone::data_conversion_layer::calculateCRC ( const data_conversion_layer::RawData data)

Definition at line 45 of file start_request_serialization.cpp.

◆ degreeToRadian()

static constexpr double psen_scan_v2_standalone::data_conversion_layer::degreeToRadian ( const double &  angle_in_degree)
inlinestaticconstexpr

Definition at line 33 of file angle_conversions.h.

◆ degreeToTenthDegree()

static int16_t psen_scan_v2_standalone::data_conversion_layer::degreeToTenthDegree ( const double &  angle_in_degree)
inlinestatic

Definition at line 38 of file angle_conversions.h.

◆ generateChangedInputStates()

static std::vector<PinState> psen_scan_v2_standalone::data_conversion_layer::generateChangedInputStates ( const monitoring_frame::io::PinData new_state,
const monitoring_frame::io::PinData old_state 
)
inlinestatic

Definition at line 90 of file io_state_conversions.h.

◆ generateChangedOutputStates()

static std::vector<PinState> psen_scan_v2_standalone::data_conversion_layer::generateChangedOutputStates ( const monitoring_frame::io::PinData new_state,
const monitoring_frame::io::PinData old_state 
)
inlinestatic

Definition at line 108 of file io_state_conversions.h.

◆ generateInputPinState()

static PinState psen_scan_v2_standalone::data_conversion_layer::generateInputPinState ( const monitoring_frame::io::PinData pin_data,
std::size_t  byte_location,
std::size_t  bit_location 
)
inlinestatic

Definition at line 28 of file io_state_conversions.h.

◆ generateInputPinStates()

static std::vector<PinState> psen_scan_v2_standalone::data_conversion_layer::generateInputPinStates ( const monitoring_frame::io::PinData pin_data)
inlinestatic

Definition at line 58 of file io_state_conversions.h.

◆ generateOutputPinState()

static PinState psen_scan_v2_standalone::data_conversion_layer::generateOutputPinState ( const monitoring_frame::io::PinData pin_data,
std::size_t  byte_location,
std::size_t  bit_location 
)
inlinestatic

Definition at line 37 of file io_state_conversions.h.

◆ generateOutputPinStates()

static std::vector<PinState> psen_scan_v2_standalone::data_conversion_layer::generateOutputPinStates ( const monitoring_frame::io::PinData pin_data)
inlinestatic

Definition at line 74 of file io_state_conversions.h.

◆ isUsedInputBit()

static bool psen_scan_v2_standalone::data_conversion_layer::isUsedInputBit ( std::size_t  byte_n,
std::size_t  bit_n 
)
inlinestatic

Definition at line 46 of file io_state_conversions.h.

◆ isUsedOutputBit()

static bool psen_scan_v2_standalone::data_conversion_layer::isUsedOutputBit ( std::size_t  byte_n,
std::size_t  bit_n 
)
inlinestatic

Definition at line 52 of file io_state_conversions.h.

◆ radianToDegree()

static constexpr double psen_scan_v2_standalone::data_conversion_layer::radianToDegree ( const double &  angle_in_rad)
inlinestaticconstexpr

Definition at line 28 of file angle_conversions.h.

◆ radToTenthDegree()

static int16_t psen_scan_v2_standalone::data_conversion_layer::radToTenthDegree ( const double &  angle_in_rad)
inlinestatic

Definition at line 51 of file angle_conversions.h.

◆ tenthDegreeToRad()

static constexpr double psen_scan_v2_standalone::data_conversion_layer::tenthDegreeToRad ( const int16_t &  angle_in_tenth_degree)
inlinestaticconstexpr

Definition at line 56 of file angle_conversions.h.

Variable Documentation

◆ MAX_UDP_PAKET_SIZE

constexpr std::size_t psen_scan_v2_standalone::data_conversion_layer::MAX_UDP_PAKET_SIZE { 65507 }
staticconstexpr

Definition at line 26 of file raw_scanner_data.h.



psen_scan_v2
Author(s): Pilz GmbH + Co. KG
autogenerated on Sat Nov 25 2023 03:46:26