vt100/src/session.h

session

1/* The whole installation: the simulated machine, the console program on the PDP-11, the serial2 * line and the VT100 on the operator's desk. Used by the web build and by the tests. */3#pragma once4#include "console.h"5#include "serial.h"6#include "vt100.h"78enum { HAND_FIELD_LIGHT, HAND_SET };910typedef struct session {11  HsStablePtr machine;12  vt100 term;13  serial_line to_term, to_host;14  console con;15  double now;16} session;1718/* baud 0: characters arrive instantly */19void session_init(session *s, int baud, double now_ms);20void session_step(session *s, double now_ms, long long local_epoch_s);21void session_key(session *s, int key, bool down, double now_ms);22/* the hand control in the treatment room talks to the machine, not to the console */23void session_hand(session *s, int button);24void session_power_cycle(session *s);