flatbuffer base
This commit is contained in:
46
flatbuffers/mem/mem.fbs
Normal file
46
flatbuffers/mem/mem.fbs
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user