def _mapComponent(self, softpkg): cppcomp = PullComponentMapper._mapComponent(self, softpkg) cppcomp['programmable'] = True cppcomp['reprogclass'] = self.reprogClass(softpkg) cppcomp['executesHWComponents'] = False # TODO: Implement this self._validateAggregateDevice(cppcomp) return cppcomp
def _mapComponent(self, softpkg): ''' Extends the pull mapper _mapComponent method by defining the 'mFunction' and 'license' key/value pairs to the component dictionary. ''' component = PullComponentMapper._mapComponent(self, softpkg) mFunction = None for prop in softpkg.properties(): if str(prop.identifier()) == "__mFunction": mFunction = prop.value() break if mFunction: # point towards the m file that has been copied # to the implementation directory mFilePath = os.path.join(softpkg.path(), self._outputdir, mFunction+".m") parameters = mfile.parse(mFilePath) name = parameters.functionName inputs = parameters.inputs outputs = parameters.outputs else: name = "" inputs = [] outputs = [] component['mFunction'] = {'name' : name, 'inputs' : inputs, 'numInputs' : len(inputs), 'outputs' : outputs} component['license'] = "GPL" return component
def _mapComponent(self, softpkg): cppcomp = PullComponentMapper._mapComponent(self, softpkg) cppcomp['reprogclass'] = self.reprogClass(softpkg) cppcomp['executesHWComponents'] = False # TODO: Implement this self._validateAggregateDevice(cppcomp) return cppcomp
def _mapComponent(self, softpkg): cppcomp = PullComponentMapper._mapComponent(self, softpkg) cppcomp['reprogclass'] = self.reprogClass(softpkg) return cppcomp
def _mapComponent(self, softpkg): cppcomp = PullComponentMapper._mapComponent(self, softpkg) cppcomp['reprogclass'] = self.reprogClass(softpkg) return cppcomp