diff --git a/inc/Message.hpp b/inc/Message.hpp index 83c9172732b2ca62b29946699d6e9fccb1b0f1b1..3c6cfe3a73b073167f751f676e4af11be667add9 100644 --- a/inc/Message.hpp +++ b/inc/Message.hpp @@ -466,6 +466,16 @@ public: return size; // Return the string size } + /** + * @brief Skip read bytes in the read string + * @details Skips the provided number of bytes, by incrementing the readPosition and this is + * done to avoid accessing the `readPosition` variable directly + * @param numberOfBytes The number of bytes to be skipped + */ + void skipBytes(uint16_t numberOfBytes) { + readPosition += numberOfBytes; + } + /** * Reset the message reading status, and start reading data from it again */