constrained_client.py 文件源码

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

项目:creator-system-test-framework 作者: CreatorDev 项目源码 文件源码
def __init__(self, clientID, bootstrapURI, port, serialPort, debug=False, verbose=False):
        super(ConstrainedClientSerial, self).__init__(clientID, bootstrapURI, port, debug, verbose)

        print("Creating serial")
        serialConnection = serial.Serial(
                                     port=serialPort,
                                     baudrate=57600,  # 115200,
                                     parity=serial.PARITY_NONE,
                                     stopbits=serial.STOPBITS_ONE,  # STOPBITS_TWO
                                     bytesize=serial.EIGHTBITS
        )

        #self._clientSession = fdpexpect.fdspawn(self._serial, logfile=open("constrained_client_serial.log", "w"))
        self._clientSession = SerialSession(serialConnection)
        self._sendline("")  # FIXME - This should be a reboot?

        self.expect("Contiki>")
        self.init()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号