Choose the right decoder and return a bwPacket instance.
29 def decode(data):
30 r"""!Choose the right decoder and return a bwPacket instance
31
32 @param data: data to decode
33 @return bwPacket instance"""
34 data = str(data)
35 if "FMS" in data:
36 return FmsDecoder.decode(data)
37 elif "POCSAG" in data:
38 return PocsagDecoder.decode(data)
39 elif "ZVEI" in data:
40 return ZveiDecoder.decode(data)
41 else:
42 logging.warning("no decoder found for: %s", data)
43 return None