io_helpers.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:core-framework 作者: RedhawkSDR 项目源码 文件源码
def attach(self, streamData=None, name=None):
        """
        streamData: type BULKIO.SDDSStreamDefinition
        name: user id (string)

        The return value is the attachment id (use this to detach)

        If there exists more than one connection, then the return value is a list
        of all attachment id's generated

        """
        if streamData == None:
            streamData = createSDDSStreamDefinition()
        if name == None:
            name = _socket.gethostname()+'_user'
        if not isinstance(streamData, _BULKIO.SDDSStreamDefinition):
            raise Exception("streamData must be of type BULKIO.SDDSStreamDefinition")
        if not isinstance(name, str):
            raise Exception("name must be of <type 'str'>")
        retval = self._src.attach(streamData, name)
        if retval:
            self._streamdefs[name] = streamData
        return retval
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号