From 38327130096825d56cbc4f831bbda9212130c7eb Mon Sep 17 00:00:00 2001 From: Benjamin Reese Date: Tue, 15 Oct 2024 12:44:35 -0700 Subject: [PATCH] Add readBa method --- include/rogue/interfaces/stream/Frame.h | 10 ++++++++++ src/rogue/interfaces/stream/Frame.cpp | 19 ++++++++++++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/include/rogue/interfaces/stream/Frame.h b/include/rogue/interfaces/stream/Frame.h index 396d0d537..3334535bc 100644 --- a/include/rogue/interfaces/stream/Frame.h +++ b/include/rogue/interfaces/stream/Frame.h @@ -327,6 +327,7 @@ class Frame : public rogue::EnableSharedFromThisreadPy(byteArray, offset); + + return byteArray; +} + + //! Write python buffer to frame, starting at offset. Python Version void ris::Frame::writePy(boost::python::object p, uint32_t offset) { Py_buffer pyBuf; @@ -514,6 +529,8 @@ void ris::Frame::setup_python() { .def("getPayload", &ris::Frame::getPayload) .def("read", &ris::Frame::readPy, ( bp::arg("offset")=0)) + .def("readBa", &ris::Frame::readBytearrayPy, ( + bp::arg("offset")=0)) .def("write", &ris::Frame::writePy, ( bp::arg("offset")=0)) .def("setError", &ris::Frame::setError)