from tacsrc.ports import Ports class BlockType: def __init__(self, name): self.name = name self.inputs = Ports() self.outputs = Ports() def getIODescription(self, block): result = "" inputDescription = self.inputs.getIODescription(block) if len(inputDescription) != 0: result += "\\\\nINPUTS:" result += inputDescription outputDescription = self.outputs.getIODescription(block) if len(outputDescription) != 0: result += "\\\\nOUTPUTS:" result += outputDescription return result