def __init__(self, opcode, blocksize):
     PassThrough.__init__(self,
                          opcode,
                          blocksize,
                          0,
                          3,
                          2,
                          0,
                          0,
                          0,
                          0xe0,
                          ck_cond=1)
Exemple #2
0
 def __init__(self, opcode, blocksize, LBAs):
     PassThrough.__init__(
         self,
         opcode,
         blocksize,
         LBAs,  #lba
         3,  #protocal
         0,  #t_length 
         1,  #t_dir
         1,  #feature
         0,  #sector_count
         0x78,  # command
         ck_cond=1)
Exemple #3
0
 def __init__(self, opcode, blocksize, fetures, data):
     PassThrough.__init__(self,
                          opcode,
                          blocksize,
                          0,
                          6,
                          2,
                          0,
                          fetures,
                          fetures,
                          0x6,
                          dataout=data,
                          ck_cond=1)
Exemple #4
0
 def __init__(self, opcode, blocksize, lba, tl, sense_data=None, data=None):
     PassThrough.__init__(self,
                          opcode,
                          blocksize,
                          lba,
                          0x6,
                          2,
                          1,
                          0,
                          tl,
                          0x25,
                          sense=sense_data,
                          datain=data,
                          ck_cond=1)
Exemple #5
0
 def __init__(self,
              opcode,
              blocksize):
     PassThrough.__init__(self,
                          opcode,
                          blocksize,
                          0,
                          0x4,
                          2,
                          1,
                          0,
                          1,
                          0xec,
                          ck_cond=1)
Exemple #6
0
 def __init__(self, opcode, blocksize, smart_key=None):
     PassThrough.__init__(self,
                          opcode,
                          blocksize,
                          0xC24F << 8,
                          0x4,
                          2,
                          1,
                          0xD0,
                          0x1,
                          0xB0,
                          ck_cond=1)
     if smart_key:
         self._standard_bits = self._standard_bits.update(smart_key)
 def __init__(self,
              opcode,
              blocksize):
     PassThrough.__init__(self,
                          opcode,
                          blocksize,
                          0,  #lba
                          3,  #protocal
                          0,  #t_length 
                          1,  #t_dir
                          0,  #feature
                          0,  #sector_count
                          0xe5, # command
                          ck_cond=1,
                          extend=0,
                          device=0)
Exemple #8
0
 def __init__(self, opcode, blocksize, lba, tl, data):
     count_h = (tl >> 8)
     lba_pass = (lba << 8) + count_h
     count_l = (tl & 0xff)
     PassThrough.__init__(self,
                          opcode,
                          blocksize,
                          lba_pass,
                          0x6,
                          2,
                          0,
                          3,
                          count_l,
                          0x93,
                          dataout=data,
                          ck_cond=1)
 def __init__(self,
              opcode,
              blocksize,
              lba,
              tl,
              data,
              sense_data=None):
     PassThrough.__init__(self,
                          opcode,
                          blocksize,
                          lba,
                          0x6,
                          2,
                          0,
                          0,
                          tl,
                          0x35,
                          sense=sense_data,
                          dataout=data,
                          ck_cond=1)
     
Exemple #10
0
 def passthrough(self, 
                 lba,
                 protocal,
                 t_lenght,
                 t_dir,
                 fetures,
                 sector_count,
                 command,
                 **kwargs):
     """
     Return a PassThrough Instance
     
     :param lba:
     :param protocal:
     :param t_lenght:
     :param t_dir:
     :param fetures:
     :param sector_count:
     :param command:
     :param kwargs: a dict with key/value pairs
                    extend=1,
                    mul_count=0,
                    byte_block=1,
                    ck_cond=0,
                    off_line=0,
                    device=0xe0,
                    control=0,
                    dataout=None,
                    datain=None,
                    
     :return: a PassThrough instance
     """
     opcode = self.device.opcodes.PASS_THROUGH_16
     cmd = PassThrough(opcode,
                       self.blocksize,
                       lba,
                       protocal,
                       t_lenght,
                       t_dir,
                       fetures,
                       sector_count,
                       command,
                       **kwargs)
     self.execute(cmd)
     return cmd