Commit f29cf2b8 authored by liyuanhong's avatar liyuanhong

测试提交

parent 154ea00c
...@@ -12,7 +12,7 @@ class SendObd(): ...@@ -12,7 +12,7 @@ class SendObd():
def __init__(self): def __init__(self):
self.host = "10.100.12.32" self.host = "10.100.12.32"
self.port = 9008 self.port = 9008
self.timeOut = 2 self.timeOut = 10
self.BUF_SIZE = 1024 self.BUF_SIZE = 1024
self.carId = 202006115001 #设置开始发送的车机号 self.carId = 202006115001 #设置开始发送的车机号
self.totalCar = 5000 #设置将会累加的车机号 self.totalCar = 5000 #设置将会累加的车机号
...@@ -150,7 +150,7 @@ class SendObd(): ...@@ -150,7 +150,7 @@ class SendObd():
msg = self.getOBDMsg_M500(carId,theMileage) msg = self.getOBDMsg_M500(carId,theMileage)
self.sendMsg(msg) self.sendMsg(msg)
time.sleep(5) time.sleep(5)
theMileage = mileage + random.randint(2000,10000) theMileage = mileage + random.randint(5000,10000)
msg = self.getOBDMsg_M500(carId, theMileage) msg = self.getOBDMsg_M500(carId, theMileage)
self.sendMsg(msg) self.sendMsg(msg)
...@@ -162,7 +162,7 @@ class SendObd(): ...@@ -162,7 +162,7 @@ class SendObd():
for i in range(0,self.totalCar): for i in range(0,self.totalCar):
carId = str(self.carId + i) carId = str(self.carId + i)
print(carId) print(carId)
theThread = threading.Thread(target=self.sendTwoObdMsg, args=(carId,220000)) theThread = threading.Thread(target=self.sendTwoObdMsg, args=(carId,260000))
theThread.start() theThread.start()
time.sleep(0.01) time.sleep(0.01)
print(theThread.getName()) print(theThread.getName())
......
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