Exemplo n.º 1
0
 def __init__(self):
     Node.__init__(self, 'Noise out')
     self.addInput('low', 0.)
     self.addInput('high', 1.)
     self.addInput('gauss', False)
     self.addInput('numElements', 1)
     self.noiseOut = self.addOutput('float', Ptype.FLOAT)
Exemplo n.º 2
0
 def __init__(self):
     Node.__init__('Pause')
     self.addInput('data')
     self.addInput('durationSec', 1.)
     self.addInput('clock', False)
     self.dataOut = self.addOutput('data')
     # for the clock mode (ensure cycle time length)
     self.sampler = 0.
     self.wait = self.bruteforceWait if platform.system(
     ) == 'Windows' else self.sleepWait
Exemplo n.º 3
0
 def __init__(self):
     Node.__init__(self, 'File sink')
     self.addInput('string', ptype=Ptype.STR)
     self.addInput('filepath', '/Path/To/File.suffix', ptype=Ptype.FILE)
     self.addInput('append', False)  # adding as lines or overwriting
     # only technical needed to have a result value (the path when finished)
     self.pathOut = self.addOutput('filepath', Ptype.STR)
     # for faster processing, we let the file object open until the graph finished.
     # alternatively, open and close it in the process method, using "with"
     self.file = None
Exemplo n.º 4
0
 def __init__(self):
     Node.__init__(self, 'String to dictionary')
     self.addInput('string', ptype=Ptype.STR)
     self.dictOut = self.addOutput('dictionary', Ptype.DICT)
Exemplo n.º 5
0
 def __init__(self):
     Node.__init__(self, 'Timestamp')
     self.addInput('data')
     self.dataOut = self.addOutput('data')
     self.tsOut = self.addOutput('timestamp', Ptype.FLOAT)
Exemplo n.º 6
0
	def __init__(self, name):
		Node.__init__(self, name)
		self.addInput('deg', False)
		self.addInput('hyperb', False)
Exemplo n.º 7
0
 def __init__(self):
     Node.__init__(self, 'Value from dictionary')
     self.addInput('dictionary', {})
     self.addInput('key', 'key')
     self.valOut = self.addOutput('value')
Exemplo n.º 8
0
 def __init__(self):
     Node.__init__(self, 'String out')
     inp = self.addInput('value', 'Hello')
     self.srcOut = self.addOutput('string', inp.ptype)
Exemplo n.º 9
0
 def __init__(self):
     Node.__init__(self, 'Int out')
     # Automatically assign same datatype to output as the input
     # by parsing the default value during addInput.
     inp = self.addInput('value', 0)
     self.srcOut = self.addOutput('int', inp.ptype)
Exemplo n.º 10
0
 def __init__(self):
     Node.__init__(self, 'Array length')
     self.addInput('array', ptype=Ptype.LIST)
     self.lenOut = self.addOutput('length', Ptype.INT)
Exemplo n.º 11
0
 def __init__(self):
     Node.__init__(self, 'Append to Array')
     self.arrIn = self.addInput('array', [])
     self.addInput('data')
     self.arrOut = self.addOutput('array', Ptype.LIST)
Exemplo n.º 12
0
 def __init__(self):
     Node.__init__(self, 'Array value')
     self.addInput('array', ptype=Ptype.LIST)
     self.addInput('index', -1)
     self.valOut = self.addOutput('value')
Exemplo n.º 13
0
 def __init__(self):
     Node.__init__(self, 'Minimum in array')
     self.addInput('array', ptype=Ptype.LIST)
     self.valOut = self.addOutput('value')
     self.indOut = self.addOutput('index', Ptype.INT)
Exemplo n.º 14
0
 def __init__(self):
     Node.__init__(self, 'String split')
     self.addInput('string', ptype=Ptype.STR)
     self.addInput('delimiter', ',')
     self.strOut = self.addOutput('parts', Ptype.STR)
Exemplo n.º 15
0
 def __init__(self):
     Node.__init__(self, 'Unpack array')
     self.addInput('array', ptype=Ptype.LIST)
     self.elOut = self.addOutput('elements')
Exemplo n.º 16
0
 def __init__(self):
     Node.__init__(self, 'Print')
     self.addInput('data')
     self.strOut = self.addOutput('formatted', Ptype.STR)
Exemplo n.º 17
0
 def __init__(self):
     Node.__init__(self, 'Dictionary to string')
     self.addInput('dictionary', ptype=Ptype.DICT)
     self.addInput('oneLine', False)
     self.strOut = self.addOutput('string', Ptype.STR)
Exemplo n.º 18
0
 def __init__(self):
     Node.__init__(self, 'File source')
     self.addInput('filepath', '/Path/To/File.suffix', ptype=Ptype.FILE)
     self.addInput('aslines', True)
     self.lineOut = self.addOutput('string', Ptype.STR)
Exemplo n.º 19
0
 def __init__(self):
     Node.__init__(self, 'Pack array')
     # build inputs and outputs
     self.dataIn = self.addInput('elements')
     self.addInput('length', 0)
     self.arrOut = self.addOutput('array', Ptype.LIST)
Exemplo n.º 20
0
 def __init__(self):
     Node.__init__(self, 'Float out')
     inp = self.addInput('value', 0.0)
     self.srcOut = self.addOutput('float', inp.ptype)
Exemplo n.º 21
0
 def __init__(self):
     Node.__init__(self, 'Remove from Array')
     self.addInput('array', ptype=Ptype.LIST)
     self.addInput('data')
     self.arrOut = self.addOutput('array', Ptype.LIST)
Exemplo n.º 22
0
 def __init__(self):
     Node.__init__(self, 'Dictionary')
     self.dictIn = self.addInput('dictionary', {})
     self.addInput('key', 'key')
     self.addInput('value')
     self.dictOut = self.addOutput('dictionary', Ptype.DICT)
Exemplo n.º 23
0
 def __init__(self):
     Node.__init__(self, 'File search')
     self.addInput('dirpath', '/Path/To/Directory', ptype=Ptype.FILE)
     self.addInput('subdirs', False)  # also search in subdirectories
     self.addInput('pattern', '*')
     self.filesOut = self.addOutput('files', Ptype.LIST)
Exemplo n.º 24
0
 def __init__(self):
     Node.__init__(self, 'Replicate')
     # build inputs and outputs
     self.addInput('data')
     self.addInput('n', 1)  # 1 means, the data goes out 1:1
     self.repOut = self.addOutput('replicates')
Exemplo n.º 25
0
 def __init__(self):
     Node.__init__(self, 'Bool out')
     inp = self.addInput('value', True)
     self.srcOut = self.addOutput('bool', inp.ptype)
Exemplo n.º 26
0
 def __init__(self):
     Node.__init__(self, 'Trigger')
     self.dataIn = self.addInput('data')
     self.addInput('trigger')
     self.addInput('reuseOldData', False)
     self.repOut = self.addOutput('data')
Exemplo n.º 27
0
 def __init__(self):
     Node.__init__(self, 'Complex out')
     self.addInput('re', 0.0)
     self.addInput('im', 0.0)
     self.complexOut = self.addOutput('complex', Ptype.COMPLEX)
Exemplo n.º 28
0
 def __init__(self):
     Node.__init__(self, 'String replace')
     self.addInput('string', ptype=Ptype.STR)
     self.addInput('find', ';')
     self.addInput('replace', ',')
     self.strOut = self.addOutput('modified', Ptype.STR)
Exemplo n.º 29
0
 def __init__(self, name):
     Node.__init__(self, name)
     self.arrOut = self.addOutput('array', Ptype.LIST)
     self.elOut = self.addOutput('elements')
     self.lenOut = self.addOutput('length', Ptype.INT)
Exemplo n.º 30
0
	def __init__(self):
		Node.__init__(self, 'Logarithm')
		self.addInput('x', 1.)
		self.addInput('base', 10.)
		self.resOut = self.addOutput('log', Ptype.FLOAT)