當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。