From 354c587399d21abf0b8ae36e7894d95277798cd2 Mon Sep 17 00:00:00 2001 From: Nomi Date: Mon, 25 Sep 2023 13:35:25 +0200 Subject: [PATCH] Add buffer type --- include/ipc.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/include/ipc.hpp b/include/ipc.hpp index 1fb99591..8481ae05 100644 --- a/include/ipc.hpp +++ b/include/ipc.hpp @@ -2,12 +2,19 @@ #include namespace IPC { + namespace BufferType { + enum : std::uint32_t { + Send = 1, + Receive, + }; + } + constexpr std::uint32_t responseHeader(std::uint32_t commandID, std::uint32_t normalResponses, std::uint32_t translateResponses) { // TODO: Maybe validate the response count stuff fits in 6 bits return (commandID << 16) | (normalResponses << 6) | translateResponses; } - constexpr std::uint32_t pointerHeader(std::uint32_t index, std::uint32_t size) { - return (size << 14) | (index << 10) | 2; + constexpr std::uint32_t pointerHeader(std::uint32_t index, std::uint32_t size, std::uint32_t type) { + return (size << 14) | (index << 10) | (type << 1); } } \ No newline at end of file