Exemple #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)
Exemple #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
Exemple #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
Exemple #4
0
 def __init__(self):
     Node.__init__(self, 'String to dictionary')
     self.addInput('string', ptype=Ptype.STR)
     self.dictOut = self.addOutput('dictionary', Ptype.DICT)
Exemple #5
0
 def __init__(self):
     Node.__init__(self, 'Timestamp')
     self.addInput('data')
     self.dataOut = self.addOutput('data')
     self.tsOut = self.addOutput('timestamp', Ptype.FLOAT)
Exemple #6
0
	def __init__(self, name):
		Node.__init__(self, name)
		self.addInput('deg', False)
		self.addInput('hyperb', False)
Exemple #7
0
 def __init__(self):
     Node.__init__(self, 'Value from dictionary')
     self.addInput('dictionary', {})
     self.addInput('key', 'key')
     self.valOut = self.addOutput('value')
Exemple #8
0
 def __init__(self):
     Node.__init__(self, 'String out')
     inp = self.addInput('value', 'Hello')
     self.srcOut = self.addOutput('string', inp.ptype)
Exemple #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)
Exemple #10
0
 def __init__(self):
     Node.__init__(self, 'Array length')
     self.addInput('array', ptype=Ptype.LIST)
     self.lenOut = self.addOutput('length', Ptype.INT)
Exemple #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)
Exemple #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')
Exemple #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)
Exemple #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)
Exemple #15
0
 def __init__(self):
     Node.__init__(self, 'Unpack array')
     self.addInput('array', ptype=Ptype.LIST)
     self.elOut = self.addOutput('elements')
Exemple #16
0
 def __init__(self):
     Node.__init__(self, 'Print')
     self.addInput('data')
     self.strOut = self.addOutput('formatted', Ptype.STR)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #20
0
 def __init__(self):
     Node.__init__(self, 'Float out')
     inp = self.addInput('value', 0.0)
     self.srcOut = self.addOutput('float', inp.ptype)
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #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')
Exemple #25
0
 def __init__(self):
     Node.__init__(self, 'Bool out')
     inp = self.addInput('value', True)
     self.srcOut = self.addOutput('bool', inp.ptype)
Exemple #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')
Exemple #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)
Exemple #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)
Exemple #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)
Exemple #30
0
	def __init__(self):
		Node.__init__(self, 'Logarithm')
		self.addInput('x', 1.)
		self.addInput('base', 10.)
		self.resOut = self.addOutput('log', Ptype.FLOAT)