Commit be3279f4 authored by Federico Vaga's avatar Federico Vaga

sw:py: remove reference to lun

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 04bb29df
......@@ -57,9 +57,8 @@ class Trtl(object):
"""
This is an abstract class to handle the TRTL library
"""
def __init__(self, lun=None, device_id=None):
def __init__(self, device_id=None):
self.libtrtl = CDLL("libmockturtle.so", use_errno=True)
self.lun = lun
self.device_id = device_id
set_errno(0)
......@@ -68,8 +67,6 @@ class Trtl(object):
self.device = None
if device_id is not None:
self.device = self.libtrtl.trtl_open_by_id(self.device_id)
if lun is not None:
self.device = self.libtrtl.trtl_open_by_lun(self.lun)
if self.device is None:
raise OSError(get_errno(), os.strerror(get_errno()), "")
......@@ -106,9 +103,8 @@ class TrtlCpu(Trtl):
Python wrapper for CPU management
"""
def __init__(self, lun=None, device_id=None,
cpu_index=0):
super(TrtlCpu, self).__init__(lun, device_id)
def __init__(self, device_id=None, cpu_index=0):
super(TrtlCpu, self).__init__(device_id)
self.cpu_index = cpu_index
# Arguments
......@@ -218,9 +214,9 @@ class TrtlHmq(Trtl):
FLAGS_DIR_OUT = 0x1
FLAGS_DIR_IN = 0x0
def __init__(self, lun=None, device_id=None,
def __init__(self, device_id=None,
hmq_index=0, flags=0):
super(TrtlHmq, self).__init__(lun, device_id)
super(TrtlHmq, self).__init__(device_id)
self.hmq_index = hmq_index
self.flags = flags
......@@ -333,8 +329,8 @@ class TrtlSmem(Trtl):
MOD_CLR_AND = 4
MOD_XOR = 5
def __init__(self, lun=None, device_id=None):
super(TrtlSmem, self).__init__(lun, device_id)
def __init__(self, device_id=None):
super(TrtlSmem, self).__init__(device_id)
# Arguments - FIXME c_void_p should be point c_int
self.libtrtl.trtl_smem_read.argtypes = [c_void_p, c_uint,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment