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

Classes

struct  ConvertOptionRelation
 
class  DataConverterBase
 
class  Proto2StructConverter
 
class  ProtoDelimSerializer
 
class  ProtoDeserializer
 
class  ProtoSerializer
 
class  ProtoSerializerBase
 
class  Raw2DelimRawConverter
 
class  SerializableMsgBuffer
 
class  Struct2ProtoConverter
 
class  StructDeserializer
 

Enumerations

enum class  DataConvertOptions : uint8_t {
  none , raw , raw_frame , structure ,
  proto , proto_frame
}
 

Functions

constexpr auto convert_option_to_string (DataConvertOptions option) -> std::string_view
 
constexpr auto convert_option_has_dependency (DataConvertOptions dependee, DataConvertOptions depender) -> bool
 

Variables

constexpr auto EMPTY_CONVERT_OPTION_COUNT_MAP
 
constexpr auto CONVERT_OPTION_RELATIONS
 
const auto protobuf_delim_deserializer_converter
 
const auto protobuf_deserializer_converter
 

Enumeration Type Documentation

◆ DataConvertOptions

enum class srs::process::DataConvertOptions : uint8_t
strong
Enumerator
none 
raw 
raw_frame 
structure 
proto 
proto_frame 

Definition at line 11 of file DataConvertOptions.hpp.

Function Documentation

◆ convert_option_has_dependency()

auto srs::process::convert_option_has_dependency ( DataConvertOptions dependee,
DataConvertOptions depender ) -> bool
constexpr

Definition at line 71 of file DataConvertOptions.hpp.

◆ convert_option_to_string()

auto srs::process::convert_option_to_string ( DataConvertOptions option) -> std::string_view
constexpr

Definition at line 21 of file DataConvertOptions.hpp.

Variable Documentation

◆ CONVERT_OPTION_RELATIONS

◆ EMPTY_CONVERT_OPTION_COUNT_MAP

auto srs::process::EMPTY_CONVERT_OPTION_COUNT_MAP
constexpr
Initial value:
= []()
{
using enum DataConvertOptions;
return std::array{ std::make_pair(raw, 0),
std::make_pair(raw_frame, 0),
std::make_pair(structure, 0),
std::make_pair(proto, 0),
std::make_pair(proto_frame, 0) };
}()

Definition at line 52 of file DataConvertOptions.hpp.

◆ protobuf_delim_deserializer_converter

const auto srs::process::protobuf_delim_deserializer_converter
Initial value:
= [](const proto::Data& proto_data,
std::string& output_data) -> int
{
namespace protobuf = google::protobuf;
namespace io = protobuf::io;
auto output_stream = io::StringOutputStream{ &output_data };
{
auto option = io::GzipOutputStream::Options{};
option.compression_level = common::GZIP_DEFAULT_COMPRESSION_LEVEL;
auto gzip_output = io::GzipOutputStream{ &output_stream, option };
protobuf::util::SerializeDelimitedToZeroCopyStream(proto_data, &gzip_output);
gzip_output.Flush();
}
else
{
protobuf::util::SerializeDelimitedToZeroCopyStream(proto_data, &output_stream);
}
return 0;
}
constexpr auto GZIP_DEFAULT_COMPRESSION_LEVEL
constexpr auto PROTOBUF_ENABLE_GZIP

Definition at line 9 of file ProtoDelimSerializer.hpp.

◆ protobuf_deserializer_converter

const auto srs::process::protobuf_deserializer_converter
Initial value:
= [](const proto::Data& proto_data, std::string& output_data) -> int
{
namespace protobuf = google::protobuf;
namespace io = protobuf::io;
auto output_stream = io::StringOutputStream{ &output_data };
proto_data.SerializeToZeroCopyStream(&output_stream);
return 0;
}

Definition at line 7 of file ProtoSerializer.hpp.