Exemple #1
0
    def __init__(self,
                 sources=None,
                 start=0,
                 size=-1,
                 conf=None,
                 port_desc=None,
                 factory=None):

        PortData.__init__(self, None, conf, factory)

        if conf is not None:
            self._sources = []
            for sconf in conf["sources"]:
                self._sources += [self.factory(sconf)]
            self._start = conf.get("start", start, dtype=int)
            self._size = conf.get("size", size, dtype=int)
        else:
            self._sources = sources
            self._start = start
            self._size = size

        if self._sources:
            i = 0
            serializer = None
            while i < len(self._sources) and serializer is None:
                self._serializer = self._sources[i].serializer
                i += 1
Exemple #2
0
	def fill_element(self, e):
		PortData.fill_element(self, e)
		e["type"] = self.TYPE_NAME
		e["path"] = self._path
		e["partition"] = self._partition
		e["start"] = self._start
		e["size"] = self._size
		return e
Exemple #3
0
 def fill_element(self, e):
     PortData.fill_element(self, e)
     e["type"] = self.TYPE_NAME
     e["path"] = self._path
     e["partition"] = self._partition
     e["start"] = self._start
     e["size"] = self._size
     return e
Exemple #4
0
    def fill_element(self, e):
        PortData.fill_element(self, e)

        e["type"] = self.TYPE_NAME
        e["path"] = self._path
        e["start"] = self._start
        e["size"] = self._size
        if self._seek_pos >= 0:
            e["seek_pos"] = self._seek_pos
        return e
Exemple #5
0
	def fill_element(self, e):
		PortData.fill_element(self, e)

		e["type"] = self.TYPE_NAME
		e["path"] = self._path
		e["start"] = self._start
		e["size"] = self._size
		if self._seek_pos >= 0:
			e["seek_pos"] = self._seek_pos
		return e
Exemple #6
0
	def fill_element(self, e):
		PortData.fill_element(self, e)
		e["type"] = self.TYPE_NAME
		e["start"] = self._start
		e["size"] = self._size
		l = e.create_list()
		for src in self._sources:
			pe = e.create_element()
			l += [src.fill_element(pe)]
		e["sources"] = l
		return e
Exemple #7
0
 def fill_element(self, e):
     PortData.fill_element(self, e)
     e["type"] = self.TYPE_NAME
     e["start"] = self._start
     e["size"] = self._size
     l = e.list()
     for src in self._sources:
         pe = e.element()
         l += [src.fill_element(pe)]
     e["sources"] = l
     return e
Exemple #8
0
	def __init__(self, serializer = None, path = None, start = 0, size = -1,
					conf = None, port_desc = None, factory = None):

		PortData.__init__(self, serializer, conf, port_desc, factory)

		if conf is not None:
			self._path = conf.get("path", path)
			self._start = conf.get("start", start, dtype=int)
			self._size = conf.get("size", size, dtype=int)
			self._seek_pos = conf.get("seek_pos", -1, dtype=long)
		else:
			self._path = path
			self._start = start
			self._size = size
			self._seek_pos = -1
Exemple #9
0
	def __init__(self, serializer = None, path = None, partition = -1,
					start = 0, size = -1, conf = None, factory = None):

		PortData.__init__(self, serializer, conf, factory)

		if conf is not None:
			self._path = conf.get("path", path)
			self._partition = conf.get("partition", partition, dtype=int)
			self._start = conf.get("start", start, dtype=int)
			self._size = conf.get("size", size, dtype=int)
		else:
			self._path = path
			self._partition = partition
			self._start = start
			self._size = size

		self._last_partition = 0
Exemple #10
0
    def __init__(self,
                 serializer=None,
                 path=None,
                 start=0,
                 size=-1,
                 conf=None,
                 factory=None):

        PortData.__init__(self, serializer, conf, factory)

        if conf is not None:
            self._path = conf.get("path", path)
            self._start = conf.get("start", start, dtype=int)
            self._size = conf.get("size", size, dtype=int)
            self._seek_pos = conf.get("seek_pos", -1, dtype=long)
        else:
            self._path = path
            self._start = start
            self._size = size
            self._seek_pos = -1
Exemple #11
0
	def __init__(self, sources = None, start = 0, size = -1, conf = None,
					port_desc = None, factory = None):
						
		PortData.__init__(self, None, conf, port_desc, factory)

		if conf is not None:
			self._sources = []
			for sconf in conf["sources"]:
				self._sources += [self.factory(sconf)]
			self._start = conf.get("start", start, dtype=int)
			self._size = conf.get("size", size, dtype=int)
		else:
			self._sources = sources
			self._start = start
			self._size = size

		if self._sources:
			i = 0
			serializer = None
			while i < len(self._sources) and serializer is None:
				self._serializer = self._sources[i].serializer
				i += 1
Exemple #12
0
    def __init__(self,
                 serializer=None,
                 path=None,
                 partition=-1,
                 start=0,
                 size=-1,
                 conf=None,
                 factory=None):

        PortData.__init__(self, serializer, conf, factory)

        if conf is not None:
            self._path = conf.get("path", path)
            self._partition = conf.get("partition", partition, dtype=int)
            self._start = conf.get("start", start, dtype=int)
            self._size = conf.get("size", size, dtype=int)
        else:
            self._path = path
            self._partition = partition
            self._start = start
            self._size = size

        self._last_partition = 0