def noteMsg(id, topic, what, seq): enum_what = None if what == 'kp': enum_what = pb.KP seq = None elif what == 'read': enum_what = pb.READ seq = int(seq) elif what == 'recv': enum_what = pb.READ seq = int(seq) return pb.ClientMsg(note=pb.ClientNote(topic=topic, what=enum_what, seq_id=seq))
def note_read(topic, seq): return pb.ClientMsg( note=pb.ClientNote(topic=topic, what=pb.READ, seq_id=seq))