#include <boost/foreach.hpp>
+#include "config.h"
#include "logicsnapshot.h"
using boost::lock_guard;
uint64_t LogicSnapshot::unpack_sample(const uint8_t *ptr) const
{
+#ifdef HAVE_UNALIGNED_LITTLE_ENDIAN_ACCESS
+ return *(uint64_t*)ptr;
+#else
uint64_t value = 0;
switch(_unit_size) {
default:
break;
}
return value;
+#endif
}
void LogicSnapshot::pack_sample(uint8_t *ptr, uint64_t value)
{
+#ifdef HAVE_UNALIGNED_LITTLE_ENDIAN_ACCESS
+ *(uint64_t*)ptr = value;
+#else
switch(_unit_size) {
default:
ptr[7] = value >> 56;
case 0:
break;
}
+#endif
}
void LogicSnapshot::append_payload(