28 lines
665 B
C
28 lines
665 B
C
#ifndef ENGINE_H
|
|
#define ENGINE_H
|
|
#include "wire.h"
|
|
typedef struct {
|
|
unsigned char text[257];
|
|
size_t length;
|
|
size_t position;
|
|
int active;
|
|
int exhausted;
|
|
unsigned long good;
|
|
unsigned long bad;
|
|
int64_t sum;
|
|
} ParseSession;
|
|
typedef struct {
|
|
ParseSession session[4];
|
|
size_t shared_position;
|
|
unsigned long opened;
|
|
unsigned long closed;
|
|
unsigned long rejected;
|
|
unsigned long good;
|
|
unsigned long bad;
|
|
int64_t total;
|
|
} Engine;
|
|
void engine_init(Engine *engine);
|
|
void engine_command(Engine *engine, const Command *command, Observation *out);
|
|
void engine_snapshot(const Engine *engine, Observation *out);
|
|
#endif
|