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)
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
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
def __init__(self): Node.__init__(self, 'String to dictionary') self.addInput('string', ptype=Ptype.STR) self.dictOut = self.addOutput('dictionary', Ptype.DICT)
def __init__(self): Node.__init__(self, 'Timestamp') self.addInput('data') self.dataOut = self.addOutput('data') self.tsOut = self.addOutput('timestamp', Ptype.FLOAT)
def __init__(self, name): Node.__init__(self, name) self.addInput('deg', False) self.addInput('hyperb', False)
def __init__(self): Node.__init__(self, 'Value from dictionary') self.addInput('dictionary', {}) self.addInput('key', 'key') self.valOut = self.addOutput('value')
def __init__(self): Node.__init__(self, 'String out') inp = self.addInput('value', 'Hello') self.srcOut = self.addOutput('string', inp.ptype)
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)
def __init__(self): Node.__init__(self, 'Array length') self.addInput('array', ptype=Ptype.LIST) self.lenOut = self.addOutput('length', Ptype.INT)
def __init__(self): Node.__init__(self, 'Append to Array') self.arrIn = self.addInput('array', []) self.addInput('data') self.arrOut = self.addOutput('array', Ptype.LIST)
def __init__(self): Node.__init__(self, 'Array value') self.addInput('array', ptype=Ptype.LIST) self.addInput('index', -1) self.valOut = self.addOutput('value')
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)
def __init__(self): Node.__init__(self, 'String split') self.addInput('string', ptype=Ptype.STR) self.addInput('delimiter', ',') self.strOut = self.addOutput('parts', Ptype.STR)
def __init__(self): Node.__init__(self, 'Unpack array') self.addInput('array', ptype=Ptype.LIST) self.elOut = self.addOutput('elements')
def __init__(self): Node.__init__(self, 'Print') self.addInput('data') self.strOut = self.addOutput('formatted', Ptype.STR)
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)
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)
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)
def __init__(self): Node.__init__(self, 'Float out') inp = self.addInput('value', 0.0) self.srcOut = self.addOutput('float', inp.ptype)
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)
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)
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)
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')
def __init__(self): Node.__init__(self, 'Bool out') inp = self.addInput('value', True) self.srcOut = self.addOutput('bool', inp.ptype)
def __init__(self): Node.__init__(self, 'Trigger') self.dataIn = self.addInput('data') self.addInput('trigger') self.addInput('reuseOldData', False) self.repOut = self.addOutput('data')
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)
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)
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)
def __init__(self): Node.__init__(self, 'Logarithm') self.addInput('x', 1.) self.addInput('base', 10.) self.resOut = self.addOutput('log', Ptype.FLOAT)