Linux SOcketCAN driver: strict ordering of received CAN frames; added debug header for tests

This commit is contained in:
Pavel Kirienko
2014-04-01 02:29:57 +04:00
parent da6e032cf9
commit 0309d13eae
3 changed files with 27 additions and 22 deletions
+14
View File
@@ -0,0 +1,14 @@
/*
* Copyright (C) 2014 Pavel Kirienko <pavel.kirienko@gmail.com>
*/
#pragma once
#include <stdexcept>
#ifndef STRINGIZE
# define STRINGIZE2(x) #x
# define STRINGIZE(x) STRINGIZE2(x)
#endif
#define ENFORCE(x) if (!(x)) { throw std::runtime_error(__FILE__ ":" STRINGIZE(__LINE__) ": " #x); }