def any2i(self, pkt, val):
        if val is None:
            return val
        ival = int(val)
        fract = int( (val-ival) * 2**self.frac_bits )
        return (ival << self.frac_bits) | fract
dataset/ETHPy150Open phaethon/scapy/scapy/fields.py/FixedPointField.any2i/original