def get_rfx_object(packetid):
 import RFXtrx as rfxtrxmod
 try:
  binarypacket = bytearray.fromhex(packetid)
 except ValueError:
  return None
 pkt = rfxtrxmod.lowlevel.parse(binarypacket)
 if (pkt is None):
  return None
 if isinstance(pkt, rfxtrxmod.lowlevel.SensorPacket):
  obj = rfxtrxmod.SensorEvent(pkt)
 elif isinstance(pkt, rfxtrxmod.lowlevel.Status):
  obj = rfxtrxmod.StatusEvent(pkt)
 else:
  obj = rfxtrxmod.ControlEvent(pkt)
 return obj

def get_rfx_object ( packetid ) : import RFXtrx as rfxtrxmod try : binarypacket = bytearray . fromhex ( packetid ) except ValueError : return None pkt = rfxtrxmod . lowlevel . parse ( binarypacket ) if ( pkt is None ) : return None if isinstance ( pkt , rfxtrxmod . lowlevel . SensorPacket ) : obj = rfxtrxmod . SensorEvent ( pkt ) elif isinstance ( pkt , rfxtrxmod . lowlevel . Status ) : obj = rfxtrxmod . StatusEvent ( pkt ) else : obj = rfxtrxmod . ControlEvent ( pkt ) return obj
return the rfxobject with the packetid .