From: Andreas K. <and...@gm...> - 2023-11-08 20:42:02
|
Hi all. > Hello Markus, > We can certainly add this to the Tcl library, but what is lacking is a description and test > cases. Could you supply these too? (I am not an expert on these CRC methods, so I am utterly > unable to judge the code or to help out with the specific test cases ð). I took a look and tests and docs were relatively easy and trivial to add. I have now done so, and committed the result (pushed also). The new code is has version 1.1.5. See: https://core.tcl-lang.org/tcllib/info/a061c12325631216 Tempted to make a 1.2 which requires Tcl 8.6 and then looks for possible code simplifications. Beyond that, definitely agreed with Arjen that patches should come with tests and docs. > Hi, > i use a rs485 converter to read serial data from a solar inverters and a electricity meter. crc16 is used to check the transmission. > these methods are currently available in tcllib: > however, other crc codes are used. would it be possible to extend crc16 with these codes in tcllib 1.21 and above? > # KERMIT: 0x2189 > # MODBUS: 0x4B37 > # MCRF4XX: 0x6F91 > # GENIBUS: 0xD64E > # X.25: 0x906E > # SDLC: 0x906E > # USB: 0xB4C8 > # BUYPASS: 0xFEE8 > # UMTS: 0xFEE8 > # GSM: 0xCE3C > # MAXIM: 0x44C2 > # CMS: 0xAEE7 -- Happy Tcling, Andreas Kupries <and...@gm...> <https://core.tcl-lang.org/akupries/> <https://akupries.tclers.tk/> Developer @ SUSE Software Solutions Germany GmbH ------------------------------------------------------------------------------- |