def _get_frdata(stream, num, name, ctype=None):
ctypes = (ctype,) if ctype else ('<STR_LIT>', '<STR_LIT>', '<STR_LIT>')<EOL>for ctype in ctypes:<EOL><INDENT>_reader = getattr(stream, '<STR_LIT>'.format(ctype.title()))<EOL>try:<EOL><INDENT>return _reader(num, name)<EOL><DEDENT>except IndexError as exc:<EOL><INDENT>if FRERR_NO_CHANNEL_OF_TYPE.match(str(exc)):<EOL><INDENT>continue<EOL><DEDENT>raise<EOL><DEDENT><DEDENT>raise ValueError("<STR_LIT>"<EOL>"<STR_LIT>".format(name))<EOL>
Brute force-ish method to return the FrData structure for a channel

    This saves on pulling the channel type from the TOC