示例#1
0
    def interact(self, message):
        """Interacts with the SAP Diag server, adding the :class:`SAPDiagStep` item and
        ending with a 'end of message' item.

        :param message: items to send
        :type message: ``list`` of :class:`SAPDiagItem`

        :return: server's response
        :rtype: :class:`SAPNI<SAPNI.SAPNI>`
        """
        if self.initialized:
            self.step += 1
            message.insert(0, SAPDiagItem(item_type="APPL", item_id="ST_USER",
                                          item_sid=0x26,
                                          item_value=SAPDiagStep(step=self.step)))
            message.append(SAPDiagItem(item_type="EOM"))
            return self.sr_message(message)
        else:
            return None
示例#2
0
    def interact(self, message):
        """Interacts with the SAP Diag server, adding the L{SAPDiagStep} item and
        ending with a 'end of message' item.

        @param message: items to send
        @type message: C{list} of L{SAPDiagItem}

        @return: server's response
        @rtype: L{SAPNI<SAPNI.SAPNI>}
        """
        if self.initialized:
            self.step = self.step + 1
            message.insert(0, SAPDiagItem(item_type="APPL", item_id="ST_USER",
                                          item_sid=0x26,
                                          item_value=SAPDiagStep(step=self.step)))
            message.append(SAPDiagItem(item_type="EOM"))
            return self.sr_message(message)
        else:
            return None