1 #ifndef ModbusRTUErrors_H_
2 #define ModbusRTUErrors_H_
6 #include "Exceptions.h"
19 erUnExpectedPacketType = 1,
25 erOperationFailed = 7,
26 erMemoryParityError = 8,
28 erInternalErrorCode = 10,
31 erBadReplyNodeAddress = 13,
38 std::string mbErr2Str( mbErrCode e );
50 ModbusRTU::mbErrCode err;
52 friend std::ostream& operator<<(std::ostream& os,
mbException& ex )
54 return os <<
"(" << ex.err <<
") " << mbErr2Str(ex.err);
62 #endif // ModbusRTUErrors_H_