[go: up one dir, main page]

Menu

Commit [r410]  Maximize  Restore  History

Corrected an error in the serialization protocol of the ZmqSigOpSerDes class. It turned out that a 1-byte unsigned integer wasn't possible to separate from a boolean type by the SigOp variable header. The specific problem was that the least significant bit of the variable header coded for 3 different things :-/

Fixed the error by reducing the maximum size of an integer to be 31 bytes (248 bits). I.e. the LSB only encode text length (when the text bit is set) and boolean variable. Updated tests.

Cleaned up the decoding of the variable header and broken it out in a nested class ZmqSigOpSerDes::VariableHeaderDecoder so that the decoding is not repeated in several places and thus increase the risk for messing up.

Also added a method to ZmqSigOpSerDes for generating crtitical PSM messages when trying to decode a variable to the wrong typ, e.g. boolean -> integer or negative int -> unsigned int.

lonfield 2023-10-22

changed /trunk/Debug/Src/subdir.mk
changed /trunk/Include/PsmUtils.h
removed /trunk/Include/SerDes.h
added /trunk/Include/SerDesT.h
changed /trunk/Include/TypeUtils.h
changed /trunk/Include/ZmqRequirerT.h
changed /trunk/Include/ZmqSigOpSerDes.h
added /trunk/Src/ZmqSigOpSerDes.cpp
changed /trunk/Test/UnitTests/TestCase_44.cpp
changed /trunk/Test/UnitTests/TestCase_46_01.cpp
changed /trunk/Test/UnitTests/TestCase_46_02.cpp
changed /trunk/Test/tests.h
/trunk/Include/SerDes.h
File was removed.