Esempio 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)
Esempio 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
Esempio 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
Esempio 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)
Esempio 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)
Esempio n. 6
0
	def __init__(self, name):
		Node.__init__(self, name)
		self.addInput('deg', False)
		self.addInput('hyperb', False)
Esempio n. 7
0
 def __init__(self):
     Node.__init__(self, 'Value from dictionary')
     self.addInput('dictionary', {})
     self.addInput('key', 'key')
     self.valOut = self.addOutput('value')
Esempio n. 8
0
 def __init__(self):
     Node.__init__(self, 'String out')
     inp = self.addInput('value', 'Hello')
     self.srcOut = self.addOutput('string', inp.ptype)
Esempio 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)
Esempio n. 10
0
 def __init__(self):
     Node.__init__(self, 'Array length')
     self.addInput('array', ptype=Ptype.LIST)
     self.lenOut = self.addOutput('length', Ptype.INT)
Esempio 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)
Esempio 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')
Esempio 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)
Esempio 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)
Esempio n. 15
0
 def __init__(self):
     Node.__init__(self, 'Unpack array')
     self.addInput('array', ptype=Ptype.LIST)
     self.elOut = self.addOutput('elements')
Esempio n. 16
0
 def __init__(self):
     Node.__init__(self, 'Print')
     self.addInput('data')
     self.strOut = self.addOutput('formatted', Ptype.STR)
Esempio 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)
Esempio 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)
Esempio 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)
Esempio n. 20
0
 def __init__(self):
     Node.__init__(self, 'Float out')
     inp = self.addInput('value', 0.0)
     self.srcOut = self.addOutput('float', inp.ptype)
Esempio 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)
Esempio 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)
Esempio 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)
Esempio 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')
Esempio n. 25
0
 def __init__(self):
     Node.__init__(self, 'Bool out')
     inp = self.addInput('value', True)
     self.srcOut = self.addOutput('bool', inp.ptype)
Esempio 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')
Esempio 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)
Esempio 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)
Esempio 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)
Esempio 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)