32 lines
721 B
C++
32 lines
721 B
C++
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <span>
|
|
#include <variant>
|
|
#include <vector>
|
|
|
|
#include "track_core/model.hpp"
|
|
|
|
namespace track_core {
|
|
|
|
struct DecodedScheme {
|
|
std::uint8_t id{};
|
|
Color color{Color::white()};
|
|
SchemeKind kind{SchemeKind::speed_input_time_segmented_mileage_free};
|
|
AccelerationProfile acceleration_profile{AccelerationProfile::smooth};
|
|
std::variant<
|
|
std::vector<SMSegment>,
|
|
std::vector<MTSegment>,
|
|
std::vector<STSegment>,
|
|
std::vector<RepeatedSMSegment>>
|
|
segments;
|
|
};
|
|
|
|
[[nodiscard]]
|
|
expected<DecodedScheme, TrackError> decode_scheme(
|
|
std::uint8_t id,
|
|
Color color,
|
|
std::span<const std::uint8_t> binary);
|
|
|
|
} // namespace track_core
|