33 lines
877 B
Plaintext
33 lines
877 B
Plaintext
namespace hmmmm.stream;
|
|
|
|
enum StreamMode: byte {
|
|
mode_read = 0,
|
|
mode_write = 1,
|
|
}
|
|
|
|
// Client → Server: subscribe to a memory region.
|
|
table StreamRegRequest {
|
|
device_id: uint32; // from DeviceIdMappingNotif
|
|
seg_id: uint32; // from DeviceIdMappingNotif
|
|
offset: uint32; // start offset within segment, in bytes
|
|
length: uint32; // region length, in bytes
|
|
mode: StreamMode;
|
|
}
|
|
|
|
// Client → Server: cancel a stream subscription.
|
|
// No confirmation is sent by the server.
|
|
table StreamDeregRequest {
|
|
stream_id: uint32;
|
|
}
|
|
|
|
// Server → Client: subscription confirmed, stream_id assigned.
|
|
// Echoes the original request fields for client-side reconciliation.
|
|
table StreamRegConfirm {
|
|
stream_id: uint32;
|
|
device_id: uint32;
|
|
seg_id: uint32;
|
|
offset: uint32;
|
|
length: uint32;
|
|
mode: StreamMode;
|
|
}
|