IVGCVSW-3691 Implement SendCounterPacket.SendCounterDirectoryPacket() function
* Changed the signature of SendCounterDirectoryPacket to accept any
ICounterDirectory object
* Added helper methods to the SendCounterPacket class for creating the records
* Created mock classes for testing
* Added unit tests for both SendCounterDirectoryPacket and the helper methods
* Added unit tests for the SWTrace utility functions
* Added ReadUint8 utility function for getting single byte out of a buffer
* Disabled extra sign-conversion warning in the conversion macro
Change-Id: Ie2dddcd6824ed07b623f0cd78d9b7d05c5b70c39
Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
diff --git a/src/profiling/ProfilingUtils.cpp b/src/profiling/ProfilingUtils.cpp
index e356ed7..7a8c678 100644
--- a/src/profiling/ProfilingUtils.cpp
+++ b/src/profiling/ProfilingUtils.cpp
@@ -158,6 +158,13 @@
return static_cast<uint16_t>(value);
}
+uint8_t ReadUint8(const unsigned char* buffer, unsigned int offset)
+{
+ BOOST_ASSERT(buffer);
+
+ return buffer[offset];
+}
+
std::string GetSoftwareInfo()
{
return std::string("ArmNN");