Initial standalone track core
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user