global generateHeader generateHeader.println(""" namespace schematic { """) usages = generateHeader.netlist.find_nets_using_ref(generateHeader.ref) for usage in usages: node = usage.node_for_ref(generateHeader.ref) if 7 <= node.pin <= 12: generateHeader.println("static const int ANALOG_" + usage.name + " = " + str(node.pin - 7) + ";") elif 13 <= node.pin <= 26: generateHeader.println("static const int " + usage.name + " = " + str(node.pin - 13) + ";") generateHeader.println(""" } // namespace schematic """)