Esempio n. 1
0
 def send_command_STP_0(self, msg):
     """ to send a message to scope"""
     if self.debug and not self.debug_only_errors:
         service, payload = msg.split(BLANK, 1)
         pretty_print_XML("\nsend to scope: %s" % service, payload, self.debug_format)
     self.out_buffer += ("%s %s" % (len(msg), msg)).encode("UTF-16BE")
     self.handle_write()
Esempio n. 2
0
 def send_command_STP_0(self, msg):
     """ to send a message to scope"""
     if self.debug and not self.debug_only_errors:
         service, payload = msg.split(BLANK, 1)
         pretty_print_XML("\nsend to scope: %s" % service, payload,
                          self.debug_format)
     self.out_buffer += ("%s %s" % (len(msg), msg)).encode("UTF-16BE")
     self.handle_write()
Esempio n. 3
0
 def return_scope_message_STP_0(self, msg, sender):
     """ return a message to the client"""
     service, payload = msg
     if self.debug:
         pretty_print_XML("\nsend to client: %s" % service, payload,
                          self.debug_format)
     self.out_buffer += self.SCOPE_MESSAGE_STP_0 % (
         get_timestamp(), service, len(payload), payload)
     self.timeout = 0
     if not sender == self:
         self.handle_write()
 def return_scope_message_STP_0(self, msg, sender):
     """ return a message to the client"""
     service, payload = msg
     if self.debug:
         pretty_print_XML("\nsend to client: %s" % service, payload, self.debug_format)
     self.out_buffer += self.SCOPE_MESSAGE_STP_0 % (
         get_timestamp(),
         service,
         len(payload),
         payload)
     self.timeout = 0
     if not sender == self:
         self.handle_write()