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