Commit f29cf2b8 authored by liyuanhong's avatar liyuanhong

测试提交

parent 154ea00c
......@@ -12,7 +12,7 @@ class SendObd():
def __init__(self):
self.host = "10.100.12.32"
self.port = 9008
self.timeOut = 2
self.timeOut = 10
self.BUF_SIZE = 1024
self.carId = 202006115001 #设置开始发送的车机号
self.totalCar = 5000 #设置将会累加的车机号
......@@ -150,7 +150,7 @@ class SendObd():
msg = self.getOBDMsg_M500(carId,theMileage)
self.sendMsg(msg)
time.sleep(5)
theMileage = mileage + random.randint(2000,10000)
theMileage = mileage + random.randint(5000,10000)
msg = self.getOBDMsg_M500(carId, theMileage)
self.sendMsg(msg)
......@@ -162,7 +162,7 @@ class SendObd():
for i in range(0,self.totalCar):
carId = str(self.carId + i)
print(carId)
theThread = threading.Thread(target=self.sendTwoObdMsg, args=(carId,220000))
theThread = threading.Thread(target=self.sendTwoObdMsg, args=(carId,260000))
theThread.start()
time.sleep(0.01)
print(theThread.getName())
......@@ -182,4 +182,4 @@ class SendObd():
if __name__ == "__main__":
obj = SendObd()
obj.sendMultMsgService()
# obj.sendMultMsgServiceArr()
\ No newline at end of file
# obj.sendMultMsgServiceArr()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment