Commit a3bcaa22 刘韬

开机自启动

1 个父辈 d577295e
正在显示 40 个修改的文件 包含 342 行增加795 行删除
# Byte-compiled / optimized / DLL files # Byte-compiled / optimized / DLL files
__pycache__/*
*__pycache__/*
__pycache__/ __pycache__/
*.py[cod] *.py[cod]
*$py.class *$py.class
...@@ -104,4 +106,5 @@ venv.bak/ ...@@ -104,4 +106,5 @@ venv.bak/
.mypy_cache/ .mypy_cache/
# add # add
.idea/
\ No newline at end of file \ No newline at end of file
.idea/
smartshelf/app/__pycache__/induction_post.cpython-39.pyc
...@@ -4,13 +4,14 @@ ...@@ -4,13 +4,14 @@
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": "Python: Flask", "name": "Python: Flask",
"type": "python", "type": "python",
"request": "launch", "request": "launch",
"module": "flask", "module": "flask",
"env": { "env": {
"FLASK_APP": "app", "FLASK_APP": "smartshelf/app",
"FLASK_ENV": "development" "FLASK_ENV": "development"
}, },
"args": [ "args": [
......
cd smartshelf
flask run -p 5000 -h 0.0.0.0
\ No newline at end of file \ No newline at end of file
cd smartshelf/app
flask run -p 5000 -h 0.0.0.0
pause
\ No newline at end of file \ No newline at end of file
{
// 使用 IntelliSense 了解相关属性。
// 悬停以查看现有属性的描述。
// 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Flask",
"type": "python",
"request": "launch",
"module": "flask",
"env": {
"FLASK_APP": "app",
"FLASK_ENV": "development"
},
"args": [
"run",
"--host=0.0.0.0",
"--no-debugger",
"--no-reload"
],
"jinja": true
}
]
}
\ No newline at end of file \ No newline at end of file
import requests
import threading
from flask import Flask from flask import Flask
from flask_babel import Babel from flask_babel import Babel
from config import Config from config import Config
import logging import logging
from logging.handlers import RotatingFileHandler,TimedRotatingFileHandler from logging.handlers import RotatingFileHandler,TimedRotatingFileHandler
# from flask_socketio import SocketIO # from flask_socketio import SocketIO
def setup_log(): def setup_log():
...@@ -18,6 +21,8 @@ def setup_log(): ...@@ -18,6 +21,8 @@ def setup_log():
# 为全局的日志工具对象(flask app使用的)添加日志记录器 # 为全局的日志工具对象(flask app使用的)添加日志记录器
logging.getLogger().addHandler(file_log_handler) logging.getLogger().addHandler(file_log_handler)
Serl=None
setup_log() setup_log()
app = Flask(__name__) app = Flask(__name__)
babel = Babel(app) babel = Babel(app)
...@@ -29,6 +34,15 @@ LANGUAGES = { ...@@ -29,6 +34,15 @@ LANGUAGES = {
"ja": "Japanese" "ja": "Japanese"
} }
from app import induction_post,induction_test,induction_admin,induction_config,autoback,qr_code,scan_collection from app import induction_post,induction_test,induction_admin,induction_config,autoback,qr_code,scan_collection
import time
def s():
data = {'key1':'value1','key2':'value2'}
time.sleep(2)
requests.post("http://127.0.0.1:5000/stoppost",data)
time.sleep(2)
requests.post("http://127.0.0.1:5000/startpost",data)
t =threading.Thread(target=s)
t.start()
# return app # return app
\ No newline at end of file \ No newline at end of file
...@@ -32,8 +32,8 @@ ss16mm[] = {1,---100} ...@@ -32,8 +32,8 @@ ss16mm[] = {1,---100}
{"ADDR":"99","setcalibrate":[1,100,600,150],"threshold":45} {"ADDR":"99","setcalibrate":[1,100,600,150],"threshold":45}
{"ADDR":"99","calibrate":"min","threshold":45} {"ADDR":"99","calibrate":"min","threshold":45}
{"ADDR":"99","setcalibrate":"max","threshold":45} {"ADDR":"99","setcalibrate":"max","threshold":45}
{"ADDR":"1","ledtype":[1,1,1,1,1]}
{"ADDR":"99","action":"siteid","hwid":"FFFFFFF","addr":1}
version 0.3 0708 version 0.3 0708
scan command:"A1\nA2\nA3\n" //for example this command means scan addr 1,2,3 and return 1,2 and 3 location status scan command:"A1\nA2\nA3\n" //for example this command means scan addr 1,2,3 and return 1,2 and 3 location status
......
...@@ -104,9 +104,8 @@ def hancalibrate(): ...@@ -104,9 +104,8 @@ def hancalibrate():
command = str(json.dumps({"ADDR":addr,"setcalibrate":setcalibrate})) + '\n' command = str(json.dumps({"ADDR":addr,"setcalibrate":setcalibrate})) + '\n'
ser = SerialCommunication() ser = SerialCommunication()
ser.send_data(command) ser.send_data(command)
line_response = ser.read_Line()
print (command) print (command)
msg = "handle calibrate:{}已发送".format(line_response) msg = "handle calibrate:{}已发送".format(command)
return json.dumps({'msg':msg}) return json.dumps({'msg':msg})
......
...@@ -105,7 +105,7 @@ def confirm_autostart(): ...@@ -105,7 +105,7 @@ def confirm_autostart():
result = re.findall(r"\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b", ip_config['ip']) result = re.findall(r"\b(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b", ip_config['ip'])
if result: if result:
ip = result[0] ip = result[0]
server_add = "http://{}/smf".format(ip) server_add = "http://{}/neotel".format(ip)
else: else:
server_add = "127.0.0.1:5000" server_add = "127.0.0.1:5000"
line1 = "Comment = star chrome and enter the website for \"{}\"".format(server_add) line1 = "Comment = star chrome and enter the website for \"{}\"".format(server_add)
......
...@@ -14,13 +14,17 @@ from app.utils.location import Location ...@@ -14,13 +14,17 @@ from app.utils.location import Location
from config import Config from config import Config
from app.induction_test import indresetled,read_test_scan from app.induction_test import indresetled,read_test_scan
from app.induction_config import read_state,ip_config,confirm_state,get_towerstate,read_addrs from app.induction_config import read_state,ip_config,confirm_state,get_towerstate,read_addrs
import logging import logging
from serial_config import ReadConfig
ser = SerialCommunication()
detail_dict = {} detail_dict = {}
serverHasReelPosList = []
outTaskInfo = {}
COLORS = Config.COLORS COLORS = Config.COLORS
autostate = {'state':'wait'} autostate = {'state':'wait'}
ser=None
#------------------------------------------------------------ #------------------------------------------------------------
# 自动通信 # 自动通信
...@@ -40,16 +44,19 @@ def startpost(): ...@@ -40,16 +44,19 @@ def startpost():
confirm_state('on') confirm_state('on')
is_start = True is_start = True
ser = SerialCommunication() ser = SerialCommunication()
tower_state = get_towerstate() reset_tower()
tower_state = get_towerstate()
threads = [] threads = []
threads.append(threading.Thread(target=serverboard)) threads.append(threading.Thread(target=serverboard))
threads.append(threading.Thread(target=show_blink)) threads.append(threading.Thread(target=show_blink))
threads.append(threading.Thread(target=show_tower)) #threads.append(threading.Thread(target=show_tower))
for t in threads: for t in threads:
t.start() t.start()
msg = '启动成功' msg = '启动成功'
current_state = 'on' current_state = 'on'
logging.warning("启动成功") logging.warning("启动成功")
# else: # else:
# current_state = 'off' # current_state = 'off'
# msg = '构建库位原始数据表失败/与服务器通信失败' # msg = '构建库位原始数据表失败/与服务器通信失败'
...@@ -106,6 +113,30 @@ def load_location(): ...@@ -106,6 +113,30 @@ def load_location():
config_dict,convert_dict = location_cof.read_location_file() config_dict,convert_dict = location_cof.read_location_file()
locations = location_cof.production_location_init() locations = location_cof.production_location_init()
#从服务器定时获取有料的库位列表
def updateServerHasReelPosList():
global serverHasReelPosList
global outTaskInfo
url = ip_config['ip'] + '/service/store/sensorShelf/shelfStatus'
data = {"cid":ip_config['cid']}
try:
response = requests.get(url, params=data,timeout=2)
in_location = response.json()
serverHasReelPosList = []
outTaskInfo = {}
if in_location['code'] == 0:
serverHasReelPosList = in_location['data']["hasReelPosList"]
outTaskList = in_location['data']["outTaskList"]
for outTask in outTaskList:
posInfo=outTask.split("=")
pos = posInfo[0]
color = posInfo[1].lower()
outTaskInfo[pos] = color
logging.warning("{} out task:{} ----- {}".format(outTask,pos,color))
except Exception as e:
logging.warning("从服务器获取有料的库位列表失败:{}".format(e))
# 构建库位原始数据表/更新当前有库存的库位状态 # 构建库位原始数据表/更新当前有库存的库位状态
def origin_location_init(): def origin_location_init():
global locations global locations
...@@ -121,7 +152,7 @@ def origin_location_init(): ...@@ -121,7 +152,7 @@ def origin_location_init():
# detail_dict[line_addr] = ['0'] * 100 # detail_dict[line_addr] = ['0'] * 100
response = requests.get(url, params=data,timeout=2) response = requests.get(url, params=data,timeout=2)
in_location = response.json() in_location = response.json()
print ('-----------locations',in_location['data']) # print ('-----------locations',in_location['data'])
if in_location['code'] == 0: if in_location['code'] == 0:
dataaddrs = read_addrs() dataaddrs = read_addrs()
addrs=dataaddrs.split('@') addrs=dataaddrs.split('@')
...@@ -130,8 +161,8 @@ def origin_location_init(): ...@@ -130,8 +161,8 @@ def origin_location_init():
for locnum in in_location['data']: for locnum in in_location['data']:
if locations.get(locnum,''): if locations.get(locnum,''):
# loctions[locnum]['sensor_state'] = '1' # loctions[locnum]['sensor_state'] = '1'
locations[locnum]['color'] = 'orange' # locations[locnum]['color'] = 'orange'
locations[locnum]['action'] = True locations[locnum]['action'] = False
if detail_dict.get(locations[locnum]['addr'],''): if detail_dict.get(locations[locnum]['addr'],''):
sensor_index = locations[locnum]['sensor_index'] - 1 sensor_index = locations[locnum]['sensor_index'] - 1
detail_dict[locations[locnum]['addr']][sensor_index] = '1' detail_dict[locations[locnum]['addr']][sensor_index] = '1'
...@@ -162,6 +193,7 @@ def serverboard(): ...@@ -162,6 +193,7 @@ def serverboard():
for addr in addrs: for addr in addrs:
command +=addr + '\n' command +=addr + '\n'
seq = 1 seq = 1
ser=SerialCommunication();
while is_start: while is_start:
if detail_dict: if detail_dict:
# print ('detai-dict-----------------',detail_dict) # print ('detai-dict-----------------',detail_dict)
...@@ -169,19 +201,21 @@ def serverboard(): ...@@ -169,19 +201,21 @@ def serverboard():
server_post(seq) server_post(seq)
ser.send_data(command) ser.send_data(command)
location_status=ser.read_alldata() location_status=ser.read_alldata()
# print (location_status) # print (location_status)
cur_dict = production_filter(location_status) cur_dict = production_filter(location_status)
updateServerHasReelPosList()
in_loc,out_loc = compare_detail(cur_dict) in_loc,out_loc = compare_detail(cur_dict)
send_loc_server(in_loc,out_loc) send_loc_server(in_loc,out_loc)
end = timeit.default_timer() end = timeit.default_timer()
print (str(end-start)) print (str(end-start))
# logging.warning("scan运行中---------") # logging.warning("scan运行中---------")
seq += 1 seq += 1
time.sleep(0.5) time.sleep(0.6)
autostate['state'] = 'success' autostate['state'] = 'success'
else: else:
origin_location_init() origin_location_init()
time.sleep(0.5) updateServerHasReelPosList()
time.sleep(0.6)
autostate['state'] = 'failed' autostate['state'] = 'failed'
# logging.warning("检测服务器状态中....") # logging.warning("检测服务器状态中....")
autostate['state'] = 'wait' autostate['state'] = 'wait'
...@@ -216,7 +250,7 @@ def resolve_data(datajson): ...@@ -216,7 +250,7 @@ def resolve_data(datajson):
for stock in openstock: for stock in openstock:
single=stock.split("=") single=stock.split("=")
if locations.get(single[0]): if locations.get(single[0]):
print (single[1].lower()) #print (single[1].lower())
locations[single[0]]['color'] = single[1].lower() locations[single[0]]['color'] = single[1].lower()
locations[single[0]]['action'] = True locations[single[0]]['action'] = True
else: else:
...@@ -227,7 +261,10 @@ def resolve_data(datajson): ...@@ -227,7 +261,10 @@ def resolve_data(datajson):
for stock in offstock: for stock in offstock:
single = stock.split("=") single = stock.split("=")
if config_dict.get(single[0]): if config_dict.get(single[0]):
locations[single[0]]['color'] = 'off'
locations[single[0]]['action'] = True
single.append('off') single.append('off')
logging.warning("close{}".format(single[0]))
# guide_leds.append(single) # guide_leds.append(single)
else: else:
logging.warning("未找到库位配置:{}".format(config_dict.get(single[0]))) logging.warning("未找到库位配置:{}".format(config_dict.get(single[0])))
...@@ -240,6 +277,9 @@ def resolve_data(datajson): ...@@ -240,6 +277,9 @@ def resolve_data(datajson):
def compare_detail(cur_dict): def compare_detail(cur_dict):
global detail_dict global detail_dict
global locations global locations
global serverHasReelPosList
global outTaskInfo
in_loc = [] in_loc = []
out_loc = [] out_loc = []
for addr,cursensors in cur_dict.items(): for addr,cursensors in cur_dict.items():
...@@ -253,12 +293,63 @@ def compare_detail(cur_dict): ...@@ -253,12 +293,63 @@ def compare_detail(cur_dict):
led_add_loc = convert_dict[sensorindex] led_add_loc = convert_dict[sensorindex]
# led_index = int(led_add_loc.split('@')[0]) # led_index = int(led_add_loc.split('@')[0])
locnumber = led_add_loc.split('@')[2] locnumber = led_add_loc.split('@')[2]
if oldsensor != cursensors[i] and oldsensor == '0': #与服务器有库位进行比对
in_loc.append(locnumber) if locnumber in serverHasReelPosList:
print ('compare in_loc:{}'.format(locnumber)) #服务器该库位有数据
elif oldsensor != cursensors[i] and oldsensor == '1': if cursensors[i] == '1':
out_loc.append(locnumber) #库位有料,与服务器一致
print ('compare out_loc:{}'.format(locnumber)) if locations[locnumber]['in_blink'] or locations[locnumber]['out_blink']:
#正在闪烁的不处理
logging.debug("{} blink no opetion ".format(locnumber))
else:
#有料,且与服务器一致,改灯颜色为orange
posColor = outTaskInfo.get(locnumber,'orange')
logging.info("location:{}, old color:{}, new color:{}".format(locnumber,locations[locnumber]['color'],posColor))
if not locations[locnumber]['color'] == posColor:
locations[locnumber]['outloc_ng'] = False
locations[locnumber]['inloc_ng'] = False
locations[locnumber]['color'] = posColor
locations[locnumber]['action'] = True
if cursensors[i] == '0':
#库位无料,与服务器不一致
if locations[locnumber]['in_blink'] or locations[locnumber]['out_blink']:
#正在闪烁的不处理
logging.debug("{} blink no opetion ".format(locnumber))
elif locations[locnumber]['outloc_ng']:
#已经NG的,亮红灯
#locations[locnumber]['color'] = 'red'
#locations[locnumber]['action'] = True
logging.debug("{} outloc_ng to red ".format(locnumber))
else:
#没处理过,需要发送到服务器
out_loc.append(locnumber)
else:
#服务器该库位无料
if cursensors[i] == '1':
#库位有料,与服务器不一致
if locations[locnumber]['in_blink'] or locations[locnumber]['out_blink']:
#正在闪烁的不处理
logging.debug("{} out blink no opetion ".format(locnumber))
elif locations[locnumber]['inloc_ng']:
#已经NG的,亮红灯
#locations[locnumber]['color'] = 'red'
#locations[locnumber]['action'] = True
logging.debug("{} inloc_ng to red ".format(locnumber))
else:
#没处理过,需要发送到服务器
in_loc.append(locnumber)
if cursensors[i] == '0':
#库位无料,且与服务器一致
if locations[locnumber]['in_blink'] or locations[locnumber]['out_blink']:
#正在闪烁的不处理
logging.debug("{} blink no opetion ".format(locnumber))
else:
#库位无料,且与服务器一致,关灯
if not locations[locnumber]['color'] == 'off':
locations[locnumber]['outloc_ng'] = False
locations[locnumber]['inloc_ng'] = False
locations[locnumber]['color'] = 'off'
locations[locnumber]['action'] = True
detail_dict[addr] = cursensors detail_dict[addr] = cursensors
# print ('--------------------in_lock',in_loc) # print ('--------------------in_lock',in_loc)
# print ('--------------------out_loc',out_loc) # print ('--------------------out_loc',out_loc)
...@@ -266,7 +357,6 @@ def compare_detail(cur_dict): ...@@ -266,7 +357,6 @@ def compare_detail(cur_dict):
# if cur_dict: # if cur_dict:
# detail_dict = cur_dict # detail_dict = cur_dict
return real_in_loc,real_out_lock return real_in_loc,real_out_lock
# 检查并清除入库/出库ng # 检查并清除入库/出库ng
def filter_ng(in_loc,out_loc): def filter_ng(in_loc,out_loc):
global locations global locations
...@@ -289,32 +379,42 @@ def filter_ng(in_loc,out_loc): ...@@ -289,32 +379,42 @@ def filter_ng(in_loc,out_loc):
# 发送入库/出库库位到服务器 # 发送入库/出库库位到服务器
def send_loc_server(in_loc,out_loc): def send_loc_server(in_loc,out_loc):
# http://ip/smdbox/service/store/sensorShelf/sensorChange # http://ip/smdbox/service/store/sensorShelf/sensorChange
# global current_on # global current_on
# print ('--------------------origin_in_loc',in_loc) # print ('--------------------origin_in_loc',in_loc)
# print ('--------------------origin_out_loc',out_loc) # print ('--------------------origin_out_loc',out_loc)
global locations
in_ng_loc = []
out_ng_loc = []
for locnum, locvalue in locations.items():
if locvalue['inloc_ng']:
in_ng_loc.append(locnum)
if locvalue['outloc_ng']:
out_ng_loc.append(locnum)
headers = {'content-type': "application/x-www-form-urlencoded"} headers = {'content-type': "application/x-www-form-urlencoded"}
url = ip_config['ip'] + '/service/store/sensorShelf/sensorChange' url = ip_config['ip'] + '/service/store/sensorShelf/sensorChange'
data = {"cid":ip_config['cid'],"hasReelPosList":in_loc,"noReelPosList":out_loc} data = {"cid":ip_config['cid'],"hasReelPosList":in_loc,"hasReelPosErrorList": in_ng_loc,"noReelPosList":out_loc,"noReelPosErrorList":out_ng_loc}
try: try:
response = requests.post(url, data=data,headers= headers,timeout=2) response = requests.post(url, data=data,headers= headers,timeout=2)
print ('send_loc_server send_data:{}'.format(data))
rec_data = response.json() rec_data = response.json()
print ('send_loc_server rec_data:{}'.format(rec_data)) print(rec_data)
if rec_data['code'] == 0: if rec_data['code'] == 0:
in_ok = rec_data['data']["inOkList"] in_ok = rec_data['data']["inOkList"]
out_ok = rec_data['data']["outOkList"] out_ok = rec_data['data']["outOkList"]
in_ng = rec_data['data']["inNgList"] in_ng = rec_data['data']["inNgList"]
out_ng = rec_data['data']["outNgList"] out_ng = rec_data['data']["outNgList"]
ng_to_ok = rec_data['data']["ngToOk"]
update_to_location(in_ng,flag=0) update_to_location(in_ng,flag=0)
update_to_location(out_ng,flag=4) update_to_location(out_ng,flag=4)
update_to_location(in_ok,flag=1) update_to_location(in_ok,flag=1)
update_to_location(out_ok,flag=2) update_to_location(out_ok,flag=2)
update_to_location(ng_to_ok,flag=5)
# show_response(in_leds,out_leds,ng_leds) # show_response(in_leds,out_leds,ng_leds)
print ('--------------------in_ok',in_ok) # print ('--------------------in_ok',in_ok)
print ('--------------------out_ok',out_ok) # print ('--------------------out_ok',out_ok)
print ('--------------------in_ng',in_ng) # print ('--------------------in_ng',in_ng)
print ('--------------------out_ng',out_ng) # print ('--------------------out_ng',out_ng)
except Exception as e: except Exception as e:
logging.warning("send_loc_server error:{}".format(e)) logging.warning("send_loc_server error:{}".format(e))
...@@ -347,6 +447,13 @@ def update_to_location(locdata,flag): ...@@ -347,6 +447,13 @@ def update_to_location(locdata,flag):
locations[loc]['color'] = 'red' locations[loc]['color'] = 'red'
locations[loc]['action'] = True locations[loc]['action'] = True
logging.warning('出库ng库位,亮红色灯:{}'.format(loc)) logging.warning('出库ng库位,亮红色灯:{}'.format(loc))
if flag == 5:
for loc in locdata:
if locations[loc]['outloc_ng']:
locations[loc]['outloc_ng'] = False
locations[loc]['color'] = 'off'
locations[loc]['action'] = True
logging.warning('ng库位恢复:{}'.format(loc))
# thread control led # thread control led
...@@ -354,15 +461,21 @@ def show_blink(): ...@@ -354,15 +461,21 @@ def show_blink():
global locations global locations
blink_leds = {} blink_leds = {}
while is_start: while is_start:
blinks,ngs = [],[] blink_status = {'side':'both','status':False}
ng_status = {'side':'both','status':False}
blink_leds = {} blink_leds = {}
for locnum,locvalue in locations.items(): for locnum,locvalue in locations.items():
action_value = check_pre(locvalue) action_value = check_pre(locvalue)
locside='both'
if 'locside' in locvalue:
locside = locvalue['locside']
# print ('--------------action_value',action_value) # print ('--------------action_value',action_value)
if locvalue['in_blink'] or locvalue['out_blink']: if locvalue['in_blink'] or locvalue['out_blink']:
blinks.append('1') blink_status['side'] = locside
blink_status['status'] = True
if locvalue['inloc_ng'] or locvalue['outloc_ng']: if locvalue['inloc_ng'] or locvalue['outloc_ng']:
ngs.append('1') ng_status['side'] = locside
ng_status['status'] = True
addr = locvalue['addr'] addr = locvalue['addr']
color = locvalue['color'] color = locvalue['color']
led_index = locvalue['led_index'] led_index = locvalue['led_index']
...@@ -403,7 +516,7 @@ def show_blink(): ...@@ -403,7 +516,7 @@ def show_blink():
update_locations(blink_leds,addr,color,led_index) update_locations(blink_leds,addr,color,led_index)
locations[locnum]['action'] = False locations[locnum]['action'] = False
blink_convert(blink_leds) blink_convert(blink_leds)
update_tower(blinks,ngs) update_tower(blink_status,ng_status)
time.sleep(0.5) time.sleep(0.5)
def check_pre(locvalue): def check_pre(locvalue):
...@@ -447,7 +560,8 @@ def update_locations(blink_leds,addr,color,led_index): ...@@ -447,7 +560,8 @@ def update_locations(blink_leds,addr,color,led_index):
def blink_convert(blink_leds): def blink_convert(blink_leds):
print ("blink_leds:{}".format(blink_leds)) ser=SerialCommunication();
print ('blink_leds:{}'.format(blink_leds))
if blink_leds: if blink_leds:
# texts = "" # texts = ""
texts = [] texts = []
...@@ -462,18 +576,20 @@ def blink_convert(blink_leds): ...@@ -462,18 +576,20 @@ def blink_convert(blink_leds):
# texts += command + '\n' # texts += command + '\n'
texts.append(command + '\n') texts.append(command + '\n')
# texts += str(json.dumps(command)) + '\n' # texts += str(json.dumps(command)) + '\n'
logging.warning(texts) #logging.warning(texts)
# print ('-------------------------------------texts',len(texts.encode())) # print ('-------------------------------------texts',len(texts.encode()))
# 分地址发送 # 分地址发送
if texts: if texts:
for line in texts: for line in texts:
ser.send_data(line) ser.send_data(line)
print(line)
time.sleep(0.1)
# return texts # return texts
#控制状态灯 #控制状态灯
def show_tower(): def show_tower():
ser=SerialCommunication();
global tower_state global tower_state
# ser = SerialCommunication()
time.sleep(1) time.sleep(1)
while is_start: while is_start:
lightons = [] lightons = []
...@@ -497,31 +613,79 @@ def show_tower(): ...@@ -497,31 +613,79 @@ def show_tower():
ser.send_data(maincommand) ser.send_data(maincommand)
time.sleep(0.5) time.sleep(0.5)
def update_tower(blinks,ngs):
def send_tower_status_light():
global tower_state global tower_state
print (blinks,ngs) lightons = []
if blinks: lightoffs = []
if tower_state['2@5']['status'] == 'off': for tower,state in tower_state.items():
tower_state['2@5']['action'] = True if state['action']:
tower_state['2@5']['status'] = 'on' towers = [int(i) for i in tower.split('@')]
if state['status'] == 'on':
lightons.extend(towers)
logging.warning('--------------status light {} open'.format(towers))
# tower_state[tower]['status'] = ''
else:
#关闭该状态灯
logging.warning('--------------status light {} close'.format(towers))
lightoffs.extend(towers)
tower_state[tower]['action'] = False
if lightons or lightoffs:
command_dicts = {"ADDR":"0","lighton":lightons,"lightoff":lightoffs}
maincommand = str(json.dumps(command_dicts)) + '\n'
# print ('------------------maincommand',maincommand)
ser.send_data(maincommand)
#1@4 红色
#2@5 绿色
#3@6 黄色
RedTWLed = '1@4'
YellowTWLed = '2@5'
GreenTWLed = '3@6'
def update_tower(blink_status,ng_status):
global tower_state
#print (blinks,ngs)
thisYellowTWLed = YellowTWLed
if blink_status['side'].lower()=='a':
thisYellowTWLed=YellowTWLed.partition('@')[0]
elif blink_status['side'].lower()=='b':
thisYellowTWLed=YellowTWLed.partition('@')[0]
if blink_status['status']:
if tower_state[thisYellowTWLed]['status'] == 'off':
tower_state[thisYellowTWLed]['action'] = True
tower_state[thisYellowTWLed]['status'] = 'on'
else:
tower_state[thisYellowTWLed]['action'] = True
tower_state[thisYellowTWLed]['status'] = 'off'
else: else:
if tower_state['2@5']['status'] == 'on': if tower_state[thisYellowTWLed]['status'] == 'on':
tower_state['2@5']['action'] = True tower_state[thisYellowTWLed]['action'] = True
tower_state['2@5']['status'] = 'off' tower_state[thisYellowTWLed]['status'] = 'off'
if ngs:
if tower_state['1@4']['status'] == 'off': thisRedTWLed = RedTWLed
tower_state['1@4']['action'] = True if ng_status['side'].lower()=='a':
tower_state['1@4']['status'] = 'on' thisRedTWLed=RedTWLed.partition('@')[0]
elif ng_status['side'].lower()=='b':
thisRedTWLed=RedTWLed.partition('@')[2]
if ng_status['status']:
if tower_state[thisRedTWLed]['status'] == 'off':
tower_state[thisRedTWLed]['action'] = True
tower_state[thisRedTWLed]['status'] = 'on'
else:
tower_state[thisRedTWLed]['action'] = True
tower_state[thisRedTWLed]['status'] = 'off'
else: else:
if tower_state['1@4']['status'] == 'on': if tower_state[thisRedTWLed]['status'] == 'on':
tower_state['1@4']['action'] = True tower_state[thisRedTWLed]['action'] = True
tower_state['1@4']['status'] = 'off' tower_state[thisRedTWLed]['status'] = 'off'
# print ('---------------------------------tower_state',tower_state) # print ('---------------------------------tower_state',tower_state)
send_tower_status_light()
def reset_tower(): def reset_tower():
ser=SerialCommunication();
command_dicts = {"ADDR":"0","lightoff":[1,2,3,4,5,6]} command_dicts = {"ADDR":"0","lightoff":[1,2,3,4,5,6]}
maincommand = str(json.dumps(command_dicts)) + '\n' maincommand = str(json.dumps(command_dicts)) + '\n'
# print (maincommand) print (maincommand)
ser.send_data(maincommand) ser.send_data(maincommand)
...@@ -531,10 +695,10 @@ def auto_start(): ...@@ -531,10 +695,10 @@ def auto_start():
if state == 'on': if state == 'on':
confirm_state('off') confirm_state('off')
time.sleep(2) time.sleep(2)
logging.warning("开机自启动") logging.warning("11111111111")
startpost() startpost()
auto_start() #auto_start()
# 开机启动请求服务器动作 # 开机启动请求服务器动作
# state = read_state() # state = read_state()
# is_start = True # is_start = True
...@@ -543,4 +707,4 @@ auto_start() ...@@ -543,4 +707,4 @@ auto_start()
# threads.append(threading.Thread(target=serverboard)) # threads.append(threading.Thread(target=serverboard))
# for t in threads: # for t in threads:
# t.start() # t.start()
# logging.warning("启动成功")
\ No newline at end of file \ No newline at end of file
# logging.warning("启动成功")
...@@ -21,12 +21,12 @@ from flask_babel import Babel, gettext as _ ...@@ -21,12 +21,12 @@ from flask_babel import Babel, gettext as _
import serial import serial
import timeit import timeit
# from serial_config import ReadConfig # from serial_config import ReadConfig
#serl=None
curren_l = 'zh' curren_l = 'zh'
scan_state = False scan_state = False
config_dict,convert_dict = Location().read_location_file() config_dict,convert_dict = Location().read_location_file()
option_list = Location().init_location_option() option_list = Location().init_location_option()
ser = SerialCommunication() #ser = SerialCommunication()
# state_addr = [] # state_addr = []
basepath = os.path.dirname(__file__) basepath = os.path.dirname(__file__)
uploads_path = basepath + Config.UPLOAD_FOLDER uploads_path = basepath + Config.UPLOAD_FOLDER
...@@ -144,6 +144,7 @@ def process_linetest(data): ...@@ -144,6 +144,7 @@ def process_linetest(data):
@app.route('/indlineledon', methods=['POST']) @app.route('/indlineledon', methods=['POST'])
# @checkscan # @checkscan
def indlineledon(): def indlineledon():
ser=SerialCommunication();
data = request.get_json() data = request.get_json()
texts = process_linetest(data) texts = process_linetest(data)
logging.warning("指令:{}".format(texts)) logging.warning("指令:{}".format(texts))
...@@ -160,6 +161,7 @@ def indlineledon(): ...@@ -160,6 +161,7 @@ def indlineledon():
@app.route('/indlineledoff', methods=['POST']) @app.route('/indlineledoff', methods=['POST'])
def indlineledoff(): def indlineledoff():
ser=SerialCommunication();
data = request.get_json() data = request.get_json()
texts = process_linetest(data) texts = process_linetest(data)
logging.warning("指令:{}".format(texts)) logging.warning("指令:{}".format(texts))
...@@ -195,6 +197,7 @@ def process_lightindex(data): ...@@ -195,6 +197,7 @@ def process_lightindex(data):
# 库位灯打开 # 库位灯打开
@app.route('/indledopen',methods=['POST']) @app.route('/indledopen',methods=['POST'])
def indledopen(): def indledopen():
ser=SerialCommunication();
data = request.get_json() data = request.get_json()
texts = process_lightindex(data) texts = process_lightindex(data)
# logging.warning("当前通道1ON_LED:{},当前通道2ON_LED:{}".format(led_lights1,led_lights2)) # logging.warning("当前通道1ON_LED:{},当前通道2ON_LED:{}".format(led_lights1,led_lights2))
...@@ -208,6 +211,7 @@ def indledopen(): ...@@ -208,6 +211,7 @@ def indledopen():
# 库位灯关闭 # 库位灯关闭
@app.route('/indledoff',methods=['POST']) @app.route('/indledoff',methods=['POST'])
def indledoff(): def indledoff():
ser=SerialCommunication();
data = request.get_json() data = request.get_json()
texts = process_lightindex(data) texts = process_lightindex(data)
print (texts) print (texts)
...@@ -219,6 +223,7 @@ def indledoff(): ...@@ -219,6 +223,7 @@ def indledoff():
@app.route('/indresetled',methods=['POST']) @app.route('/indresetled',methods=['POST'])
def indresetled(): def indresetled():
ser=SerialCommunication();
try: try:
data = {'channel_num':'all','channel_color':'off'} data = {'channel_num':'all','channel_color':'off'}
texts = process_linetest(data) texts = process_linetest(data)
...@@ -239,6 +244,7 @@ def indresetled(): ...@@ -239,6 +244,7 @@ def indresetled():
@app.route('/indworkinglight',methods=['POST']) @app.route('/indworkinglight',methods=['POST'])
def indworkinglight(): def indworkinglight():
ser=SerialCommunication();
data = request.get_json() data = request.get_json()
# channel = data['workchannel'] # channel = data['workchannel']
text=maincollection(data) text=maincollection(data)
...@@ -251,6 +257,7 @@ def indworkinglight(): ...@@ -251,6 +257,7 @@ def indworkinglight():
@app.route('/indworkingoff',methods=['POST']) @app.route('/indworkingoff',methods=['POST'])
def indworkingoff(): def indworkingoff():
ser=SerialCommunication();
data = request.get_json() data = request.get_json()
text=maincollection(data) text=maincollection(data)
ser.send_data(text) ser.send_data(text)
...@@ -284,7 +291,7 @@ def scancom(): ...@@ -284,7 +291,7 @@ def scancom():
@app.route('/resetmain',methods=['POST']) @app.route('/resetmain',methods=['POST'])
def resetmain(): def resetmain():
# ser = SerialCommunication() ser = SerialCommunication()
data = request.get_json() data = request.get_json()
text=maincollection(data) text=maincollection(data)
print (text) print (text)
...@@ -295,6 +302,7 @@ def resetmain(): ...@@ -295,6 +302,7 @@ def resetmain():
@app.route('/powermain',methods=['POST']) @app.route('/powermain',methods=['POST'])
def powermain(): def powermain():
ser=SerialCommunication();
data = request.get_json() data = request.get_json()
text=maincollection(data) text=maincollection(data)
print (text) print (text)
......
...@@ -29,27 +29,27 @@ def production_filter(origin_value): ...@@ -29,27 +29,27 @@ def production_filter(origin_value):
return cur_dict return cur_dict
def transfer(origin_value): def transfer(origin_value):
cur_dict = {} cur_dict = {}
if origin_value: if origin_value:
# receive_data=origin_value.split("\n") # receive_data=origin_value.split("\n")
receive_data=origin_value.decode().split("\r\n") receive_data=origin_value.decode().split("\r\n")
for item in receive_data[::-1]: for item in receive_data[::-1]:
if not (item.startswith("A") and item.endswith("]")): if not (item.startswith("A") and item.endswith("]")):
receive_data.remove(item) receive_data.remove(item)
print (item) print (item)
print("筛选后的数据:", receive_data) print("筛选后的数据:", receive_data)
if receive_data: if receive_data:
for line in receive_data: for line in receive_data:
# print ("-----------------line",line) # print ("-----------------line",line)
addr = re.search("(?<=A)\d+",line) addr = re.search("(?<=A)\d+",line)
led = re.search("\[.*?\]", line) led = re.search("\[.*?\]", line)
c_list = list(led.group()) c_list = list(led.group())
# print ("-------------------c_list",c_list) # print ("-------------------c_list",c_list)
c_list.pop(0) c_list.pop(0)
c_list.pop(-1) c_list.pop(-1)
keyword = 'A' + addr.group() keyword = 'A' + addr.group()
cur_dict[keyword] = c_list cur_dict[keyword] = c_list
return cur_dict return cur_dict
def change_deatil(old_dict): def change_deatil(old_dict):
global s_detail global s_detail
......
A1@A2@A3@A4@A5@A6@A7@A8@A9
\ No newline at end of file \ No newline at end of file
A1
\ No newline at end of file \ No newline at end of file
http://192.168.101.108/smdbox,ls01 http://192.168.1.243/smf-core,4
\ No newline at end of file \ No newline at end of file
/dev/ttyUSB0
\ No newline at end of file \ No newline at end of file
/dev/ttyUSB0
\ No newline at end of file \ No newline at end of file
/dev/ttyUSBCOM9
\ No newline at end of file \ No newline at end of file
1.3-0818
\ No newline at end of file \ No newline at end of file
1.2
\ No newline at end of file \ No newline at end of file
λÖÃ,address,led,sensor,ÓÅÏȼ¶,¸ß¶È,¿í¶È λÖÃ,address,led,sensor,ÓÅÏȼ¶,¸ß¶È,¿í¶È
L001-04-001,A1,1,1,10,12,15 L001-06-001,A1,1,1,10,12,15
L001-03-002,A1,2,2,10,12,15 L001-06-002,A1,2,2,10,12,15
L001-03-003,A1,3,3,10,12,15 L001-06-003,A1,3,3,10,12,15
L001-03-004,A1,4,4,10,12,15 L001-06-004,A1,4,4,10,12,15
L001-03-005,A1,5,5,10,12,15 L001-06-005,A1,5,5,10,12,15
L001-03-006,A1,6,21,10,12,15 L001-06-006,A1,6,6,10,12,15
L001-03-007,A1,7,22,10,12,15 L001-06-007,A1,7,7,10,12,15
L001-03-008,A1,8,23,10,12,15 L001-06-008,A1,8,11,10,12,15
L001-03-009,A1,9,24,10,12,15 L001-06-009,A1,9,12,10,12,15
L001-03-010,A1,10,25,10,12,15 L001-06-010,A1,10,13,10,12,15
L001-03-011,A1,11,26,10,12,15
L001-03-012,A1,12,27,10,12,15
L001-03-013,A1,13,41,10,12,15
L001-03-014,A1,14,42,10,12,15
L001-03-015,A1,15,43,10,12,15
L001-03-016,A1,16,44,10,12,15
L001-03-017,A1,17,45,10,12,15
L001-03-018,A1,18,46,10,12,15
L001-03-019,A1,19,47,10,12,15
L001-03-020,A1,20,61,10,12,15
L001-03-021,A1,21,62,10,12,15
L001-03-022,A1,22,63,10,12,15
L001-03-023,A1,23,64,10,12,15
L001-03-024,A1,24,65,10,12,15
L001-03-025,A1,25,66,10,12,15
L001-03-026,A1,26,67,10,12,15
L001-03-027,A1,27,81,10,12,15
L001-03-028,A1,28,82,10,12,15
L001-03-029,A1,29,83,10,12,15
L001-03-030,A1,30,84,10,12,15
L001-03-031,A1,31,85,10,12,15
L001-03-032,A1,32,86,10,12,15
L001-03-033,A1,33,87,10,12,15
L002-03-001,A2,1,1,10,12,15
L002-03-002,A2,2,2,10,12,15
L002-03-003,A2,3,3,10,12,15
L002-03-004,A2,4,4,10,12,15
L002-03-005,A2,5,5,10,12,15
L002-03-006,A2,6,6,10,12,15
L002-03-007,A2,7,7,10,12,15
L002-03-008,A2,8,11,10,12,15
L002-03-009,A2,9,12,10,12,15
L002-03-010,A2,10,13,10,12,15
L002-03-011,A2,11,14,10,12,15
L002-03-012,A2,12,15,10,12,15
L002-03-013,A2,13,16,10,12,15
L002-03-014,A2,14,17,10,12,15
L002-03-015,A2,15,21,10,12,15
L002-03-016,A2,16,22,10,12,15
L002-03-017,A2,17,23,10,12,15
L002-03-018,A2,18,24,10,12,15
L002-03-019,A2,19,25,10,12,15
L002-03-020,A2,20,26,10,12,15
L002-03-021,A2,21,27,10,12,15
L002-03-022,A2,22,31,10,12,15
L002-03-023,A2,23,32,10,12,15
L002-03-024,A2,24,33,10,12,15
L002-03-025,A2,25,34,10,12,15
L002-03-026,A2,26,35,10,12,15
L002-03-027,A2,27,36,10,12,15
L002-03-028,A2,28,41,10,12,15
L002-03-029,A2,29,42,10,12,15
L002-03-030,A2,30,43,10,12,15
L002-03-031,A2,31,44,10,12,15
L002-03-032,A2,32,45,10,12,15
L002-03-033,A2,33,46,10,12,15
L002-03-034,A2,34,47,10,12,15
L002-03-035,A2,35,51,10,12,15
L002-03-036,A2,36,52,10,12,15
L002-03-037,A2,37,53,10,12,15
L002-03-038,A2,38,54,10,12,15
L002-03-039,A2,39,55,10,12,15
L002-03-040,A2,40,56,10,12,15
L002-03-041,A2,41,61,10,12,15
L002-03-042,A2,42,62,10,12,15
L002-03-043,A2,43,63,10,12,15
L002-03-044,A2,44,64,10,12,15
L002-03-045,A2,45,65,10,12,15
L002-03-046,A2,46,66,10,12,15
L002-03-047,A2,47,67,10,12,15
L002-03-048,A2,48,71,10,12,15
L002-03-049,A2,49,72,10,12,15
L002-03-050,A2,50,73,10,12,15
L002-03-051,A2,51,74,10,12,15
L002-03-052,A2,52,75,10,12,15
L002-03-053,A2,53,76,10,12,15
L002-03-054,A2,54,81,10,12,15
L002-03-055,A2,55,82,10,12,15
L002-03-056,A2,56,83,10,12,15
L002-03-057,A2,57,84,10,12,15
L002-03-058,A2,58,85,10,12,15
L002-03-059,A2,59,86,10,12,15
L002-03-060,A2,60,87,10,12,15
L002-03-061,A2,61,91,10,12,15
L002-03-062,A2,62,92,10,12,15
L002-03-063,A2,63,93,10,12,15
L002-03-064,A2,64,94,10,12,15
L002-03-065,A2,65,95,10,12,15
L002-03-066,A2,66,96,10,12,15
L003-03-001,A3,1,1,10,12,15
L003-03-002,A3,2,2,10,12,15
L003-03-003,A3,3,3,10,12,15
L003-03-004,A3,4,4,10,12,15
L003-03-005,A3,5,5,10,12,15
L003-03-006,A3,6,6,10,12,15
L003-03-007,A3,7,7,10,12,15
L003-03-008,A3,8,11,10,12,15
L003-03-009,A3,9,12,10,12,15
L003-03-010,A3,10,13,10,12,15
L003-03-011,A3,11,14,10,12,15
L003-03-012,A3,12,15,10,12,15
L003-03-013,A3,13,16,10,12,15
L003-03-014,A3,14,17,10,12,15
L003-03-015,A3,15,21,10,12,15
L003-03-016,A3,16,22,10,12,15
L003-03-017,A3,17,23,10,12,15
L003-03-018,A3,18,24,10,12,15
L003-03-019,A3,19,25,10,12,15
L003-03-020,A3,20,26,10,12,15
L003-03-021,A3,21,27,10,12,15
L003-03-022,A3,22,31,10,12,15
L003-03-023,A3,23,32,10,12,15
L003-03-024,A3,24,33,10,12,15
L003-03-025,A3,25,34,10,12,15
L003-03-026,A3,26,35,10,12,15
L003-03-027,A3,27,36,10,12,15
L003-03-028,A3,28,41,10,12,15
L003-03-029,A3,29,42,10,12,15
L003-03-030,A3,30,43,10,12,15
L003-03-031,A3,31,44,10,12,15
L003-03-032,A3,32,45,10,12,15
L003-03-033,A3,33,46,10,12,15
L003-03-034,A3,34,47,10,12,15
L003-03-035,A3,35,51,10,12,15
L003-03-036,A3,36,52,10,12,15
L003-03-037,A3,37,53,10,12,15
L003-03-038,A3,38,54,10,12,15
L003-03-039,A3,39,55,10,12,15
L003-03-040,A3,40,56,10,12,15
L003-03-041,A3,41,61,10,12,15
L003-03-042,A3,42,62,10,12,15
L003-03-043,A3,43,63,10,12,15
L003-03-044,A3,44,64,10,12,15
L003-03-045,A3,45,65,10,12,15
L003-03-046,A3,46,66,10,12,15
L003-03-047,A3,47,67,10,12,15
L003-03-048,A3,48,71,10,12,15
L003-03-049,A3,49,72,10,12,15
L003-03-050,A3,50,73,10,12,15
L003-03-051,A3,51,74,10,12,15
L003-03-052,A3,52,75,10,12,15
L003-03-053,A3,53,76,10,12,15
L003-03-054,A3,54,81,10,12,15
L003-03-055,A3,55,82,10,12,15
L003-03-056,A3,56,83,10,12,15
L003-03-057,A3,57,84,10,12,15
L003-03-058,A3,58,85,10,12,15
L003-03-059,A3,59,86,10,12,15
L003-03-060,A3,60,87,10,12,15
L003-03-061,A3,61,91,10,12,15
L003-03-062,A3,62,92,10,12,15
L003-03-063,A3,63,93,10,12,15
L003-03-064,A3,64,94,10,12,15
L003-03-065,A3,65,95,10,12,15
L003-03-066,A3,66,96,10,12,15
L004-03-001,A4,1,1,10,12,15
L004-03-002,A4,2,2,10,12,15
L004-03-003,A4,3,3,10,12,15
L004-03-004,A4,4,4,10,12,15
L004-03-005,A4,5,5,10,12,15
L004-03-006,A4,6,6,10,12,15
L004-03-007,A4,7,7,10,12,15
L004-03-008,A4,8,8,10,12,15
L004-03-009,A4,9,9,10,12,15
L004-03-010,A4,10,10,10,12,15
L004-03-011,A4,11,11,10,12,15
L004-03-012,A4,12,12,10,12,15
L004-03-013,A4,13,13,10,12,15
L004-03-014,A4,14,14,10,12,15
L004-03-015,A4,15,15,10,12,15
L004-03-016,A4,16,16,10,12,15
L004-03-017,A4,17,17,10,12,15
L004-03-018,A4,18,18,10,12,15
L004-03-019,A4,19,19,10,12,15
L004-03-020,A4,20,20,10,12,15
L004-03-021,A4,21,21,10,12,15
L004-03-022,A4,22,22,10,12,15
L004-03-023,A4,23,23,10,12,15
L004-03-024,A4,24,24,10,12,15
L004-03-025,A4,25,25,10,12,15
L004-03-026,A4,26,26,10,12,15
L004-03-027,A4,27,27,10,12,15
L004-03-028,A4,28,28,10,12,15
L004-03-029,A4,29,29,10,12,15
L004-03-030,A4,30,30,10,12,15
L004-03-031,A4,31,31,10,12,15
L004-03-032,A4,32,32,10,12,15
L004-03-033,A4,33,33,10,12,15
L004-03-034,A4,34,34,10,12,15
L004-03-035,A4,35,35,10,12,15
L004-03-036,A4,36,36,10,12,15
L004-03-037,A4,37,37,10,12,15
L004-03-038,A4,38,38,10,12,15
L004-03-039,A4,39,39,10,12,15
L004-03-040,A4,40,40,10,12,15
L004-03-041,A4,41,41,10,12,15
L004-03-042,A4,42,42,10,12,15
L004-03-043,A4,43,43,10,12,15
L004-03-044,A4,44,44,10,12,15
L004-03-045,A4,45,45,10,12,15
L004-03-046,A4,46,46,10,12,15
L004-03-047,A4,47,47,10,12,15
L004-03-048,A4,48,48,10,12,15
L004-03-049,A4,49,49,10,12,15
L004-03-050,A4,50,50,10,12,15
L004-03-051,A4,51,51,10,12,15
L004-03-052,A4,52,52,10,12,15
L004-03-053,A4,53,53,10,12,15
L004-03-054,A4,54,54,10,12,15
L004-03-055,A4,55,55,10,12,15
L004-03-056,A4,56,56,10,12,15
L004-03-057,A4,57,57,10,12,15
L004-03-058,A4,58,58,10,12,15
L004-03-059,A4,59,59,10,12,15
L004-03-060,A4,60,60,10,12,15
L004-03-061,A4,61,61,10,12,15
L004-03-062,A4,62,62,10,12,15
L004-03-063,A4,63,63,10,12,15
L004-03-064,A4,64,64,10,12,15
L004-03-065,A4,65,65,10,12,15
L004-03-066,A4,66,66,10,12,15
L004-03-067,A4,67,67,10,12,15
L004-03-068,A4,68,68,10,12,15
L004-03-069,A4,69,69,10,12,15
L004-03-070,A4,70,70,10,12,15
L004-03-071,A4,71,71,10,12,15
L004-03-072,A4,72,72,10,12,15
L004-03-073,A4,73,73,10,12,15
L004-03-074,A4,74,74,10,12,15
L004-03-075,A4,75,75,10,12,15
L004-03-076,A4,76,76,10,12,15
L004-03-077,A4,77,77,10,12,15
L004-03-078,A4,78,78,10,12,15
L004-03-079,A4,79,79,10,12,15
L004-03-080,A4,80,80,10,12,15
L004-03-081,A4,81,81,10,12,15
L004-03-082,A4,82,82,10,12,15
L004-03-083,A4,83,83,10,12,15
L004-03-084,A4,84,84,10,12,15
L004-03-085,A4,85,85,10,12,15
L004-03-086,A4,86,86,10,12,15
L004-03-087,A4,87,87,10,12,15
L004-03-088,A4,88,88,10,12,15
L004-03-089,A4,89,89,10,12,15
L004-03-090,A4,90,90,10,12,15
L004-03-091,A4,91,91,10,12,15
L004-03-092,A4,92,92,10,12,15
L004-03-093,A4,93,93,10,12,15
L004-03-094,A4,94,94,10,12,15
L004-03-095,A4,95,95,10,12,15
L004-03-096,A4,96,96,10,12,15
L004-03-097,A4,97,97,10,12,15
L004-03-098,A4,98,98,10,12,15
L004-03-099,A4,99,99,10,12,15
L004-03-100,A4,100,100,10,12,15
L005-03-001,A5,1,1,10,12,15
L005-03-002,A5,2,2,10,12,15
L005-03-003,A5,3,3,10,12,15
L005-03-004,A5,4,4,10,12,15
L005-03-005,A5,5,5,10,12,15
L005-03-006,A5,6,6,10,12,15
L005-03-007,A5,7,7,10,12,15
L005-03-008,A5,8,8,10,12,15
L005-03-009,A5,9,9,10,12,15
L005-03-010,A5,10,10,10,12,15
L005-03-011,A5,11,11,10,12,15
L005-03-012,A5,12,12,10,12,15
L005-03-013,A5,13,13,10,12,15
L005-03-014,A5,14,14,10,12,15
L005-03-015,A5,15,15,10,12,15
L005-03-016,A5,16,16,10,12,15
L005-03-017,A5,17,17,10,12,15
L005-03-018,A5,18,18,10,12,15
L005-03-019,A5,19,19,10,12,15
L005-03-020,A5,20,20,10,12,15
L005-03-021,A5,21,21,10,12,15
L005-03-022,A5,22,22,10,12,15
L005-03-023,A5,23,23,10,12,15
L005-03-024,A5,24,24,10,12,15
L005-03-025,A5,25,25,10,12,15
L005-03-026,A5,26,26,10,12,15
L005-03-027,A5,27,27,10,12,15
L005-03-028,A5,28,28,10,12,15
L005-03-029,A5,29,29,10,12,15
L005-03-030,A5,30,30,10,12,15
L005-03-031,A5,31,31,10,12,15
L005-03-032,A5,32,32,10,12,15
L005-03-033,A5,33,33,10,12,15
L005-03-034,A5,34,34,10,12,15
L005-03-035,A5,35,35,10,12,15
L005-03-036,A5,36,36,10,12,15
L005-03-037,A5,37,37,10,12,15
L005-03-038,A5,38,38,10,12,15
L005-03-039,A5,39,39,10,12,15
L005-03-040,A5,40,40,10,12,15
L005-03-041,A5,41,41,10,12,15
L005-03-042,A5,42,42,10,12,15
L005-03-043,A5,43,43,10,12,15
L005-03-044,A5,44,44,10,12,15
L005-03-045,A5,45,45,10,12,15
L005-03-046,A5,46,46,10,12,15
L005-03-047,A5,47,47,10,12,15
L005-03-048,A5,48,48,10,12,15
L005-03-049,A5,49,49,10,12,15
L005-03-050,A5,50,50,10,12,15
L005-03-051,A5,51,51,10,12,15
L005-03-052,A5,52,52,10,12,15
L005-03-053,A5,53,53,10,12,15
L005-03-054,A5,54,54,10,12,15
L005-03-055,A5,55,55,10,12,15
L005-03-056,A5,56,56,10,12,15
L005-03-057,A5,57,57,10,12,15
L005-03-058,A5,58,58,10,12,15
L005-03-059,A5,59,59,10,12,15
L005-03-060,A5,60,60,10,12,15
L005-03-061,A5,61,61,10,12,15
L005-03-062,A5,62,62,10,12,15
L005-03-063,A5,63,63,10,12,15
L005-03-064,A5,64,64,10,12,15
L005-03-065,A5,65,65,10,12,15
L005-03-066,A5,66,66,10,12,15
L005-03-067,A5,67,67,10,12,15
L005-03-068,A5,68,68,10,12,15
L005-03-069,A5,69,69,10,12,15
L005-03-070,A5,70,70,10,12,15
L005-03-071,A5,71,71,10,12,15
L005-03-072,A5,72,72,10,12,15
L005-03-073,A5,73,73,10,12,15
L005-03-074,A5,74,74,10,12,15
L005-03-075,A5,75,75,10,12,15
L005-03-076,A5,76,76,10,12,15
L005-03-077,A5,77,77,10,12,15
L005-03-078,A5,78,78,10,12,15
L005-03-079,A5,79,79,10,12,15
L005-03-080,A5,80,80,10,12,15
L005-03-081,A5,81,81,10,12,15
L005-03-082,A5,82,82,10,12,15
L005-03-083,A5,83,83,10,12,15
L005-03-084,A5,84,84,10,12,15
L005-03-085,A5,85,85,10,12,15
L005-03-086,A5,86,86,10,12,15
L005-03-087,A5,87,87,10,12,15
L005-03-088,A5,88,88,10,12,15
L005-03-089,A5,89,89,10,12,15
L005-03-090,A5,90,90,10,12,15
L005-03-091,A5,91,91,10,12,15
L005-03-092,A5,92,92,10,12,15
L005-03-093,A5,93,93,10,12,15
L005-03-094,A5,94,94,10,12,15
L005-03-095,A5,95,95,10,12,15
L005-03-096,A5,96,96,10,12,15
L005-03-097,A5,97,97,10,12,15
L005-03-098,A5,98,98,10,12,15
L005-03-099,A5,99,99,10,12,15
L005-03-100,A5,100,100,10,12,15
L006-03-001,A6,1,1,10,12,15
L006-03-002,A6,2,2,10,12,15
L006-03-003,A6,3,3,10,12,15
L006-03-004,A6,4,4,10,12,15
L006-03-005,A6,5,5,10,12,15
L006-03-006,A6,6,6,10,12,15
L006-03-007,A6,7,7,10,12,15
L006-03-008,A6,8,11,10,12,15
L006-03-009,A6,9,12,10,12,15
L006-03-010,A6,10,13,10,12,15
L006-03-011,A6,11,14,10,12,15
L006-03-012,A6,12,15,10,12,15
L006-03-013,A6,13,16,10,12,15
L006-03-014,A6,14,17,10,12,15
L006-03-015,A6,15,21,10,12,15
L006-03-016,A6,16,22,10,12,15
L006-03-017,A6,17,23,10,12,15
L006-03-018,A6,18,24,10,12,15
L006-03-019,A6,19,25,10,12,15
L006-03-020,A6,20,26,10,12,15
L006-03-021,A6,21,27,10,12,15
L006-03-022,A6,22,31,10,12,15
L006-03-023,A6,23,32,10,12,15
L006-03-024,A6,24,33,10,12,15
L006-03-025,A6,25,34,10,12,15
L006-03-026,A6,26,35,10,12,15
L006-03-027,A6,27,36,10,12,15
L006-03-028,A6,28,41,10,12,15
L006-03-029,A6,29,42,10,12,15
L006-03-030,A6,30,43,10,12,15
L006-03-031,A6,31,44,10,12,15
L006-03-032,A6,32,45,10,12,15
L006-03-033,A6,33,46,10,12,15
L006-03-034,A6,34,47,10,12,15
L006-03-035,A6,35,51,10,12,15
L006-03-036,A6,36,52,10,12,15
L006-03-037,A6,37,53,10,12,15
L006-03-038,A6,38,54,10,12,15
L006-03-039,A6,39,55,10,12,15
L006-03-040,A6,40,56,10,12,15
L006-03-041,A6,41,61,10,12,15
L006-03-042,A6,42,62,10,12,15
L006-03-043,A6,43,63,10,12,15
L006-03-044,A6,44,64,10,12,15
L006-03-045,A6,45,65,10,12,15
L006-03-046,A6,46,66,10,12,15
L006-03-047,A6,47,67,10,12,15
L006-03-048,A6,48,71,10,12,15
L006-03-049,A6,49,72,10,12,15
L006-03-050,A6,50,73,10,12,15
L006-03-051,A6,51,74,10,12,15
L006-03-052,A6,52,75,10,12,15
L006-03-053,A6,53,76,10,12,15
L006-03-054,A6,54,81,10,12,15
L006-03-055,A6,55,82,10,12,15
L006-03-056,A6,56,83,10,12,15
L006-03-057,A6,57,84,10,12,15
L006-03-058,A6,58,85,10,12,15
L006-03-059,A6,59,86,10,12,15
L006-03-060,A6,60,87,10,12,15
L006-03-061,A6,61,91,10,12,15
L006-03-062,A6,62,92,10,12,15
L006-03-063,A6,63,93,10,12,15
L006-03-064,A6,64,94,10,12,15
L006-03-065,A6,65,95,10,12,15
L006-03-066,A6,66,96,10,12,15
L007-03-001,A7,1,1,10,12,15
L007-03-002,A7,2,2,10,12,15
L007-03-003,A7,3,3,10,12,15
L007-03-004,A7,4,4,10,12,15
L007-03-005,A7,5,5,10,12,15
L007-03-006,A7,6,6,10,12,15
L007-03-007,A7,7,7,10,12,15
L007-03-008,A7,8,11,10,12,15
L007-03-009,A7,9,12,10,12,15
L007-03-010,A7,10,13,10,12,15
L007-03-011,A7,11,14,10,12,15
L007-03-012,A7,12,15,10,12,15
L007-03-013,A7,13,16,10,12,15
L007-03-014,A7,14,17,10,12,15
L007-03-015,A7,15,21,10,12,15
L007-03-016,A7,16,22,10,12,15
L007-03-017,A7,17,23,10,12,15
L007-03-018,A7,18,24,10,12,15
L007-03-019,A7,19,25,10,12,15
L007-03-020,A7,20,26,10,12,15
L007-03-021,A7,21,27,10,12,15
L007-03-022,A7,22,31,10,12,15
L007-03-023,A7,23,32,10,12,15
L007-03-024,A7,24,33,10,12,15
L007-03-025,A7,25,34,10,12,15
L007-03-026,A7,26,35,10,12,15
L007-03-027,A7,27,36,10,12,15
L007-03-028,A7,28,41,10,12,15
L007-03-029,A7,29,42,10,12,15
L007-03-030,A7,30,43,10,12,15
L007-03-031,A7,31,44,10,12,15
L007-03-032,A7,32,45,10,12,15
L007-03-033,A7,33,46,10,12,15
L007-03-034,A7,34,47,10,12,15
L007-03-035,A7,35,51,10,12,15
L007-03-036,A7,36,52,10,12,15
L007-03-037,A7,37,53,10,12,15
L007-03-038,A7,38,54,10,12,15
L007-03-039,A7,39,55,10,12,15
L007-03-040,A7,40,56,10,12,15
L007-03-041,A7,41,61,10,12,15
L007-03-042,A7,42,62,10,12,15
L007-03-043,A7,43,63,10,12,15
L007-03-044,A7,44,64,10,12,15
L007-03-045,A7,45,65,10,12,15
L007-03-046,A7,46,66,10,12,15
L007-03-047,A7,47,67,10,12,15
L007-03-048,A7,48,71,10,12,15
L007-03-049,A7,49,72,10,12,15
L007-03-050,A7,50,73,10,12,15
L007-03-051,A7,51,74,10,12,15
L007-03-052,A7,52,75,10,12,15
L007-03-053,A7,53,76,10,12,15
L007-03-054,A7,54,81,10,12,15
L007-03-055,A7,55,82,10,12,15
L007-03-056,A7,56,83,10,12,15
L007-03-057,A7,57,84,10,12,15
L007-03-058,A7,58,85,10,12,15
L007-03-059,A7,59,86,10,12,15
L007-03-060,A7,60,87,10,12,15
L007-03-061,A7,61,91,10,12,15
L007-03-062,A7,62,92,10,12,15
L007-03-063,A7,63,93,10,12,15
L007-03-064,A7,64,94,10,12,15
L007-03-065,A7,65,95,10,12,15
L007-03-066,A7,66,96,10,12,15
L008-03-001,A8,1,1,10,12,15
L008-03-002,A8,2,2,10,12,15
L008-03-003,A8,3,3,10,12,15
L008-03-004,A8,4,4,10,12,15
L008-03-005,A8,5,5,10,12,15
L008-03-006,A8,6,6,10,12,15
L008-03-007,A8,7,7,10,12,15
L008-03-008,A8,8,8,10,12,15
L008-03-009,A8,9,9,10,12,15
L008-03-010,A8,10,10,10,12,15
L008-03-011,A8,11,11,10,12,15
L008-03-012,A8,12,12,10,12,15
L008-03-013,A8,13,13,10,12,15
L008-03-014,A8,14,14,10,12,15
L008-03-015,A8,15,15,10,12,15
L008-03-016,A8,16,16,10,12,15
L008-03-017,A8,17,17,10,12,15
L008-03-018,A8,18,18,10,12,15
L008-03-019,A8,19,19,10,12,15
L008-03-020,A8,20,20,10,12,15
L008-03-021,A8,21,21,10,12,15
L008-03-022,A8,22,22,10,12,15
L008-03-023,A8,23,23,10,12,15
L008-03-024,A8,24,24,10,12,15
L008-03-025,A8,25,25,10,12,15
L008-03-026,A8,26,26,10,12,15
L008-03-027,A8,27,27,10,12,15
L008-03-028,A8,28,28,10,12,15
L008-03-029,A8,29,29,10,12,15
L008-03-030,A8,30,30,10,12,15
L008-03-031,A8,31,31,10,12,15
L008-03-032,A8,32,32,10,12,15
L008-03-033,A8,33,33,10,12,15
L008-03-034,A8,34,34,10,12,15
L008-03-035,A8,35,35,10,12,15
L008-03-036,A8,36,36,10,12,15
L008-03-037,A8,37,37,10,12,15
L008-03-038,A8,38,38,10,12,15
L008-03-039,A8,39,39,10,12,15
L008-03-040,A8,40,40,10,12,15
L008-03-041,A8,41,41,10,12,15
L008-03-042,A8,42,42,10,12,15
L008-03-043,A8,43,43,10,12,15
L008-03-044,A8,44,44,10,12,15
L008-03-045,A8,45,45,10,12,15
L008-03-046,A8,46,46,10,12,15
L008-03-047,A8,47,47,10,12,15
L008-03-048,A8,48,48,10,12,15
L008-03-049,A8,49,49,10,12,15
L008-03-050,A8,50,50,10,12,15
L008-03-051,A8,51,51,10,12,15
L008-03-052,A8,52,52,10,12,15
L008-03-053,A8,53,53,10,12,15
L008-03-054,A8,54,54,10,12,15
L008-03-055,A8,55,55,10,12,15
L008-03-056,A8,56,56,10,12,15
L008-03-057,A8,57,57,10,12,15
L008-03-058,A8,58,58,10,12,15
L008-03-059,A8,59,59,10,12,15
L008-03-060,A8,60,60,10,12,15
L008-03-061,A8,61,61,10,12,15
L008-03-062,A8,62,62,10,12,15
L008-03-063,A8,63,63,10,12,15
L008-03-064,A8,64,64,10,12,15
L008-03-065,A8,65,65,10,12,15
L008-03-066,A8,66,66,10,12,15
L008-03-067,A8,67,67,10,12,15
L008-03-068,A8,68,68,10,12,15
L008-03-069,A8,69,69,10,12,15
L008-03-070,A8,70,70,10,12,15
L008-03-071,A8,71,71,10,12,15
L008-03-072,A8,72,72,10,12,15
L008-03-073,A8,73,73,10,12,15
L008-03-074,A8,74,74,10,12,15
L008-03-075,A8,75,75,10,12,15
L008-03-076,A8,76,76,10,12,15
L008-03-077,A8,77,77,10,12,15
L008-03-078,A8,78,78,10,12,15
L008-03-079,A8,79,79,10,12,15
L008-03-080,A8,80,80,10,12,15
L008-03-081,A8,81,81,10,12,15
L008-03-082,A8,82,82,10,12,15
L008-03-083,A8,83,83,10,12,15
L008-03-084,A8,84,84,10,12,15
L008-03-085,A8,85,85,10,12,15
L008-03-086,A8,86,86,10,12,15
L008-03-087,A8,87,87,10,12,15
L008-03-088,A8,88,88,10,12,15
L008-03-089,A8,89,89,10,12,15
L008-03-090,A8,90,90,10,12,15
L008-03-091,A8,91,91,10,12,15
L008-03-092,A8,92,92,10,12,15
L008-03-093,A8,93,93,10,12,15
L008-03-094,A8,94,94,10,12,15
L008-03-095,A8,95,95,10,12,15
L008-03-096,A8,96,96,10,12,15
L008-03-097,A8,97,97,10,12,15
L008-03-098,A8,98,98,10,12,15
L008-03-099,A8,99,99,10,12,15
L008-03-100,A8,100,100,10,12,15
L009-03-001,A9,1,1,10,12,15
L009-03-002,A9,2,2,10,12,15
L009-03-003,A9,3,3,10,12,15
L009-03-004,A9,4,4,10,12,15
L009-03-005,A9,5,5,10,12,15
L009-03-006,A9,6,6,10,12,15
L009-03-007,A9,7,7,10,12,15
L009-03-008,A9,8,8,10,12,15
L009-03-009,A9,9,9,10,12,15
L009-03-010,A9,10,10,10,12,15
L009-03-011,A9,11,11,10,12,15
L009-03-012,A9,12,12,10,12,15
L009-03-013,A9,13,13,10,12,15
L009-03-014,A9,14,14,10,12,15
L009-03-015,A9,15,15,10,12,15
L009-03-016,A9,16,16,10,12,15
L009-03-017,A9,17,17,10,12,15
L009-03-018,A9,18,18,10,12,15
L009-03-019,A9,19,19,10,12,15
L009-03-020,A9,20,20,10,12,15
L009-03-021,A9,21,21,10,12,15
L009-03-022,A9,22,22,10,12,15
L009-03-023,A9,23,23,10,12,15
L009-03-024,A9,24,24,10,12,15
L009-03-025,A9,25,25,10,12,15
L009-03-026,A9,26,26,10,12,15
L009-03-027,A9,27,27,10,12,15
L009-03-028,A9,28,28,10,12,15
L009-03-029,A9,29,29,10,12,15
L009-03-030,A9,30,30,10,12,15
L009-03-031,A9,31,31,10,12,15
L009-03-032,A9,32,32,10,12,15
L009-03-033,A9,33,33,10,12,15
L009-03-034,A9,34,34,10,12,15
L009-03-035,A9,35,35,10,12,15
L009-03-036,A9,36,36,10,12,15
L009-03-037,A9,37,37,10,12,15
L009-03-038,A9,38,38,10,12,15
L009-03-039,A9,39,39,10,12,15
L009-03-040,A9,40,40,10,12,15
L009-03-041,A9,41,41,10,12,15
L009-03-042,A9,42,42,10,12,15
L009-03-043,A9,43,43,10,12,15
L009-03-044,A9,44,44,10,12,15
L009-03-045,A9,45,45,10,12,15
L009-03-046,A9,46,46,10,12,15
L009-03-047,A9,47,47,10,12,15
L009-03-048,A9,48,48,10,12,15
L009-03-049,A9,49,49,10,12,15
L009-03-050,A9,50,50,10,12,15
L009-03-051,A9,51,51,10,12,15
L009-03-052,A9,52,52,10,12,15
L009-03-053,A9,53,53,10,12,15
L009-03-054,A9,54,54,10,12,15
L009-03-055,A9,55,55,10,12,15
L009-03-056,A9,56,56,10,12,15
L009-03-057,A9,57,57,10,12,15
L009-03-058,A9,58,58,10,12,15
L009-03-059,A9,59,59,10,12,15
L009-03-060,A9,60,60,10,12,15
L009-03-061,A9,61,61,10,12,15
L009-03-062,A9,62,62,10,12,15
L009-03-063,A9,63,63,10,12,15
L009-03-064,A9,64,64,10,12,15
L009-03-065,A9,65,65,10,12,15
L009-03-066,A9,66,66,10,12,15
L009-03-067,A9,67,67,10,12,15
L009-03-068,A9,68,68,10,12,15
L009-03-069,A9,69,69,10,12,15
L009-03-070,A9,70,70,10,12,15
L009-03-071,A9,71,71,10,12,15
L009-03-072,A9,72,72,10,12,15
L009-03-073,A9,73,73,10,12,15
L009-03-074,A9,74,74,10,12,15
L009-03-075,A9,75,75,10,12,15
L009-03-076,A9,76,76,10,12,15
L009-03-077,A9,77,77,10,12,15
L009-03-078,A9,78,78,10,12,15
L009-03-079,A9,79,79,10,12,15
L009-03-080,A9,80,80,10,12,15
L009-03-081,A9,81,81,10,12,15
L009-03-082,A9,82,82,10,12,15
L009-03-083,A9,83,83,10,12,15
L009-03-084,A9,84,84,10,12,15
L009-03-085,A9,85,85,10,12,15
L009-03-086,A9,86,86,10,12,15
L009-03-087,A9,87,87,10,12,15
L009-03-088,A9,88,88,10,12,15
L009-03-089,A9,89,89,10,12,15
L009-03-090,A9,90,90,10,12,15
L009-03-091,A9,91,91,10,12,15
L009-03-092,A9,92,92,10,12,15
L009-03-093,A9,93,93,10,12,15
L009-03-094,A9,94,94,10,12,15
L009-03-095,A9,95,95,10,12,15
L009-03-096,A9,96,96,10,12,15
L009-03-097,A9,97,97,10,12,15
L009-03-098,A9,98,98,10,12,15
L009-03-099,A9,99,99,10,12,15
L009-03-100,A9,100,100,10,12,15
class g():
def __init__(self):
self.seal=None
@property
def name(self):
return self.seal
@name.setter
def name(self, value):
self.seal = value
...@@ -4,15 +4,17 @@ ...@@ -4,15 +4,17 @@
@ content: 串口通讯实现类 @ content: 串口通讯实现类
@ date: 2021.5.10 @ date: 2021.5.10
''' '''
import imp
import serial import serial
import serial.tools.list_ports import serial.tools.list_ports
import logging import logging
from config import Config from config import Config
serl = None
# from serial_config import ReadConfig # from serial_config import ReadConfig
# from app.induction_config import read_com # from app.induction_config import read_com
class SerialCommunication(): class SerialCommunication():
def __init__(self): def __init__(self):
global serl
# serial_cf = ReadConfig() # serial_cf = ReadConfig()
# self.port = serial_cf.get_serial("DEFAULT_COM") # self.port = serial_cf.get_serial("DEFAULT_COM")
# self.bps = int(serial_cf.get_serial("DEFAULT_BAUDRATE")) # self.bps = int(serial_cf.get_serial("DEFAULT_BAUDRATE"))
...@@ -24,14 +26,16 @@ class SerialCommunication(): ...@@ -24,14 +26,16 @@ class SerialCommunication():
self.port = serialcom.strip("\n") self.port = serialcom.strip("\n")
self.bps = 115200 self.bps = 115200
self.timeout = 1 self.timeout = 1
try: if serl is None:
# 打开串口,并得到串口对象 try:
self.main_engine= serial.Serial(port=self.port,baudrate=self.bps,timeout=self.timeout) # 打开串口,并得到串口对象
# 判断是否打开成功 serl = serial.Serial(port=self.port,baudrate=self.bps,timeout=self.timeout)
# if (self.main_engine.is_open): # 判断是否打开成功
# print ("串口已打开") # if (self.main_engine.is_open):
except Exception as e: # print ("串口已打开")
print("---异常---:", e) except Exception as e:
print("---异常---:", e)
self.main_engine=serl
# 打印设备基本信息 # 打印设备基本信息
def print_name(self): def print_name(self):
......
此文件类型无法预览
此文件的差异太大,无法显示。
flask run -p 5000 -h 0.0.0.0
pause
\ No newline at end of file \ No newline at end of file
import configparser import configparser
import os import os
import time import time
import config as Config
class ReadConfig(): class ReadConfig():
"""定义一个读取配置文件的类""" """定义一个读取配置文件的类"""
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!