SRS-control 0.1.4
Loading...
Searching...
No Matches
srs::process::StructDeserializer Class Reference

#include <StructDeserializer.hpp>

Collaboration diagram for srs::process::StructDeserializer:

Public Types

using DataElementType = std::bitset<common::HIT_DATA_BIT_LENGTH>
using ReceiveDataSquence = std::vector<DataElementType>
Public Types inherited from srs::process::BaseTask< std::string_view, const StructData * >
using InputType
using OutputType
using RunResult

Public Member Functions

 StructDeserializer (size_t n_lines=1)
auto operator() (std::size_t line_number=0) const -> OutputType
auto run (const OutputTo< InputType > auto &prev_data_converter, std::size_t line_number=0) -> RunResult
Public Member Functions inherited from srs::process::ConverterTask< DataConvertOptions::structure, std::string_view, const StructData * >
 ConverterTask (std::string_view name, DataConvertOptions prev_convert, std::size_t n_lines=1)
Public Member Functions inherited from srs::process::BaseTask< std::string_view, const StructData * >
 BaseTask (std::string_view name, DataConvertOptions prev_convert, std::size_t n_lines=1)
auto get_n_lines () const -> std::size_t
auto get_required_conversion () const -> DataConvertOptions
auto get_name () const -> std::string_view
auto get_name_str () const -> std::string

Static Private Member Functions

static auto convert (std::string_view binary_data, StructData &output, ReceiveDataSquence &body_part_data) -> std::expected< std::size_t, std::string_view >
static void translate_raw_data (StructData &struct_data, ReceiveDataSquence &receive_raw_data)
static void byte_reverse_data_sq (ReceiveDataSquence &receive_raw_data)
static auto check_is_hit (const DataElementType &element) -> bool

Private Attributes

std::vector< ReceiveDataSquenceraw_body_part_data_
std::vector< StructDataoutput_data_

Additional Inherited Members

Static Public Attributes inherited from srs::process::ConverterTask< DataConvertOptions::structure, std::string_view, const StructData * >
static constexpr auto converter_type

Detailed Description

Definition at line 27 of file StructDeserializer.hpp.

Member Typedef Documentation

◆ DataElementType

◆ ReceiveDataSquence

Constructor & Destructor Documentation

◆ StructDeserializer()

srs::process::StructDeserializer::StructDeserializer ( size_t n_lines = 1)
explicit

Definition at line 83 of file StructDeserializer.cpp.

Member Function Documentation

◆ byte_reverse_data_sq()

void srs::process::StructDeserializer::byte_reverse_data_sq ( ReceiveDataSquence & receive_raw_data)
staticprivate

Definition at line 137 of file StructDeserializer.cpp.

◆ check_is_hit()

auto srs::process::StructDeserializer::check_is_hit ( const DataElementType & element) ->bool
inlinestaticprivate

Definition at line 59 of file StructDeserializer.hpp.

◆ convert()

auto srs::process::StructDeserializer::convert ( std::string_view binary_data,
StructData & output,
ReceiveDataSquence & body_part_data )->std::expected< std::size_t, std::string_view >
staticprivate

Definition at line 91 of file StructDeserializer.cpp.

◆ operator()()

auto srs::process::StructDeserializer::operator() ( std::size_t line_number = 0) const->OutputType
inlinenodiscard

Definition at line 34 of file StructDeserializer.hpp.

◆ run()

auto srs::process::StructDeserializer::run ( const OutputTo< InputType > auto & prev_data_converter,
std::size_t line_number = 0 )->RunResult
inline

Definition at line 40 of file StructDeserializer.hpp.

◆ translate_raw_data()

void srs::process::StructDeserializer::translate_raw_data ( StructData & struct_data,
ReceiveDataSquence & receive_raw_data )
staticprivate

Definition at line 120 of file StructDeserializer.cpp.

Member Data Documentation

◆ output_data_

std::vector<StructData> srs::process::StructDeserializer::output_data_
private

Definition at line 53 of file StructDeserializer.hpp.

◆ raw_body_part_data_

std::vector<ReceiveDataSquence> srs::process::StructDeserializer::raw_body_part_data_
private

Definition at line 52 of file StructDeserializer.hpp.


The documentation for this class was generated from the following files: