TraceMaker
C++ API of the engine
Loading...
Searching...
No Matches
session.hpp File Reference

A board session an agent can drive (design doc 19, milestone M18). More...

#include <cstdint>
#include <map>
#include <memory>
#include <optional>
#include <string>
#include <vector>
#include <nlohmann/json.hpp>
#include "core/events.hpp"
#include "io/kicad/board_reader.hpp"
#include "model/board.hpp"
#include "model/rules.hpp"
#include "route/router.hpp"

Go to the source code of this file.

Classes

struct  tmk::session::SessionOptions
class  tmk::session::Session
struct  tmk::session::Session::Replay
 Runs the calls of a log written by SessionOptions::log and stops at the first result or state digest that differs. More...

Namespaces

namespace  tmk
namespace  tmk::session

Detailed Description

A board session an agent can drive (design doc 19, milestone M18).

The agent lists the open connections, asks the engine to route some nets with some hints, looks at the result, rips a net, goes back to an earlier state and saves. The engine is what it was: copper comes only from the router (every segment and via passes the exact check), a call is a transaction that is kept or not, hints are an advice file (doc 17) read by the same code, and the log of calls replays to the same bytes.

One Session::call serves every transport (MCP and JSON lines, transport.hpp). It never throws: a refused call is {"error": {"code", "message"}}.

Definition in file session.hpp.