bluefile_helpers.py 文件源码

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

项目:core-framework 作者: RedhawkSDR 项目源码 文件源码
def __init__(self, input_stream=None, porttype=None, rem_file=False):
        """
        Instantiates a new object responsible for writing data from the port 
        into a file.  The file name is given by the input_stream variable.

        It is important to notice that the porttype is a BULKIO__POA type and
        not a BULKIO type.  The reason is because it is used to generate a 
        Port class that will be returned when the getPort() is invoked.  The
        returned class is the one acting as a server and therefore must be a
        Portable Object Adapter rather and a simple BULKIO object.

        Inputs:
            <input_stream>    The X-Midas file to generate
            <porttype>        The BULKIO__POA data type
            <rem_file>        Removes the input_stream if present 
        """

        if input_stream != None and os.path.isfile(input_stream):
            os.remove(input_stream)

        self.port_type = porttype
        self.outFile = input_stream
        self.port_lock = threading.Lock()
        self.eos_cond = threading.Condition(self.port_lock)
        self.gotEOS = False
        self.header = None
        self.done = False
        self._firstPacket = True
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号