ported basic packet encoding, should update the header includes after configurated Cmake