@conf.commands.register
def fletcher16_checksum(binbuf):
 (c0, c1) = _fletcher16(binbuf)
 return ((c1 << 8) | c0)

@ conf . commands . register def fletcher16_checksum ( binbuf ) : ( c0 , c1 ) = _fletcher16 ( binbuf ) return ( ( c1 << 8 ) | c0 )
calculates fletcher-16 checksum of the given buffer .