Files
controller-wisetopdataserver/python/biopro/__pycache__/main.cpython-37.opt-2.pyc
T

39 lines
7.2 KiB
Plaintext
Raw Normal View History

2021-12-20 14:52:55 +08:00
B
2021-12-22 14:29:56 +08:00
ò0Àa|:ã@ddlZddlZddlZddlmZddlmZmZmZm Z ddl
2021-12-20 14:52:55 +08:00
m Z m Z m
Z
mZddlmZddlTddlmZdZGd d
d
2021-12-22 14:29:56 +08:00
eƒZed ed ZGd
2021-12-20 14:52:55 +08:00
ddeejdZGdddeƒZGdddeƒZedkrÜeƒ ¡dS)éN)ÚPath)ÚListÚTypeVarÚOptionalÚCallable)ÚNAMEÚVERSIONÚ REV_VERSIONÚ COPYRIGHT)Ú SocketServer)Ú*)ÚLoggerFceZdZfddZeddddedœdd „ƒZed
ddedœd d ƒZed
ƒee edœddƒZ
edƒee edœddƒZ edƒee edœddƒZ edƒee edœddƒZ
ddZZS)ÚMaincstƒ ¡| tj¡dS)N)ÚsuperÚ__init__Úextend_optionsr
ÚOPTIONS)Úself)Ú __class__©ú0/home/pi/wisetopdataserver/python/biopro/main.pyrs
2021-12-22 14:29:56 +08:00
z
2021-12-20 14:52:55 +08:00
Main.__init__z-hz--helpT)Ú force_return)ÚoptcCs | ¡dS)N)Ú
2021-12-22 14:29:56 +08:00
print_help)rrrrrÚ_help sz
Main._helpz --versioncCs"ttdtƒttƒtdtƒdS)Nz , versionzgit-rev)Úprintrrr
2021-12-20 14:52:55 +08:00
r )rrrrrÚ_versions z
Main._versionZ
controller)ÚcommandÚargvcCstS)N)Ú_ControlServer)rrrrrrÚ_controller_serverszMain._controller_serverÚdatacCstS)N)Ú _DataServer)rrrrrrÚ _data_serverszMain._data_serverZexportcCsddlm}||ƒS)Nr)ÚFileExportMain)Zbiopro.file.exportr$)rrrr$rrrÚ_export_file_service"s zMain._export_file_serviceZledcCsddlm}||ƒS)Nr)ÚLEDControlMain)Zbiopro.impl.ledr&)rrrr&rrrÚ_led_control_service)s zMain._led_control_servicecCs | ¡dS)N)r)rrrrÚrun0szMain.run)Ú__name__Ú
__module__Ú __qualname__rÚ cli_flagsÚstrrrZ cli_commandrr r#r%r'r(Ú
__classcell__rr)rrrs  
rÚS)ÚboundcsZeZdZedœfdd Zeddddedœd d
2021-12-22 14:29:56 +08:00
ƒZeje d œd d
2021-12-20 14:52:55 +08:00
ƒZ
ddZ Z S)Ú _ServerMain)rcs>ddlm}tƒ |¡| tj¡ts:|j|ƒdd|_dS)Nr)ÚProfileOptionszProfile Options (DEBUG))Ú help_section) Zbiopro.util.profiler2rrrr
2021-12-22 14:29:56 +08:00
rÚ_RUNTIME_COMPILEÚprofiling_options)rrr2)rrrr:s    z_ServerMain.__init__z-hz--helpT)r)rcCs | ¡dS)N)r)rrrrrrFsz_ServerMain._help)ÚreturncCsdS)Nr)rrrrÚ
create_serverKsz_ServerMain.create_serverc CsFd}| ¡}tr| ¡}n|j ¡| ¡}WdQRXt |¡dS))r7r4Úmainr5Zgenerate_profile_contextÚsysÚexit)rZ exit_codeZserverrrrr(Os
 z_ServerMain.run)
r)r*r+r-rr,rÚabcÚabstractmethodr r7r(r.rr)rrr18s  r1)Ú metaclassceZdZdZedœfdd Zedddedœd d
ƒZdeee e
2021-12-20 14:52:55 +08:00
ege fe eed œfd
d
Z
2021-12-22 14:29:56 +08:00
eddddeedœfdd ƒZeee eedœddƒZedœddZZS)rz .BPS.config)rcsddlm}ddlm}ddlm}ddlm}tƒ  |¡|j
|ƒdd|_ |j
|ƒdd|_ |j
|ƒd ddd
œd |_