flatbuffer base

This commit is contained in:
2026-03-30 16:18:21 +03:00
parent 9a4b78f272
commit d83cb7fe7b
41 changed files with 1553 additions and 491 deletions

46
flatbuffers/mem/mem.fbs Normal file
View File

@@ -0,0 +1,46 @@
namespace hmmmm.mem;
// Client → Server: read a contiguous memory region. Server responds with
// MemReadResponse carrying the same nonce as the enclosing ClientMessage.
table MemReadRequest {
device_id: uint32;
seg_id: uint32;
offset: uint32;
length: uint32;
}
// Server → Client: memory region contents at the moment of the read.
table MemReadResponse {
tclk: uint64; // virtual clock tick at time of read
device_id: uint32;
seg_id: uint32;
offset: uint32;
data: [ubyte];
}
// Client → Server: write a contiguous memory region. No response.
table MemWriteRequest {
device_id: uint32;
seg_id: uint32;
offset: uint32;
data: [ubyte];
}
// ── Unions ───────────────────────────────────────────────────────────────────
union MemClientPayload {
MemReadRequest,
MemWriteRequest,
}
table MemClientMessage {
payload: MemClientPayload;
}
union MemServerPayload {
MemReadResponse,
}
table MemServerMessage {
payload: MemServerPayload;
}