First version of a possible implementation for parsing incoming packets from the reader.