def serialize_sirep(self):
     """Described in parent class"""
     return b''.join((
         utils.pack_uint(self.command_type.value),
         utils.pack_string(self.remote_path),
         utils.pack_uint(self.write_record_type.value),
         utils.pack_string(self.data),
     ))
 def serialize_sirep(self):
     serialized = ""
     serialized += struct.pack("II", self.command_type.value,
                               self.payload_length)
     serialized += utils.pack_string(self.remote_path)
     serialized += struct.pack("II", self.write_record_type.value,
                               self.data_length)
     serialized += utils.pack_string(self.data)
     return serialized
Beispiel #3
0
 def serialize_sirep(self):
     """Described in parent class"""
     serialized = ""
     # serialize the command global headers
     serialized += struct.pack("II", self.command_type.value, self.payload_length)
     # serialize the remote path parameter
     serialized += utils.pack_string(self.remote_path)
     return serialized
 def serialize_sirep(self):
     """Described in parent class"""
     serialized = ""
     serialized += struct.pack("II", self.command_type.value,
                               self.payload_length)
     serialized += struct.pack("II", self.return_error_flag,
                               self.return_output_flag)
     command_line_offset = LaunchCommandWithOutputCommand.COMMAND_LINE_OFFSET
     serialized += struct.pack("II", command_line_offset,
                               len(self.command_line_string) * 2)
     parameters_offset = command_line_offset + len(
         self.command_line_string) * 2
     serialized += struct.pack("II", parameters_offset,
                               len(self.parameters_string) * 2)
     base_directory_path_offset = parameters_offset + len(
         self.parameters_string) * 2
     serialized += struct.pack("II", base_directory_path_offset,
                               len(self.base_directory_path) * 2)
     serialized += struct.pack("I", 0)
     serialized += utils.pack_string(self.command_line_string)
     serialized += utils.pack_string(self.parameters_string)
     serialized += utils.pack_string(self.base_directory_path)
     serialized
     return serialized