def show(self):
        """
        This method calls the .show() method of the view and returns
        the packet that the user creates in this window
        :return: The created packet
        """
        code = self.view.show()
        packet_translator = PacketTranslator()
        makoTranslate = MakoTranslate()

        pck_sec_header, src_data = self.view.get_tc_text()
        pck_sec_header = json.loads(makoTranslate.replace(pck_sec_header))
        src_data = json.loads(makoTranslate.replace(src_data))
        self.command["data"]["pck_sec_head"] = pck_sec_header
        self.command["data"]["user_data"]["src_data"] = src_data
        if code == 1:
            packet = packet_translator.json2packet(self.command)
            if self.view.is_svc_19():
                extra_val = self.view.get_event_id()
                try:
                    extra_val = int(extra_val)
                except ValueError as e:
                    extra_val = pb.pus_st05_getEventId(extra_val)
            else:
                extra_val = self.view.get_date_time()
            return packet, extra_val
        else:
            return None, None
    def send_callback(self):
        """
        This method is triggered when the user hits the send button.
        This method creates a packet from the json and validates that
        every field on that json is correct
        """
        mt = MakoTranslate()
        pt = PacketTranslator()
        vj = ValidateJson()

        try:
            pck_sec_header, src_data = self.view.get_tc_text()
            pck_sec_header = json.loads(mt.replace(pck_sec_header))
            src_data = json.loads(mt.replace(src_data))

            self.command["data"]["pck_sec_head"] = pck_sec_header
            self.command["data"]["user_data"]["src_data"] = src_data

            vj.check(self.command)

            packet = pt.json2packet(self.command)
            pb.pus_notify_sendPacket(packet)

            self.model.add_to_table(packet)  # Packet is created from json
            self.view.window.addTcButton.hide()
            self.view.close()
        except (ValidationError, JSONDecodeError) as err:
            msg_box = QtGui.QMessageBox()
            msg_box.setText('Some fields may be incorrect {}'.format(err))
            msg_box.setStandardButtons(QtGui.QMessageBox.Ok | QtGui.QMessageBox.Cancel)
            msg_box.exec_()