diff options
Diffstat (limited to 'library/src/memory.cpp')
-rw-r--r-- | library/src/memory.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/library/src/memory.cpp b/library/src/memory.cpp new file mode 100644 index 0000000..c3c5b2a --- /dev/null +++ b/library/src/memory.cpp @@ -0,0 +1,25 @@ +#include "hwd.h" + +#include <cstddef> +#include <vector> + +#include "client.h" + + +namespace hwd +{ +namespace memory +{ + +std::vector<char> read(std::size_t len, std::size_t off) +{ + return get_client().call("memory/read", len, off).as<std::vector<char>>(); +} + +bool write(const std::vector<char> data, std::size_t off) +{ + return get_client().call("memory/write", data, off).as<bool>(); +} + +} // namespace memory +} // namespace hwd |