message EcosKernelTestProtoMsg {
	// Input: experiment parameters
	// (client executes 8 experiments, one for each bit at mem_addr)

	// EDM/ERM variant
	required string variant = 1;
	// benchmark
	required string benchmark = 2;

	// equivalence class start (for storage)
	required int32 instr1_offset = 3;
	// FI at #instructions from experiment start
	required int32 instr2_offset = 4;
	// the exact IP value at this point in time (from golden run)
	optional int32 instr2_address = 5; // for sanity checks
	// address of the byte to inject bit-flips
	required int32 mem_addr = 6;

	// ----------------------------------------------------

	// Output: experiment results

	// IP where we did the injection: for debugging purposes, must be identical
	// to instr_address
	optional int32 injection_ip = 7;

	enum FaultModel {
		SINGLEBITFLIP = 1;
		BURST = 2;
	}
	optional FaultModel faultmodel = 10;

	repeated group Result = 8 {
		// single experiment bit offset
		required int32 bit_offset = 1;

		// result type:
		// FINISHED = planned number of instructions were executed
		// TRAP = premature guest "crash"
		// OUTSIDE = IP left text segment
		enum ResultType {
			FINISHED = 1;
			TRAP = 2;
			OUTSIDE = 3;
			DETECTED = 4;
			TIMEOUT = 5;
			MEMORYACCESS = 6;
			UNKNOWN = 7;
		}
		required ResultType resulttype = 2;

		// especially interesting for TRAP/UNKNOWN: latest IP
		required uint32 latest_ip = 3;

		// test results
		enum EcosTestResultType {
			PASS = 1;
			FAIL = 2;
		}
		required EcosTestResultType ecos_test_result = 4;

		// did ECC correct the fault?
		optional int32 error_corrected = 6;

		// optional textual description of what happened
		optional string details = 7;
	}

	// aggregated runtime for this job (FIXME: this should be part of the basic campaign communication instead)
	optional float runtime = 9;
}
