Generic decoding class for PSI46-type pixel detector readout chips