当前位置: 首页>>代码示例>>Python>>正文


Python termios.tcflow方法代码示例

本文整理汇总了Python中termios.tcflow方法的典型用法代码示例。如果您正苦于以下问题:Python termios.tcflow方法的具体用法?Python termios.tcflow怎么用?Python termios.tcflow使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在termios的用法示例。


在下文中一共展示了termios.tcflow方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: flowControlOut

# 需要导入模块: import termios [as 别名]
# 或者: from termios import tcflow [as 别名]
def flowControlOut(self, enable):
        """\
        Manually control flow of outgoing data - when hardware or software flow
        control is enabled.
        WARNING: this function is not portable to different platforms!
        """
        if not self._isOpen: raise portNotOpenError
        if enable:
            termios.tcflow(self.fd, TERMIOS.TCOON)
        else:
            termios.tcflow(self.fd, TERMIOS.TCOOFF)


# assemble Serial class with the platform specifc implementation and the base
# for file-like behavior. for Python 2.6 and newer, that provide the new I/O
# library, derrive from io.RawIOBase 
开发者ID:FSecureLABS,项目名称:Jandroid,代码行数:18,代码来源:serialposix.py

示例2: set_input_flow_control

# 需要导入模块: import termios [as 别名]
# 或者: from termios import tcflow [as 别名]
def set_input_flow_control(self, enable=True):
        """\
        Manually control flow - when software flow control is enabled.
        This will send XON (true) or XOFF (false) to the other device.
        WARNING: this function is not portable to different platforms!
        """
        if not self.is_open:
            raise portNotOpenError
        if enable:
            termios.tcflow(self.fd, termios.TCION)
        else:
            termios.tcflow(self.fd, termios.TCIOFF) 
开发者ID:cedricp,项目名称:ddt4all,代码行数:14,代码来源:serialposix.py

示例3: set_output_flow_control

# 需要导入模块: import termios [as 别名]
# 或者: from termios import tcflow [as 别名]
def set_output_flow_control(self, enable=True):
        """\
        Manually control flow of outgoing data - when hardware or software flow
        control is enabled.
        WARNING: this function is not portable to different platforms!
        """
        if not self.is_open:
            raise portNotOpenError
        if enable:
            termios.tcflow(self.fd, termios.TCOON)
        else:
            termios.tcflow(self.fd, termios.TCOOFF) 
开发者ID:cedricp,项目名称:ddt4all,代码行数:14,代码来源:serialposix.py

示例4: setXON

# 需要导入模块: import termios [as 别名]
# 或者: from termios import tcflow [as 别名]
def setXON(self, level=True):
        """\
        Manually control flow - when software flow control is enabled.
        This will send XON (true) and XOFF (false) to the other device.
        WARNING: this function is not portable to different platforms!
        """
        if not self.hComPort: raise portNotOpenError
        if enable:
            termios.tcflow(self.fd, TERMIOS.TCION)
        else:
            termios.tcflow(self.fd, TERMIOS.TCIOFF) 
开发者ID:FSecureLABS,项目名称:Jandroid,代码行数:13,代码来源:serialposix.py

示例5: flowControl

# 需要导入模块: import termios [as 别名]
# 或者: from termios import tcflow [as 别名]
def flowControl(self, enable):
        """manually control flow - when hardware or software flow control is
        enabled"""
        if not self._isOpen: raise portNotOpenError
        if enable:
            termios.tcflow(self.fd, TERMIOS.TCION)
        else:
            termios.tcflow(self.fd, TERMIOS.TCIOFF)


# assemble Serial class with the platform specifc implementation and the base
# for file-like behavior. for Python 2.6 and newer, that provide the new I/O
# library, derrive from io.RawIOBase 
开发者ID:AstroPrint,项目名称:AstroBox,代码行数:15,代码来源:serialposix.py


注:本文中的termios.tcflow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。