bluefile_helpers.py 文件源码

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

项目:core-framework 作者: RedhawkSDR 项目源码 文件源码
def getPort(self):
        """
        Returns a Port object of the type CF__POA.Port.                
        """
        # The classobj generates a class using the following arguments:
        #
        #    name:        The name of the class to generate
        #    bases:       A tuple containing all the base classes to use
        #    dct:         A dictionary containing all the attributes such as
        #                 functions, and class variables
        PortClass = classobj('PortClass',
                             (CF__POA.Port,),
                             {'connectPort':self.connectPort,
                              'disconnectPort':self.disconnectPort})

        # Create a port using the generate Metaclass and return an instance 
        port = PortClass()
        return port._this()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号