def __make_packet_o(self, type, path, contents, originator, origantorNode): pkt = Packet() pkt.type = type pkt.path = path pkt.contents = contents pkt.id = self.next_packet_id pkt.originatorID = originator pkt.originatorNodeID = origantorNode self.next_packet_id += 1 return pkt
def __make_packet(self, type, path, contents): pkt = Packet() pkt.type = type pkt.path = path pkt.contents = contents pkt.id = self.next_packet_id pkt.originatorID = pkt.id pkt.originatorNodeID = self.ID self.next_packet_id += 1 return pkt