def GetModeOfNode(node: Iir) -> Mode: """Return the mode of a :obj:`node`.""" if node == Null_Iir: raise ValueError("GetModeOfNode: Parameter 'node' must not be 'Null_iir'.") try: return __MODE_TRANSLATION[nodes.Get_Mode(node)] except KeyError: raise LibGHDLException("Unknown mode.")
def _ghdlPortToMode(cls, port): """Return the mode of a :obj:`port`.""" try: return cls._MODE_TRANSLATION[nodes.Get_Mode(port)] except KeyError: raise LibGHDLException("Unknown mode.")