diff --git a/doc/model.graphml b/doc/model.graphml index dcf6e12..12849d6 100644 --- a/doc/model.graphml +++ b/doc/model.graphml @@ -380,10 +380,10 @@ - + - Contains the known structures. + Contains the known structures. diff --git a/src/core/RandomAccessBinary.cpp b/src/core/RandomAccessBinary.cpp index 8e1c7dd..9864068 100644 --- a/src/core/RandomAccessBinary.cpp +++ b/src/core/RandomAccessBinary.cpp @@ -142,12 +142,12 @@ void RandomAccessBinary::set_double(uint position, const double &data) this->set_uint64(position, *conv); } -const uint8_t RandomAccessBinary::getByte(uint position) +uint8_t RandomAccessBinary::getByte(uint position) { return (*this->ptr_data)[position]; } -const std::vector RandomAccessBinary::getBytes(uint position, uint length) +const std::vector RandomAccessBinary::getBytes(uint position, uint length) { std::vector vec; for(uint i = position; i< position+length; ++i) @@ -155,50 +155,50 @@ const std::vector RandomAccessBinary::getBytes(uint position, uin return vec; } -const bool RandomAccessBinary::getBit(uint byteOffset, uint bitOffset) +bool RandomAccessBinary::getBit(uint byteOffset, uint bitOffset) { uint8_t byte = (*this->ptr_data)[byteOffset]; return (byte & (1 << (7-bitOffset)) > 0; } -const bool RandomAccessBinary::getBit(uint64_t position) +bool RandomAccessBinary::getBit(uint64_t position) { uint64_t byteOffset = position>>3; uint bitOffset = position%8; return this->getbit(byteOffset, bitOffset); } -const std::vector RandomAccessBinary::getBits(uint byteOffset, uint8_t bitOffset, uint64_t length) +const std::vector RandomAccessBinary::getBits(uint byteOffset, uint8_t bitOffset, uint64_t length) { } -const std::vector RandomAccessBinary::getBits(uint64_t position, uint64_t length) +const std::vector RandomAccessBinary::getBits(uint64_t position, uint64_t length) { } -const uint16_t RandomAccessBinary::get_uint16(uint position) +uint16_t RandomAccessBinary::get_uint16(uint position) { } -const uint32_t RandomAccessBinary::get_uint32(uint position) +uint32_t RandomAccessBinary::get_uint32(uint position) { } -const uint64_t RandomAccessBinary::get_uint64(uint position) +uint64_t RandomAccessBinary::get_uint64(uint position) { } -const float RandomAccessBinary::get_float(uint position) +float RandomAccessBinary::get_float(uint position) { } -const double RandomAccessBinary::get_double(uint position) +double RandomAccessBinary::get_double(uint position) { } diff --git a/src/core/RandomAccessBinary.h b/src/core/RandomAccessBinary.h index 723a8c3..024d6ef 100644 --- a/src/core/RandomAccessBinary.h +++ b/src/core/RandomAccessBinary.h @@ -14,13 +14,12 @@ public: MIDDLE }; - RandomAccessBinary(); RandomAccessBinary(uint possible_packetsize); explicit ~RandomAccessBinary(); void setEndianness(Endianness endianess); - const Endianness getEndianness(); + Endianness getEndianness(); void setBytes(uint position, const std::vector& data); void setByte(uint position, const uint8_t& data); @@ -37,26 +36,26 @@ public: void set_float(uint position, const float& data); void set_double(uint position, const double& data); - const uint8_t + uint8_t getByte(uint position); - const std::vector + const std::vector getBytes(uint position, uint length); - const bool getBit(uint byteOffset, uint bitOffset); - const bool getBit(uint64_t position); - const std::vector + bool getBit(uint byteOffset, uint bitOffset); + bool getBit(uint64_t position); + const std::vector getBits(uint byteOffset, uint8_t bitOffset, uint64_t length); - const std::vector + const std::vector getBits(uint64_t position, uint64_t length); - const uint16_t get_uint16(uint position); - const uint32_t get_uint32(uint position); - const uint64_t get_uint64(uint position); + uint16_t get_uint16(uint position); + uint32_t get_uint32(uint position); + uint64_t get_uint64(uint position); - const float get_float(uint position); - const double get_double(uint position); + float get_float(uint position); + double get_double(uint position); std::string get_string(uint position, uint length);