本文整理汇总了Python中serial.win32.SETXOFF属性的典型用法代码示例。如果您正苦于以下问题:Python win32.SETXOFF属性的具体用法?Python win32.SETXOFF怎么用?Python win32.SETXOFF使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类serial.win32
的用法示例。
在下文中一共展示了win32.SETXOFF属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: set_output_flow_control
# 需要导入模块: from serial import win32 [as 别名]
# 或者: from serial.win32 import SETXOFF [as 别名]
def set_output_flow_control(self, enable=True):
"""\
Manually control flow - when software flow control is enabled.
This will do the same as if XON (true) or XOFF (false) are received
from the other device and control the transmission accordingly.
WARNING: this function is not portable to different platforms!
"""
if not self._port_handle:
raise portNotOpenError
if enable:
win32.EscapeCommFunction(self._port_handle, win32.SETXON)
else:
win32.EscapeCommFunction(self._port_handle, win32.SETXOFF)
示例2: setXON
# 需要导入模块: from serial import win32 [as 别名]
# 或者: from serial.win32 import SETXOFF [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 level:
win32.EscapeCommFunction(self.hComPort, win32.SETXON)
else:
win32.EscapeCommFunction(self.hComPort, win32.SETXOFF)
示例3: set_output_flow_control
# 需要导入模块: from serial import win32 [as 别名]
# 或者: from serial.win32 import SETXOFF [as 别名]
def set_output_flow_control(self, enable=True):
"""\
Manually control flow - when software flow control is enabled.
This will do the same as if XON (true) or XOFF (false) are received
from the other device and control the transmission accordingly.
WARNING: this function is not portable to different platforms!
"""
if not self.is_open:
raise portNotOpenError
if enable:
win32.EscapeCommFunction(self._port_handle, win32.SETXON)
else:
win32.EscapeCommFunction(self._port_handle, win32.SETXOFF)
示例4: setXON
# 需要导入模块: from serial import win32 [as 别名]
# 或者: from serial.win32 import SETXOFF [as 别名]
def setXON(self, level=True):
"""Platform specific - set flow state."""
if not self.hComPort: raise portNotOpenError
if level:
win32.EscapeCommFunction(self.hComPort, win32.SETXON)
else:
win32.EscapeCommFunction(self.hComPort, win32.SETXOFF)