yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
mesen_handlers.cc File Reference
#include "cli/handlers/mesen_handlers.h"
#include <algorithm>
#include <cctype>
#include <charconv>
#include <chrono>
#include <cstdlib>
#include <filesystem>
#include <fstream>
#include <sstream>
#include <thread>
#include <unordered_map>
#include "absl/flags/declare.h"
#include "absl/flags/flag.h"
#include "absl/strings/numbers.h"
#include "absl/strings/str_format.h"
#include "absl/strings/str_join.h"
#include "absl/time/clock.h"
#include "absl/time/time.h"
#include "app/emu/mesen/mesen_client_registry.h"
#include "nlohmann/json.hpp"
#include "util/rom_hash.h"

Go to the source code of this file.

Classes

struct  yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::EmulatorAgentSessionState
 
struct  yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::SavestateFreshnessResult
 

Namespaces

namespace  yaze
 
namespace  yaze::cli
 Namespace for the command line interface.
 
namespace  yaze::cli::handlers
 
namespace  yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}
 

Functions

 ABSL_DECLARE_FLAG (std::string, mesen_socket)
 
EmulatorAgentSessionStateyaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::SessionState ()
 
void yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::ResetSessionState ()
 
void yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::UpdateSessionFromRuntime (const std::shared_ptr< emu::mesen::MesenSocketClient > &client)
 
int yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::ClampTimeoutMs (int timeout_ms)
 
int yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::ClampPollMs (int poll_ms)
 
std::string yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::DefaultMetaPathForState (const std::string &state_path)
 
::absl::Status yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::EnsureFileExists (const std::string &path, const char *label_for_errors)
 
::absl::StatusOr< nlohmann::json > yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::LoadJsonFile (const std::string &path)
 
::absl::Status yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::WriteJsonFile (const std::string &path, const nlohmann::json &j)
 
std::string yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::OptionalScenario (const resources::ArgumentParser &parser)
 
::absl::StatusOr< SavestateFreshnessResultyaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::ComputeSavestateFreshness (const std::string &state_path, const std::string &rom_path, const std::string &meta_path, const std::string &expected_scenario)
 
void yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::AddSavestateFreshnessFields (resources::OutputFormatter &formatter, const SavestateFreshnessResult &result)
 
::absl::StatusOr< nlohmann::json > yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::BuildSavestateMetadata (const std::string &state_path, const std::string &rom_path, const std::string &scenario, const std::string &generator_name)
 
::absl::StatusOr< std::filesystem::path > yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::FindLatestStateFileInDir (const std::filesystem::path &states_dir)
 
::absl::Status yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::ExportSessionStateToFile (const std::string &file_path)
 
::absl::Status yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::ImportSessionStateFromFile (const std::string &file_path)
 
::absl::Status yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::EnsureConnected ()
 
::absl::StatusOr< int > yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::ParseOptionalInt (const resources::ArgumentParser &parser, const std::string &name, int default_value)
 
std::vector< uint8_t > yaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::ParseHexBytes (const std::string &data_str)
 
::absl::StatusOr< emu::mesen::CpuStateyaze::cli::handlers::anonymous_namespace{mesen_handlers.cc}::PollCpuStateWithDeadline (const std::shared_ptr< emu::mesen::MesenSocketClient > &client, ::absl::Time deadline)
 
::absl::Status yaze::cli::handlers::AddSessionFields (resources::OutputFormatter &formatter)
 
std::vector< std::unique_ptr< resources::CommandHandler > > yaze::cli::handlers::CreateMesenCommandHandlers ()
 Factory function to create Mesen2 command handlers.
 

Function Documentation

◆ ABSL_DECLARE_FLAG()

ABSL_DECLARE_FLAG ( std::string ,
mesen_socket  )