Merge remote-tracking branch 'origin/master' into enhanced_device

# Conflicts:
#	docs/enhanced_proto.md
#	src/ebusd/bushandler.cpp
#	src/lib/ebus/device.cpp
#	src/lib/ebus/device.h
This commit is contained in:
John
2021-01-10 13:51:53 +01:00
18 changed files with 96 additions and 100 deletions
-1
View File
@@ -44,7 +44,6 @@ const char* getResultCode(result_t resultCode) {
case RESULT_ERR_DUPLICATE: return "ERR: duplicate entry";
case RESULT_ERR_DUPLICATE_NAME: return "ERR: duplicate name";
case RESULT_ERR_BUS_LOST: return "ERR: arbitration lost";
case RESULT_ERR_ARB_RUNNING: return "ERR: arbitration running";
case RESULT_ERR_CRC: return "ERR: CRC error";
case RESULT_ERR_ACK: return "ERR: ACK error";
case RESULT_ERR_NAK: return "ERR: NAK received";
+7 -8
View File
@@ -56,16 +56,15 @@ enum result_t {
RESULT_ERR_DUPLICATE_NAME = -17, //!< duplicate entry (name)
RESULT_ERR_BUS_LOST = -18, //!< arbitration lost
RESULT_ERR_ARB_RUNNING = -19, //!< arbitration running
RESULT_ERR_CRC = -20, //!< CRC error
RESULT_ERR_ACK = -21, //!< ACK error
RESULT_ERR_NAK = -22, //!< NAK received
RESULT_ERR_CRC = -19, //!< CRC error
RESULT_ERR_ACK = -20, //!< ACK error
RESULT_ERR_NAK = -21, //!< NAK received
RESULT_ERR_NO_SIGNAL = -23, //!< no signal found on the bus
RESULT_ERR_SYN = -24, //!< SYN received instead of answer
RESULT_ERR_SYMBOL = -25, //!< wrong symbol received instead of sent symbol
RESULT_ERR_NO_SIGNAL = -22, //!< no signal found on the bus
RESULT_ERR_SYN = -23, //!< SYN received instead of answer
RESULT_ERR_SYMBOL = -24, //!< wrong symbol received instead of sent symbol
RESULT_ERR_NOTAUTHORIZED = -26 //!< not authorized for this action
RESULT_ERR_NOTAUTHORIZED = -25 //!< not authorized for this action
};
+5 -5
View File
@@ -72,19 +72,19 @@ using std::vector;
typedef unsigned char symbol_t;
/** escape symbol, either followed by 0x00 for the value 0xA9, or 0x01 for the value 0xAA. */
#define ESC ((symbol_t)0xA9)
#define ESC 0xA9
/** synchronization symbol. */
#define SYN ((symbol_t)0xAA)
#define SYN 0xAA
/** positive acknowledge symbol. */
#define ACK ((symbol_t)0x00)
#define ACK 0x00
/** negative acknowledge symbol. */
#define NAK ((symbol_t)0xFF)
#define NAK 0xFF
/** the broadcast destination address. */
#define BROADCAST ((symbol_t)0xFE)
#define BROADCAST 0xFE
/**
* Parse an unsigned int value.
Executable → Regular
+4
View File
@@ -11,6 +11,10 @@ add_executable(test_filereader test_filereader.cpp)
target_link_libraries(test_filereader ebus pthread)
add_test(filereader test_filereader)
add_executable(test_device test_device.cpp)
target_link_libraries(test_device ebus pthread ${test_LIBS})
add_test(device test_device)
add_executable(test_symbol test_symbol.cpp)
target_link_libraries(test_symbol ebus pthread)
add_test(symbol test_symbol)
Executable → Regular
+5
View File
@@ -3,6 +3,7 @@ AM_CXXFLAGS = -I$(top_srcdir)/src \
-Wno-unused-parameter
noinst_PROGRAMS = test_filereader \
test_device \
test_symbol \
test_data \
test_message
@@ -10,6 +11,9 @@ noinst_PROGRAMS = test_filereader \
test_filereader_SOURCES = test_filereader.cpp
test_filereader_LDADD = ../libebus.a -lpthread
test_device_SOURCES = test_device.cpp
test_device_LDADD = ../libebus.a -lpthread
test_symbol_SOURCES = test_symbol.cpp
test_symbol_LDADD = ../libebus.a -lpthread
@@ -20,6 +24,7 @@ test_message_SOURCES = test_message.cpp
test_message_LDADD = ../libebus.a -lpthread
if CONTRIB
test_device_LDADD += ../contrib/libebuscontrib.a
test_data_LDADD += ../contrib/libebuscontrib.a
test_message_LDADD += ../contrib/libebuscontrib.a
endif