35 void Poll(uint64_t frameNumber);
41 [[nodiscard]] std::expected<std::vector<sim::ProbeTableSwap>, std::string>
TakeSwaps(
42 uint64_t firstUnit, uint32_t unitCount, uint32_t unitsPerTick,
bool replaying,
bool canAddCommand,
43 uint32_t& nextSequence, std::vector<sim::ProbeCommand>& commands);
57 std::shared_ptr<const script::LoadedReactionTable>
table;
60 void Remember(
const std::shared_ptr<const script::LoadedReactionTable>& table);
61 [[nodiscard]] std::expected<void, std::string>
ScheduleReplayed(std::span<const sim::ProbeCommand> commands);
63 std::optional<script::ReactionTableHotReload>
m_reload;
64 std::map<uint64_t, std::shared_ptr<const script::LoadedReactionTable>>
m_known;
65 std::shared_ptr<const script::LoadedReactionTable>
m_waiting;
67 std::vector<std::shared_ptr<const script::LoadedReactionTable>>
const std::string & LastMessage() const
std::vector< Scheduled > m_scheduled
std::map< uint64_t, std::shared_ptr< const script::LoadedReactionTable > > m_known
void Poll(uint64_t frameNumber)
uint64_t m_appliedVersion
std::expected< std::vector< sim::ProbeTableSwap >, std::string > TakeSwaps(uint64_t firstUnit, uint32_t unitCount, uint32_t unitsPerTick, bool replaying, bool canAddCommand, uint32_t &nextSequence, std::vector< sim::ProbeCommand > &commands)
uint32_t AppliedCount() const
std::optional< script::ReactionTableHotReload > m_reload
std::string m_lastMessage
void Remember(const std::shared_ptr< const script::LoadedReactionTable > &table)
uint64_t AppliedVersion() const
TableHotReload(script::ReactionTableSource source, std::shared_ptr< const script::LoadedReactionTable > initial, bool watch)
std::shared_ptr< const script::LoadedReactionTable > m_waiting
uint32_t FailedCount() const
std::expected< void, std::string > ScheduleReplayed(std::span< const sim::ProbeCommand > commands)
std::vector< std::shared_ptr< const script::LoadedReactionTable > > m_inFlight
std::shared_ptr< const script::LoadedReactionTable > table