Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue_django_test
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周田
vue_django_test
Commits
2030137d
Commit
2030137d
authored
Aug 28, 2023
by
周田
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:发送消息给 device 模块
parent
7d680efc
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
107 additions
and
417 deletions
+107
-417
urls.py
chat/urls.py
+0
-1
mod_agi_pb2.py
mqtt/auto_generate_python/mod_agi_pb2.py
+0
-38
mod_return_pb2.py
mqtt/auto_generate_python/mod_return_pb2.py
+0
-28
mod_satellite_pb2.py
mqtt/auto_generate_python/mod_satellite_pb2.py
+0
-77
mod_site_pb2.py
mqtt/auto_generate_python/mod_site_pb2.py
+0
-42
mod_system_pb2.py
mqtt/auto_generate_python/mod_system_pb2.py
+0
-46
mod_task_exec_pb2.py
mqtt/auto_generate_python/mod_task_exec_pb2.py
+0
-36
mod_task_pb2.py
mqtt/auto_generate_python/mod_task_pb2.py
+0
-87
mod_user_pb2.py
mqtt/auto_generate_python/mod_user_pb2.py
+0
-43
mqtt.py
mqtt/mqtt.py
+5
-1
urls.py
mqtt/urls.py
+4
-3
utils.py
mqtt/utils.py
+28
-6
views.py
mqtt/views.py
+70
-9
No files found.
chat/urls.py
View file @
2030137d
# chat/urls.py
from
django.urls
import
path
from
.
import
views
urlpatterns
=
[
...
...
mqtt/auto_generate_python/mod_agi_pb2.py
deleted
100644 → 0
View file @
7d680efc
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mod-agi.proto
"""Generated protocol buffer code."""
from
google.protobuf.internal
import
builder
as
_builder
from
google.protobuf
import
descriptor
as
_descriptor
from
google.protobuf
import
descriptor_pool
as
_descriptor_pool
from
google.protobuf
import
symbol_database
as
_symbol_database
# @@protoc_insertion_point(imports)
_sym_db
=
_symbol_database
.
Default
()
DESCRIPTOR
=
_descriptor_pool
.
Default
()
.
AddSerializedFile
(
b
'
\n\r
mod-agi.proto
\x12\x15
satllite.protobuf.agi
\"\xd0\x01\n\n
CalcTleReq
\x12\x0f\n\x07
noradID
\x18\x01
\x01
(
\x05\x12\x11\n\t
noradName
\x18\x02
\x01
(
\t\x12\x0c\n\x04
year
\x18\x03
\x01
(
\x05\x12\r\n\x05
month
\x18\x04
\x01
(
\x05\x12\x0b\n\x03\x64\x61
y
\x18\x05
\x01
(
\x05\x12\x0c\n\x04
hour
\x18\x06
\x01
(
\x05\x12\x0e\n\x06
minute
\x18\x07
\x01
(
\x05\x12\x0e\n\x06
second
\x18\x08
\x01
(
\x05\x12\t\n\x01\x61\x18\t
\x01
(
\x02\x12\n\n\x02\x65\x65\x18\n
\x01
(
\x02\x12\t\n\x01
I
\x18\x0b
\x01
(
\x02\x12\x0c\n\x04
raan
\x18\x0c
\x01
(
\x02\x12\x0b\n\x03\x61
rc
\x18\r
\x01
(
\x02\x12\t\n\x01
m
\x18\x0e
\x01
(
\x02\"
9
\n\n
CalcTleRet
\x12\r\n\x05
line0
\x18\x01
\x01
(
\t\x12\r\n\x05
line1
\x18\x02
\x01
(
\t\x12\r\n\x05
line2
\x18\x03
\x01
(
\t\"\xba\x02\n\r
CalcReportReq
\x12\x15\n\r
startDateTime
\x18\x01
\x01
(
\t\x12\x13\n\x0b\x65
ndDateTime
\x18\x02
\x01
(
\t\x12\x10\n\x08
latitude
\x18\x03
\x01
(
\x01\x12\x11\n\t
longitude
\x18\x04
\x01
(
\x01\x12\x10\n\x08\x61
ltitude
\x18\x05
\x01
(
\x01\x12\r\n\x05
slice
\x18\x06
\x01
(
\x01\x12\x0e\n\x06
minAzi
\x18\x07
\x01
(
\x01\x12\x0e\n\x06
maxAzi
\x18\x08
\x01
(
\x01\x12\x0e\n\x06
minEle
\x18\t
\x01
(
\x01\x12\x0e\n\x06
maxEle
\x18\n
\x01
(
\x01\x12\x0f\n\x07
minDist
\x18\x0b
\x01
(
\x01\x12\x0f\n\x07
maxDist
\x18\x0c
\x01
(
\x01\x12\x12\n\n
pointSlice
\x18\r
\x01
(
\x01\x12\x14\n\x0c
pointCollect
\x18\x0e
\x01
(
\x05\x12\r\n\x05
line0
\x18\x0f
\x01
(
\t\x12\r\n\x05
line1
\x18\x10
\x01
(
\t\x12\r\n\x05
line2
\x18\x11
\x01
(
\t\"
e
\n\r
CalcReportRet
\x12
(
\n\x04
xxds
\x18\x01
\x03
(
\x0b\x32\x1a
.satllite.protobuf.agi.Xxd
\x12
*
\n\x05
tasks
\x18\x02
\x03
(
\x0b\x32\x1b
.satllite.protobuf.agi.Task
\"
;
\n\x03
Xxd
\x12\n\n\x02\x64
t
\x18\x01
\x01
(
\t\x12\x0b\n\x03
lon
\x18\x02
\x01
(
\x01\x12\x0b\n\x03
lat
\x18\x03
\x01
(
\x01\x12\x0e\n\x06
height
\x18\x04
\x01
(
\x01\"\xb2\x01\n\x04
Task
\x12\r\n\x05
start
\x18\x01
\x01
(
\t\x12\x0b\n\x03\x65
nd
\x18\x02
\x01
(
\t\x12\x10\n\x08
startAzi
\x18\x03
\x01
(
\x01\x12\x0e\n\x06\x65
ndAzi
\x18\x04
\x01
(
\x01\x12\x10\n\x08
startEle
\x18\x05
\x01
(
\x01\x12\x0e\n\x06
maxEle
\x18\x06
\x01
(
\x01\x12\x0f\n\x07
minDist
\x18\x07
\x01
(
\x01\x12\x0f\n\x07
maxDist
\x18\x08
\x01
(
\x01\x12
(
\n\x04
obss
\x18\t
\x03
(
\x0b\x32\x1a
.satllite.protobuf.agi.Obs
\"
:
\n\x03
Obs
\x12\n\n\x02\x64
t
\x18\x01
\x01
(
\t\x12\x0b\n\x03\x61
zi
\x18\x02
\x01
(
\x01\x12\x0b\n\x03\x65
le
\x18\x03
\x01
(
\x01\x12\r\n\x05
range
\x18\x04
\x01
(
\x01\x42\x0c
Z
\n
../protogob
\x06
proto3'
)
_builder
.
BuildMessageAndEnumDescriptors
(
DESCRIPTOR
,
globals
())
_builder
.
BuildTopDescriptorsAndMessages
(
DESCRIPTOR
,
'mod_agi_pb2'
,
globals
())
if
_descriptor
.
_USE_C_DESCRIPTORS
==
False
:
DESCRIPTOR
.
_options
=
None
DESCRIPTOR
.
_serialized_options
=
b
'Z
\n
../protogo'
_CALCTLEREQ
.
_serialized_start
=
41
_CALCTLEREQ
.
_serialized_end
=
249
_CALCTLERET
.
_serialized_start
=
251
_CALCTLERET
.
_serialized_end
=
308
_CALCREPORTREQ
.
_serialized_start
=
311
_CALCREPORTREQ
.
_serialized_end
=
625
_CALCREPORTRET
.
_serialized_start
=
627
_CALCREPORTRET
.
_serialized_end
=
728
_XXD
.
_serialized_start
=
730
_XXD
.
_serialized_end
=
789
_TASK
.
_serialized_start
=
792
_TASK
.
_serialized_end
=
970
_OBS
.
_serialized_start
=
972
_OBS
.
_serialized_end
=
1030
# @@protoc_insertion_point(module_scope)
mqtt/auto_generate_python/mod_return_pb2.py
deleted
100644 → 0
View file @
7d680efc
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mod-return.proto
"""Generated protocol buffer code."""
from
google.protobuf.internal
import
builder
as
_builder
from
google.protobuf
import
descriptor
as
_descriptor
from
google.protobuf
import
descriptor_pool
as
_descriptor_pool
from
google.protobuf
import
symbol_database
as
_symbol_database
# @@protoc_insertion_point(imports)
_sym_db
=
_symbol_database
.
Default
()
from
google.protobuf
import
any_pb2
as
google_dot_protobuf_dot_any__pb2
import
TDSCmd_pb2
as
TDSCmd__pb2
DESCRIPTOR
=
_descriptor_pool
.
Default
()
.
AddSerializedFile
(
b
'
\n\x10
mod-return.proto
\x1a\x19
google/protobuf/any.proto
\x1a\x0c
TDSCmd.proto
\"\xdb\x01\n\r
ReturnElement
\x12\x1a\n\x06
result
\x18\x01
\x01
(
\x0e\x32\n
.CodeValue
\x12\x0b\n\x03
msg
\x18\x02
\x01
(
\t\x12\r\n\x05\x65
nMsg
\x18\x03
\x01
(
\t\x12\"\n\x04\x64\x61
ta
\x18\x04
\x01
(
\x0b\x32\x14
.google.protobuf.Any
\x12\"\n\x04
list
\x18\x05
\x03
(
\x0b\x32\x14
.google.protobuf.Any
\x12\x11\n\t
dstSiteNo
\x18\x06
\x01
(
\t\x12\x11\n\t
srcSiteNo
\x18\x07
\x01
(
\t\x12\x0f\n\x07
noArray
\x18\x08
\x03
(
\t\x12\x13\n\x0b
siteNoArray
\x18\t
\x03
(
\t
B
\x0c
Z
\n
../protogob
\x06
proto3'
)
_builder
.
BuildMessageAndEnumDescriptors
(
DESCRIPTOR
,
globals
())
_builder
.
BuildTopDescriptorsAndMessages
(
DESCRIPTOR
,
'mod_return_pb2'
,
globals
())
if
_descriptor
.
_USE_C_DESCRIPTORS
==
False
:
DESCRIPTOR
.
_options
=
None
DESCRIPTOR
.
_serialized_options
=
b
'Z
\n
../protogo'
_RETURNELEMENT
.
_serialized_start
=
62
_RETURNELEMENT
.
_serialized_end
=
281
# @@protoc_insertion_point(module_scope)
mqtt/auto_generate_python/mod_satellite_pb2.py
deleted
100644 → 0
View file @
7d680efc
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mod-satellite.proto
"""Generated protocol buffer code."""
from
google.protobuf.internal
import
builder
as
_builder
from
google.protobuf
import
descriptor
as
_descriptor
from
google.protobuf
import
descriptor_pool
as
_descriptor_pool
from
google.protobuf
import
symbol_database
as
_symbol_database
# @@protoc_insertion_point(imports)
_sym_db
=
_symbol_database
.
Default
()
from
google.protobuf
import
timestamp_pb2
as
google_dot_protobuf_dot_timestamp__pb2
DESCRIPTOR
=
_descriptor_pool
.
Default
()
.
AddSerializedFile
(
b
'
\n\x13
mod-satellite.proto
\x1a\x1f
google/protobuf/timestamp.proto
\"\xe4\x03\n\x13
RetSatelliteElement
\x12\r\n\x05
norad
\x18\x02
\x01
(
\t\x12\x0c\n\x04\x63
ode
\x18\x03
\x01
(
\t\x12\x0e\n\x06\x63
nName
\x18\x04
\x01
(
\t\x12\x0e\n\x06\x65
nName
\x18\x05
\x01
(
\t\x12\x11\n\t
available
\x18\x06
\x01
(
\x08\x12\x10\n\x08
priority
\x18\x07
\x01
(
\x05\x12\x16\n\x0e
priorityBySite
\x18\x08
\x01
(
\x05\x12
,
\n\x04\x62\x61
se
\x18\t
\x03
(
\x0b\x32\x1e
.RetSatelliteElement.BaseEntry
\x12
(
\n\x07\x64\x65
tails
\x18\n
\x03
(
\x0b\x32\x17
.RetSiteLevel3Satellite
\x12\x34\n\x08\x65
lements
\x18\x0b
\x03
(
\x0b\x32\"
.RetSatelliteElement.ElementsEntry
\x12
,
\n\n
workParams
\x18\x0c
\x01
(
\x0b\x32\x18
.RetSatelliteWorkElement
\x12\x0b\n\x03
off
\x18\r
\x01
(
\x08\x12
,
\n\x08\x63
reateDt
\x18\x0e
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x1a
+
\n\t
BaseEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12\r\n\x05
value
\x18\x02
\x01
(
\t
:
\x02\x38\x01\x1a
/
\n\r
ElementsEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12\r\n\x05
value
\x18\x02
\x01
(
\t
:
\x02\x38\x01\"\xbc\x01\n\x16
RetSiteLevel3Satellite
\x12\x0e\n\x06
siteNo
\x18\x01
\x01
(
\t\x12\x10\n\x08
priority
\x18\x02
\x01
(
\x05\x12\x11\n\t
available
\x18\x03
\x01
(
\x08\x12
#
\n\x0c
observeGrade
\x18\x04
\x01
(
\x0e\x32\r
.ObserveGrade
\x12
+
\n\t
workParam
\x18\x05
\x01
(
\x0b\x32\x18
.RetSatelliteWorkElement
\x12\x1b\n\x13
workParamConfigName
\x18\x06
\x01
(
\t\"\xa2\x01\n\r
SatelliteList
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12
*
\n\x04
sort
\x18\x03
\x01
(
\x0e\x32\x1c
.SatelliteList.satelliteSort
\"
F
\n\r
satelliteSort
\x12\x19\n\x15
satelliteSort_default
\x10\x00\x12\x1a\n\x16
satelliteSort_forecast
\x10\x01\"
?
\n\x0f
SatelliteDetail
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\r\n\x05
norad
\x18\x03
\x01
(
\t\"
D
\n\x16
SatelliteElementUpdate
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x0b\n\x03
tle
\x18\x03
\x01
(
\t\"\xc8\x01\n\x13
SatelliteBaseUpdate
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\r\n\x05
norad
\x18\x03
\x01
(
\t\x12\x0e\n\x06\x63
nName
\x18\x04
\x01
(
\t\x12\x0c\n\x04\x63
ode
\x18\x05
\x01
(
\t\x12\x10\n\x08\x63
odeName
\x18\x06
\x01
(
\t\x12\x0f\n\x07\x63
ountry
\x18\x07
\x01
(
\t\x12\x11\n\t
orbitType
\x18\x08
\x01
(
\t\x12\x0f\n\x07
purpose
\x18\t
\x01
(
\t\x12\x0e\n\x06
remark
\x18\n
\x01
(
\t\x12\x0e\n\x06\x65
nName
\x18\x0b
\x01
(
\t\"
A
\n\x0c
SatelliteDel
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x12\n\n
noradArray
\x18\x03
\x03
(
\t\"
6
\n\x15
SatellitePriorityList
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\"
L
\n\x17
SatellitePriorityUpdate
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x12\n\n
noradArray
\x18\x03
\x03
(
\t\"
6
\n\x14
SatelliteElementLoad
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0f\n\x07
idArray
\x18\x02
\x03
(
\t\"\x90\x01\n\x1b
SatelliteElementLoadAutoSet
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x0f\n\x07
loadUrl
\x18\x03
\x01
(
\t\x12\x0f\n\x07
loadHMS
\x18\x04
\x01
(
\t\x12\x15\n\r
loadFrequency
\x18\x06
\x01
(
\x05\x12\x19\n\x11
tleStrategyStatus
\x18\x08
\x01
(
\x08\"\xe9\x01\n\x15
SatelliteDetailUpdate
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\r\n\x05
norad
\x18\x02
\x01
(
\t\x12\x0e\n\x06
siteNo
\x18\x03
\x01
(
\t\x12\x0e\n\x06\x63
nName
\x18\x04
\x01
(
\t\x12\x0c\n\x04\x63
ode
\x18\x05
\x01
(
\t\x12\x10\n\x08\x63
odeName
\x18\x06
\x01
(
\t\x12\x0f\n\x07\x63
ountry
\x18\x07
\x01
(
\t\x12\x11\n\t
orbitType
\x18\x08
\x01
(
\t\x12\x0f\n\x07
purpose
\x18\t
\x01
(
\t\x12\x0e\n\x06
remark
\x18\n
\x01
(
\t\x12\x0e\n\x06\x65
nName
\x18\x0b
\x01
(
\t\x12\x1d\n\x06
params
\x18\x0c
\x03
(
\x0b\x32\r
.DetailParams
\"
c
\n\x0c\x44\x65
tailParams
\x12\x0e\n\x06
siteNo
\x18\x01
\x01
(
\t\x12\x11\n\t
available
\x18\x02
\x01
(
\x08\x12\x1c\n\x05
grade
\x18\x03
\x01
(
\x0e\x32\r
.ObserveGrade
\x12\x12\n\n
workConfig
\x18\x04
\x01
(
\x05\"\xc7\x01\n\x17
RetSatelliteWorkElement
\x12\r\n\x05
norad
\x18\x01
\x01
(
\t\x12\x10\n\x08\x63
onfigId
\x18\x02
\x01
(
\x05\x12\x0e\n\x06
remark
\x18\x03
\x01
(
\t\x12\x12\n\n
configName
\x18\x04
\x01
(
\t\x12\x10\n\x08\x63\x61
tegory
\x18\x05
\x01
(
\t\x12\x1a\n\x06
params
\x18\x06
\x03
(
\x0b\x32\n
.WorkParam
\x12\x0b\n\x03
off
\x18\x07
\x01
(
\x08\x12
,
\n\x08\x63
reateDt
\x18\x08
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\"
7
\n\x16
SatelliteWorkParamList
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\"\x9a\x01\n\x18
SatelliteWorkParamUpdate
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\r\n\x05
norad
\x18\x03
\x01
(
\t\x12\x10\n\x08\x63
onfigId
\x18\x04
\x01
(
\x05\x12\x12\n\n
configName
\x18\x05
\x01
(
\t\x12\x0e\n\x06
remark
\x18\x06
\x01
(
\t\x12\x1a\n\x06
params
\x18\x07
\x03
(
\x0b\x32\n
.WorkParam
\"\xc5\x02\n\t
WorkParam
\x12\x0e\n\x06
siteNo
\x18\x01
\x01
(
\t\x12\x1c\n\x14
XTrackerSigIntensity
\x18\x06
\x01
(
\x05\x12\x1c\n\x14
YTrackerSigIntensity
\x18\x07
\x01
(
\x05\x12\x12\n\n
XInitPhase
\x18\x08
\x01
(
\x05\x12\x19\n\x11
XPolarizationType
\x18\t
\x01
(
\x05\x12\x19\n\x11
SPolarizationType
\x18\n
\x01
(
\x05\x12\x1c\n\x14
XTrackerVoltageLimit
\x18\x0b
\x01
(
\x05\x12\x1c\n\x14
STrackerVoltageLimit
\x18\x0c
\x01
(
\x05\x12\x1b\n\x13
SUpPolarizationType
\x18\r
\x01
(
\x05\x12\x1b\n\x13
XUpPolarizationType
\x18\x0e
\x01
(
\x05\x12\x16\n\x0e
TrackingStatus
\x18\x0f
\x01
(
\x05\x12\x14\n\x0c
TrackingBand
\x18\x10
\x01
(
\x05\"
X
\n\x15
SatelliteWorkParamDel
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12
\n\x08
keyArray
\x18\x03
\x03
(
\x0b\x32\x0e
.NoradConfigId
\"
0
\n\r
NoradConfigId
\x12\r\n\x05
norad
\x18\x01
\x01
(
\t\x12\x10\n\x08\x63
onfigId
\x18\x02
\x01
(
\x05\"
T
\n\x1f
SatelliteWorkParamListForChoose
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x12\n\n
noradArray
\x18\x03
\x03
(
\t
*`
\n\x0c
ObserveGrade
\x12\x17\n\x13
ObserveGradeDefault
\x10\x00\x12\x11\n\r
ObserveGrade1
\x10\x01\x12\x11\n\r
ObserveGrade2
\x10\x02\x12\x11\n\r
ObserveGrade3
\x10\x03\x42\x0c
Z
\n
../protogob
\x06
proto3'
)
_builder
.
BuildMessageAndEnumDescriptors
(
DESCRIPTOR
,
globals
())
_builder
.
BuildTopDescriptorsAndMessages
(
DESCRIPTOR
,
'mod_satellite_pb2'
,
globals
())
if
_descriptor
.
_USE_C_DESCRIPTORS
==
False
:
DESCRIPTOR
.
_options
=
None
DESCRIPTOR
.
_serialized_options
=
b
'Z
\n
../protogo'
_RETSATELLITEELEMENT_BASEENTRY
.
_options
=
None
_RETSATELLITEELEMENT_BASEENTRY
.
_serialized_options
=
b
'8
\001
'
_RETSATELLITEELEMENT_ELEMENTSENTRY
.
_options
=
None
_RETSATELLITEELEMENT_ELEMENTSENTRY
.
_serialized_options
=
b
'8
\001
'
_OBSERVEGRADE
.
_serialized_start
=
2948
_OBSERVEGRADE
.
_serialized_end
=
3044
_RETSATELLITEELEMENT
.
_serialized_start
=
57
_RETSATELLITEELEMENT
.
_serialized_end
=
541
_RETSATELLITEELEMENT_BASEENTRY
.
_serialized_start
=
449
_RETSATELLITEELEMENT_BASEENTRY
.
_serialized_end
=
492
_RETSATELLITEELEMENT_ELEMENTSENTRY
.
_serialized_start
=
494
_RETSATELLITEELEMENT_ELEMENTSENTRY
.
_serialized_end
=
541
_RETSITELEVEL3SATELLITE
.
_serialized_start
=
544
_RETSITELEVEL3SATELLITE
.
_serialized_end
=
732
_SATELLITELIST
.
_serialized_start
=
735
_SATELLITELIST
.
_serialized_end
=
897
_SATELLITELIST_SATELLITESORT
.
_serialized_start
=
827
_SATELLITELIST_SATELLITESORT
.
_serialized_end
=
897
_SATELLITEDETAIL
.
_serialized_start
=
899
_SATELLITEDETAIL
.
_serialized_end
=
962
_SATELLITEELEMENTUPDATE
.
_serialized_start
=
964
_SATELLITEELEMENTUPDATE
.
_serialized_end
=
1032
_SATELLITEBASEUPDATE
.
_serialized_start
=
1035
_SATELLITEBASEUPDATE
.
_serialized_end
=
1235
_SATELLITEDEL
.
_serialized_start
=
1237
_SATELLITEDEL
.
_serialized_end
=
1302
_SATELLITEPRIORITYLIST
.
_serialized_start
=
1304
_SATELLITEPRIORITYLIST
.
_serialized_end
=
1358
_SATELLITEPRIORITYUPDATE
.
_serialized_start
=
1360
_SATELLITEPRIORITYUPDATE
.
_serialized_end
=
1436
_SATELLITEELEMENTLOAD
.
_serialized_start
=
1438
_SATELLITEELEMENTLOAD
.
_serialized_end
=
1492
_SATELLITEELEMENTLOADAUTOSET
.
_serialized_start
=
1495
_SATELLITEELEMENTLOADAUTOSET
.
_serialized_end
=
1639
_SATELLITEDETAILUPDATE
.
_serialized_start
=
1642
_SATELLITEDETAILUPDATE
.
_serialized_end
=
1875
_DETAILPARAMS
.
_serialized_start
=
1877
_DETAILPARAMS
.
_serialized_end
=
1976
_RETSATELLITEWORKELEMENT
.
_serialized_start
=
1979
_RETSATELLITEWORKELEMENT
.
_serialized_end
=
2178
_SATELLITEWORKPARAMLIST
.
_serialized_start
=
2180
_SATELLITEWORKPARAMLIST
.
_serialized_end
=
2235
_SATELLITEWORKPARAMUPDATE
.
_serialized_start
=
2238
_SATELLITEWORKPARAMUPDATE
.
_serialized_end
=
2392
_WORKPARAM
.
_serialized_start
=
2395
_WORKPARAM
.
_serialized_end
=
2720
_SATELLITEWORKPARAMDEL
.
_serialized_start
=
2722
_SATELLITEWORKPARAMDEL
.
_serialized_end
=
2810
_NORADCONFIGID
.
_serialized_start
=
2812
_NORADCONFIGID
.
_serialized_end
=
2860
_SATELLITEWORKPARAMLISTFORCHOOSE
.
_serialized_start
=
2862
_SATELLITEWORKPARAMLISTFORCHOOSE
.
_serialized_end
=
2946
# @@protoc_insertion_point(module_scope)
mqtt/auto_generate_python/mod_site_pb2.py
deleted
100644 → 0
View file @
7d680efc
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mod-site.proto
"""Generated protocol buffer code."""
from
google.protobuf.internal
import
builder
as
_builder
from
google.protobuf
import
descriptor
as
_descriptor
from
google.protobuf
import
descriptor_pool
as
_descriptor_pool
from
google.protobuf
import
symbol_database
as
_symbol_database
# @@protoc_insertion_point(imports)
_sym_db
=
_symbol_database
.
Default
()
from
google.protobuf
import
timestamp_pb2
as
google_dot_protobuf_dot_timestamp__pb2
import
mod_user_pb2
as
mod__user__pb2
DESCRIPTOR
=
_descriptor_pool
.
Default
()
.
AddSerializedFile
(
b
'
\n\x0e
mod-site.proto
\x1a\x1f
google/protobuf/timestamp.proto
\x1a\x0e
mod-user.proto
\"\xb4\x03\n\x0e
RetSiteElement
\x12\n\n\x02
no
\x18\x02
\x01
(
\t\x12\x0c\n\x04
name
\x18\x03
\x01
(
\t\x12
&
\n\x08
operator
\x18\x04
\x01
(
\x0b\x32\x14
.RetAdminUserElement
\x12\x0e\n\x06
remark
\x18\x05
\x01
(
\t\x12\x10\n\x08
latitude
\x18\x06
\x01
(
\x01\x12\x11\n\t
longitude
\x18\x07
\x01
(
\x01\x12\x10\n\x08\x61
ltitude
\x18\x08
\x01
(
\x01\x12\x0e\n\x06
parent
\x18\t
\x01
(
\t\x12
+
\n\x06
params
\x18\n
\x03
(
\x0b\x32\x1b
.RetSiteElement.ParamsEntry
\x12
+
\n\x06\x65
xtend
\x18\x0b
\x03
(
\x0b\x32\x1b
.RetSiteElement.ExtendEntry
\x12\x16\n\x0e\x61
vailableArray
\x18\x0c
\x03
(
\t\x12\x0b\n\x03
off
\x18\r
\x01
(
\x08\x12
,
\n\x08\x63
reateDt
\x18\x0e
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x1a
-
\n\x0b
ParamsEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12\r\n\x05
value
\x18\x02
\x01
(
\t
:
\x02\x38\x01\x1a
-
\n\x0b\x45
xtendEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12\r\n\x05
value
\x18\x02
\x01
(
\t
:
\x02\x38\x01\"
<
\n\x08
SiteList
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x11\n\t
available
\x18\x03
\x01
(
\x08\"\x84\x02\n\n
SiteUpdate
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x0c\n\x04
name
\x18\x03
\x01
(
\t\x12\x0e\n\x06
remark
\x18\x04
\x01
(
\t\x12\x10\n\x08
latitude
\x18\x05
\x01
(
\x01\x12\x11\n\t
longitude
\x18\x06
\x01
(
\x01\x12\x10\n\x08\x61
ltitude
\x18\x07
\x01
(
\x01\x12\x0f\n\x07\x63
ountry
\x18\x08
\x01
(
\t\x12\r\n\x05
place
\x18\t
\x01
(
\t\x12\x10\n\x08
timeZone
\x18\n
\x01
(
\t\x12\x0f\n\x07
voltage
\x18\x0b
\x01
(
\x01\x12\x12\n\n
deltaDelay
\x18\x0c
\x01
(
\x05\x12\x11\n\t
bandwidth
\x18\r
\x01
(
\x01\x12\x18\n\x10
networkOperators
\x18\x0e
\x01
(
\t\"\xc7\x01\n\x0f
SiteParamUpdate
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\n\n\x02
id
\x18\x02
\x01
(
\x05\x12\r\n\x05
slice
\x18\x03
\x01
(
\x01\x12\x13\n\x0b
minEleAngle
\x18\x04
\x01
(
\x01\x12\x13\n\x0b
maxEleAngle
\x18\x05
\x01
(
\x01\x12\x13\n\x0b
minAziAngle
\x18\x06
\x01
(
\x01\x12\x13\n\x0b
maxAziAngle
\x18\x07
\x01
(
\x01\x12\x0f\n\x07
minDist
\x18\x08
\x01
(
\x01\x12\x0f\n\x07
maxDist
\x18\t
\x01
(
\x01\x12\x14\n\x0c
taskDuration
\x18\n
\x01
(
\x01\x42\x0c
Z
\n
../protogob
\x06
proto3'
)
_builder
.
BuildMessageAndEnumDescriptors
(
DESCRIPTOR
,
globals
())
_builder
.
BuildTopDescriptorsAndMessages
(
DESCRIPTOR
,
'mod_site_pb2'
,
globals
())
if
_descriptor
.
_USE_C_DESCRIPTORS
==
False
:
DESCRIPTOR
.
_options
=
None
DESCRIPTOR
.
_serialized_options
=
b
'Z
\n
../protogo'
_RETSITEELEMENT_PARAMSENTRY
.
_options
=
None
_RETSITEELEMENT_PARAMSENTRY
.
_serialized_options
=
b
'8
\001
'
_RETSITEELEMENT_EXTENDENTRY
.
_options
=
None
_RETSITEELEMENT_EXTENDENTRY
.
_serialized_options
=
b
'8
\001
'
_RETSITEELEMENT
.
_serialized_start
=
68
_RETSITEELEMENT
.
_serialized_end
=
504
_RETSITEELEMENT_PARAMSENTRY
.
_serialized_start
=
412
_RETSITEELEMENT_PARAMSENTRY
.
_serialized_end
=
457
_RETSITEELEMENT_EXTENDENTRY
.
_serialized_start
=
459
_RETSITEELEMENT_EXTENDENTRY
.
_serialized_end
=
504
_SITELIST
.
_serialized_start
=
506
_SITELIST
.
_serialized_end
=
566
_SITEUPDATE
.
_serialized_start
=
569
_SITEUPDATE
.
_serialized_end
=
829
_SITEPARAMUPDATE
.
_serialized_start
=
832
_SITEPARAMUPDATE
.
_serialized_end
=
1031
# @@protoc_insertion_point(module_scope)
mqtt/auto_generate_python/mod_system_pb2.py
deleted
100644 → 0
View file @
7d680efc
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mod-system.proto
"""Generated protocol buffer code."""
from
google.protobuf.internal
import
builder
as
_builder
from
google.protobuf
import
descriptor
as
_descriptor
from
google.protobuf
import
descriptor_pool
as
_descriptor_pool
from
google.protobuf
import
symbol_database
as
_symbol_database
# @@protoc_insertion_point(imports)
_sym_db
=
_symbol_database
.
Default
()
DESCRIPTOR
=
_descriptor_pool
.
Default
()
.
AddSerializedFile
(
b
'
\n\x10
mod-system.proto
\"\xc6\x01\n\x15
RetMoreSettingElement
\x12\x0f\n\x07\x64\x65\x66\x61
ult
\x18\x01
\x01
(
\t\x12\x1c\n\x07
setting
\x18\x02
\x01
(
\x0b\x32\x0b
.DataParams
\x12\x1d\n\x08\x64\x61
taSave
\x18\x03
\x03
(
\x0b\x32\x0b
.DataParams
\x12\x1c\n\x07
tleLoad
\x18\x04
\x01
(
\x0b\x32\x0b
.DataParams
\x12\"\n\r
forecastParam
\x18\x05
\x03
(
\x0b\x32\x0b
.DataParams
\x12\x1d\n\x08
taskAuto
\x18\x06
\x03
(
\x0b\x32\x0b
.DataParams
\"
d
\n\n
DataParams
\x12\'\n\x06
params
\x18\x01
\x03
(
\x0b\x32\x17
.DataParams.ParamsEntry
\x1a
-
\n\x0b
ParamsEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12\r\n\x05
value
\x18\x02
\x01
(
\t
:
\x02\x38\x01\"\x1f\n\x0e
MoreSettingSet
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\"\xa1\x01\n\x12
MoreSettingDataSet
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\n\n\x02
no
\x18\x02
\x01
(
\t\x12\x10\n\x08\x64\x61
taType
\x18\x03
\x01
(
\t\x12\x0e\n\x06
hostIP
\x18\x04
\x01
(
\t\x12\x10\n\x08
hostPort
\x18\x05
\x01
(
\x05\x12\x0e\n\x06
userID
\x18\x06
\x01
(
\t\x12\x0b\n\x03
pwd
\x18\x07
\x01
(
\t\x12\x11\n\t
directory
\x18\x08
\x01
(
\t\x12\x0c\n\x04
size
\x18\t
\x01
(
\x05\"
/
\n\x12
MoreSettingDataDel
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\n\n\x02
no
\x18\x02
\x01
(
\t\"
H
\n\x0e
MoreSettingGet
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x17\n\x07
labelId
\x18\x03
\x01
(
\x0e\x32\x06
.Label
\"
O
\n\x15
MoreSettingGetDefault
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x17\n\x07
labelId
\x18\x03
\x01
(
\x0e\x32\x06
.Label
\"
S
\n\x19
MoreSettingRestoreDefault
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x17\n\x07
labelId
\x18\x03
\x01
(
\x0e\x32\x06
.Label*
\x86\x01\n\x05
Label
\x12\x11\n\r
Label_Default
\x10\x00\x12\x16\n\x12
Label_TaskForecast
\x10\x01\x12\x12\n\x0e
Label_DataSave
\x10\x02\x12\x11\n\r
Label_TleLoad
\x10\x03\x12\x17\n\x13
Label_ForecastParam
\x10\x04\x12\x12\n\x0e
Label_TaskAuto
\x10\x05\x42\x0c
Z
\n
../protogob
\x06
proto3'
)
_builder
.
BuildMessageAndEnumDescriptors
(
DESCRIPTOR
,
globals
())
_builder
.
BuildTopDescriptorsAndMessages
(
DESCRIPTOR
,
'mod_system_pb2'
,
globals
())
if
_descriptor
.
_USE_C_DESCRIPTORS
==
False
:
DESCRIPTOR
.
_options
=
None
DESCRIPTOR
.
_serialized_options
=
b
'Z
\n
../protogo'
_DATAPARAMS_PARAMSENTRY
.
_options
=
None
_DATAPARAMS_PARAMSENTRY
.
_serialized_options
=
b
'8
\001
'
_LABEL
.
_serialized_start
=
810
_LABEL
.
_serialized_end
=
944
_RETMORESETTINGELEMENT
.
_serialized_start
=
21
_RETMORESETTINGELEMENT
.
_serialized_end
=
219
_DATAPARAMS
.
_serialized_start
=
221
_DATAPARAMS
.
_serialized_end
=
321
_DATAPARAMS_PARAMSENTRY
.
_serialized_start
=
276
_DATAPARAMS_PARAMSENTRY
.
_serialized_end
=
321
_MORESETTINGSET
.
_serialized_start
=
323
_MORESETTINGSET
.
_serialized_end
=
354
_MORESETTINGDATASET
.
_serialized_start
=
357
_MORESETTINGDATASET
.
_serialized_end
=
518
_MORESETTINGDATADEL
.
_serialized_start
=
520
_MORESETTINGDATADEL
.
_serialized_end
=
567
_MORESETTINGGET
.
_serialized_start
=
569
_MORESETTINGGET
.
_serialized_end
=
641
_MORESETTINGGETDEFAULT
.
_serialized_start
=
643
_MORESETTINGGETDEFAULT
.
_serialized_end
=
722
_MORESETTINGRESTOREDEFAULT
.
_serialized_start
=
724
_MORESETTINGRESTOREDEFAULT
.
_serialized_end
=
807
# @@protoc_insertion_point(module_scope)
mqtt/auto_generate_python/mod_task_exec_pb2.py
deleted
100644 → 0
View file @
7d680efc
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mod-task-exec.proto
"""Generated protocol buffer code."""
from
google.protobuf.internal
import
builder
as
_builder
from
google.protobuf
import
descriptor
as
_descriptor
from
google.protobuf
import
descriptor_pool
as
_descriptor_pool
from
google.protobuf
import
symbol_database
as
_symbol_database
# @@protoc_insertion_point(imports)
_sym_db
=
_symbol_database
.
Default
()
import
mod_task_pb2
as
mod__task__pb2
from
google.protobuf
import
timestamp_pb2
as
google_dot_protobuf_dot_timestamp__pb2
DESCRIPTOR
=
_descriptor_pool
.
Default
()
.
AddSerializedFile
(
b
'
\n\x13
mod-task-exec.proto
\x1a\x0e
mod-task.proto
\x1a\x1f
google/protobuf/timestamp.proto
\"\xa5\x02\n\x12
RetTaskExecElement
\x12\n\n\x02
id
\x18\x01
\x01
(
\x05\x12\x1d\n\x04
task
\x18\x02
\x01
(
\x0b\x32\x0f
.RetTaskElement
\x12
+
\n\x07
startDt
\x18\x03
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x12
)
\n\x05\x65
ndDt
\x18\x04
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x12
/
\n\x06\x65
xtend
\x18\x05
\x03
(
\x0b\x32\x1f
.RetTaskExecElement.ExtendEntry
\x12
,
\n\x08\x63
reateDt
\x18\x06
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x1a
-
\n\x0b\x45
xtendEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12\r\n\x05
value
\x18\x02
\x01
(
\t
:
\x02\x38\x01\"\x97\x01\n\x0c
TaskExecList
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x12\n\n
codeSearch
\x18\x02
\x01
(
\t\x12\x10\n\x08
noSearch
\x18\x03
\x01
(
\t\x12
)
\n\x05
start
\x18\x04
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x12\'\n\x03\x65
nd
\x18\x05
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\"\xa1\x01\n\x16
TaskExecAnalysisResult
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x12\n\n
codeSearch
\x18\x03
\x01
(
\t\x12\x10\n\x08
noSearch
\x18\x04
\x01
(
\t\x12
)
\n\x05
start
\x18\x06
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x12\'\n\x03\x65
nd
\x18\x07
\x01
(
\x0b\x32\x1a
.google.protobuf.TimestampB
\x0c
Z
\n
../protogob
\x06
proto3'
)
_builder
.
BuildMessageAndEnumDescriptors
(
DESCRIPTOR
,
globals
())
_builder
.
BuildTopDescriptorsAndMessages
(
DESCRIPTOR
,
'mod_task_exec_pb2'
,
globals
())
if
_descriptor
.
_USE_C_DESCRIPTORS
==
False
:
DESCRIPTOR
.
_options
=
None
DESCRIPTOR
.
_serialized_options
=
b
'Z
\n
../protogo'
_RETTASKEXECELEMENT_EXTENDENTRY
.
_options
=
None
_RETTASKEXECELEMENT_EXTENDENTRY
.
_serialized_options
=
b
'8
\001
'
_RETTASKEXECELEMENT
.
_serialized_start
=
73
_RETTASKEXECELEMENT
.
_serialized_end
=
366
_RETTASKEXECELEMENT_EXTENDENTRY
.
_serialized_start
=
321
_RETTASKEXECELEMENT_EXTENDENTRY
.
_serialized_end
=
366
_TASKEXECLIST
.
_serialized_start
=
369
_TASKEXECLIST
.
_serialized_end
=
520
_TASKEXECANALYSISRESULT
.
_serialized_start
=
523
_TASKEXECANALYSISRESULT
.
_serialized_end
=
684
# @@protoc_insertion_point(module_scope)
mqtt/auto_generate_python/mod_task_pb2.py
deleted
100644 → 0
View file @
7d680efc
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mod-task.proto
"""Generated protocol buffer code."""
from
google.protobuf.internal
import
builder
as
_builder
from
google.protobuf
import
descriptor
as
_descriptor
from
google.protobuf
import
descriptor_pool
as
_descriptor_pool
from
google.protobuf
import
symbol_database
as
_symbol_database
# @@protoc_insertion_point(imports)
_sym_db
=
_symbol_database
.
Default
()
from
google.protobuf
import
timestamp_pb2
as
google_dot_protobuf_dot_timestamp__pb2
import
mod_satellite_pb2
as
mod__satellite__pb2
import
mod_site_pb2
as
mod__site__pb2
DESCRIPTOR
=
_descriptor_pool
.
Default
()
.
AddSerializedFile
(
b
'
\n\x0e
mod-task.proto
\x1a\x1f
google/protobuf/timestamp.proto
\x1a\x13
mod-satellite.proto
\x1a\x0e
mod-site.proto
\"\xdb\x05\n\x0e
RetTaskElement
\x12\n\n\x02
id
\x18\x01
\x01
(
\t\x12\n\n\x02
no
\x18\x02
\x01
(
\t\x12\r\n\x05
norad
\x18\x03
\x01
(
\t\x12\'\n\t
satellite
\x18\x04
\x01
(
\x0b\x32\x14
.RetSatelliteElement
\x12\x0e\n\x06
siteNo
\x18\x05
\x01
(
\t\x12\x1d\n\x04
site
\x18\x06
\x01
(
\x0b\x32\x0f
.RetSiteElement
\x12\x0c\n\x04
type
\x18\x07
\x01
(
\t\x12\x19\n\x05
grade
\x18\x08
\x01
(
\x0e\x32\n
.TaskGrade
\x12\x1b\n\x06
status
\x18\t
\x01
(
\x0e\x32\x0b
.TaskStatus
\x12
)
\n\x05
genDt
\x18\n
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x12
+
\n\x07
startDt
\x18\x0b
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x12
)
\n\x05\x65
ndDt
\x18\x0c
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x12\x15\n\r
startAziAngle
\x18\r
\x01
(
\x01\x12\x13\n\x0b\x65
ndAziAngle
\x18\x0e
\x01
(
\x01\x12\x15\n\r
startEleAngle
\x18\x0f
\x01
(
\x01\x12\x13\n\x0b
maxEleAngle
\x18\x10
\x01
(
\x01\x12\x0e\n\x06\x63
ircle
\x18\x11
\x01
(
\x05\x12\x0f\n\x07
minDist
\x18\x12
\x01
(
\x01\x12\x0f\n\x07
maxDist
\x18\x13
\x01
(
\x01\x12\r\n\x05
slice
\x18\x14
\x01
(
\x05\x12
+
\n\x06\x65
xtend
\x18\x15
\x03
(
\x0b\x32\x1b
.RetTaskElement.ExtendEntry
\x12
%
\n\x03
res
\x18\x16
\x03
(
\x0b\x32\x18
.RetTaskElement.ResEntry
\x12\x0b\n\x03
off
\x18\x17
\x01
(
\x08\x12
,
\n\x08\x63
reateDt
\x18\x18
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x1a
-
\n\x0b\x45
xtendEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12\r\n\x05
value
\x18\x02
\x01
(
\t
:
\x02\x38\x01\x1a
*
\n\x08
ResEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12\r\n\x05
value
\x18\x02
\x01
(
\t
:
\x02\x38\x01\"\xe0\x01\n\x08
TaskList
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12
\n\x0b
statusArray
\x18\x03
\x03
(
\x0e\x32\x0b
.TaskStatus
\x12\x12\n\n
codeSearch
\x18\x04
\x01
(
\t\x12\x10\n\x08
noSearch
\x18\x05
\x01
(
\t\x12\x19\n\x05
grade
\x18\x06
\x01
(
\x0e\x32\n
.TaskGrade
\x12
)
\n\x05
start
\x18\x07
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x12\'\n\x03\x65
nd
\x18\x08
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\"\xda\x01\n\x0c
TaskForecast
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12
(
\n\x0c\x66
orecastList
\x18\x02
\x03
(
\x0b\x32\x12
.SiteSatelliteList
\x12\r\n\x05
slice
\x18\x03
\x01
(
\x01\x12\x13\n\x0b
minEleAngle
\x18\x04
\x01
(
\x01\x12
)
\n\x05
start
\x18\x05
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x12\'\n\x03\x65
nd
\x18\x06
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x12\x19\n\x05
grade
\x18\x07
\x01
(
\x0e\x32\n
.TaskGrade
\"
E
\n\x11
SiteSatelliteList
\x12\x0e\n\x06
siteNo
\x18\x01
\x01
(
\t\x12\x0c\n\x04
tles
\x18\x02
\x01
(
\t\x12\x12\n\n
noradArray
\x18\x03
\x03
(
\t\"
#
\n\x12
RetForecastOneOver
\x12\r\n\x05
norad
\x18\x01
\x01
(
\t\"
L
\n\x08
TaskPlan
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12
!
\n\x08
taskList
\x18\x03
\x03
(
\x0b\x32\x0f
.RetTaskElement
\"\x9e\x01\n\x12
TaskHandleConflict
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x1f\n\x08\x63
onflict
\x18\x03
\x01
(
\x0e\x32\r
.ConflictType
\x12\x11\n\t
leastTime
\x18\x04
\x01
(
\x03\x12\x12\n\n
switchTime
\x18\x05
\x01
(
\x03\x12
!
\n\x08
taskList
\x18\x06
\x03
(
\x0b\x32\x0f
.RetTaskElement
\"
b
\n\n
TaskIssued
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x12\n\n
switchTime
\x18\x03
\x01
(
\x05\x12
!
\n\x08
taskList
\x18\x04
\x03
(
\x0b\x32\x0f
.RetTaskElement
\"
;
\n\t
TaskPause
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x0f\n\x07
idArray
\x18\x03
\x03
(
\t\"
>
\n\x0c
TaskRecovery
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x0f\n\x07
idArray
\x18\x03
\x03
(
\t\"
9
\n\x07
TaskDel
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x0f\n\x07
idArray
\x18\x03
\x03
(
\t\"
:
\n\x0b
TaskConfirm
\x12\x1b\n\x07
operate
\x18\x01
\x01
(
\x0e\x32\n
.Operation
\x12\x0e\n\x06
taskId
\x18\x02
\x01
(
\t\"
=
\n\x0e
RetTaskConfirm
\x12\x1b\n\x07
operate
\x18\x01
\x01
(
\x0e\x32\n
.Operation
\x12\x0e\n\x06
taskId
\x18\x02
\x01
(
\t\"\x85\x01\n\x0c
RetTaskIndex
\x12
%
\n\x04\x64\x61
ta
\x18\x01
\x03
(
\x0b\x32\x17
.RetTaskIndex.DataEntry
\x12
!
\n\x08
taskList
\x18\x02
\x03
(
\x0b\x32\x0f
.RetTaskElement
\x1a
+
\n\t
DataEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12\r\n\x05
value
\x18\x02
\x01
(
\t
:
\x02\x38\x01\"\xf5\x01\n\x14
TaskForecastParamSet
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\r\n\x05
slice
\x18\x03
\x01
(
\x01\x12\x0f\n\x07
maxDist
\x18\x04
\x01
(
\x01\x12\x0f\n\x07
minDist
\x18\x05
\x01
(
\x01\x12\x13\n\x0b
maxAziAngle
\x18\x06
\x01
(
\x01\x12\x13\n\x0b
minAziAngle
\x18\x07
\x01
(
\x01\x12\x13\n\x0b
maxEleAngle
\x18\x08
\x01
(
\x01\x12\x13\n\x0b
minEleAngle
\x18\t
\x01
(
\x01\x12\x11\n\t
pointStep
\x18\n
\x01
(
\x05\x12\x15\n\r
pointDuration
\x18\x0b
\x01
(
\x05\x12\x0f\n\x07\x64\x61
tPath
\x18\x0c
\x01
(
\t\"\x8d\x02\n\x0b
TaskAutoSet
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0e\n\x06
siteNo
\x18\x02
\x01
(
\t\x12\x14\n\x0c\x61
utoStartHMS
\x18\x03
\x01
(
\t\x12\x12\n\n
autoEndHMS
\x18\x04
\x01
(
\t\x12\x15\n\r
autoFrequency
\x18\x05
\x01
(
\x05\x12\x1e\n\x16
taskAutoStrategyStatus
\x18\x06
\x01
(
\x08\x12\x1f\n\x08\x63
onflict
\x18\x07
\x01
(
\x0e\x32\r
.ConflictType
\x12\x1e\n\x16\x63
onflictStrategyStatus
\x18\x08
\x01
(
\x08\x12\x11\n\t
leastTime
\x18\t
\x01
(
\x03\x12\x12\n\n
switchTime
\x18\n
\x01
(
\x03\x12\x16\n\x0e\x63
ollectionTime
\x18\x0b
\x01
(
\x03\"
*
\n\r
TaskDetailDat
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\n\n\x02
id
\x18\x02
\x01
(
\t\"
]
\n\n
RetTaskDat
\x12
&
\n\x02\x64
t
\x18\x01
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x12\r\n\x05
range
\x18\x02
\x01
(
\x01\x12\x0b\n\x03\x65
le
\x18\x03
\x01
(
\x01\x12\x0b\n\x03\x61
zi
\x18\x04
\x01
(
\x01\"
,
\n\x0f
TaskDetailPoint
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\n\n\x02
id
\x18\x02
\x01
(
\t\"
`
\n\x0c
RetTaskPoint
\x12
&
\n\x02\x64
t
\x18\x01
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x12\x0b\n\x03
lat
\x18\x05
\x01
(
\t\x12\x0b\n\x03
lon
\x18\x06
\x01
(
\t\x12\x0e\n\x06
height
\x18\x07
\x01
(
\t
*
\x83\x01\n\n
TaskStatus
\x12\x0e\n\n
StatusInit
\x10\x00\x12\x0e\n\n
StatusUndo
\x10\x01\x12\x11\n\r
StatusWaiting
\x10\x02\x12\x0f\n\x0b
StatusDoing
\x10\x03\x12\x0e\n\n
StatusDone
\x10\x04\x12\x0f\n\x0b
StatusPause
\x10\x05\x12\x10\n\x0c
StatusFailed
\x10\n
*P
\n\t
TaskGrade
\x12\r\n\t
GradeNone
\x10\x00\x12\x0f\n\x0b
GradeNormal
\x10\x01\x12\x12\n\x0e
GradeImportant
\x10\x02\x12\x0f\n\x0b
GradeUrgent
\x10\x03
*n
\n\x0c\x43
onflictType
\x12\x18\n\x14\x43
onflictType_Default
\x10\x00\x12\x13\n\x0f\x43
onflictType_Dt
\x10\x01\x12\x14\n\x10\x43
onflictType_Ele
\x10\x02\x12\x19\n\x15\x43
onflictType_Priority
\x10\x03
*s
\n\t
Operation
\x12\x14\n\x10
OperationDefault
\x10\x00\x12\x13\n\x0f
OperationIssued
\x10\x01\x12\x12\n\x0e
OperationPause
\x10\x02\x12\x15\n\x11
OperationRecovery
\x10\x03\x12\x10\n\x0c
OperationDel
\x10\x04\x42\x0c
Z
\n
../protogob
\x06
proto3'
)
_builder
.
BuildMessageAndEnumDescriptors
(
DESCRIPTOR
,
globals
())
_builder
.
BuildTopDescriptorsAndMessages
(
DESCRIPTOR
,
'mod_task_pb2'
,
globals
())
if
_descriptor
.
_USE_C_DESCRIPTORS
==
False
:
DESCRIPTOR
.
_options
=
None
DESCRIPTOR
.
_serialized_options
=
b
'Z
\n
../protogo'
_RETTASKELEMENT_EXTENDENTRY
.
_options
=
None
_RETTASKELEMENT_EXTENDENTRY
.
_serialized_options
=
b
'8
\001
'
_RETTASKELEMENT_RESENTRY
.
_options
=
None
_RETTASKELEMENT_RESENTRY
.
_serialized_options
=
b
'8
\001
'
_RETTASKINDEX_DATAENTRY
.
_options
=
None
_RETTASKINDEX_DATAENTRY
.
_serialized_options
=
b
'8
\001
'
_TASKSTATUS
.
_serialized_start
=
2964
_TASKSTATUS
.
_serialized_end
=
3095
_TASKGRADE
.
_serialized_start
=
3097
_TASKGRADE
.
_serialized_end
=
3177
_CONFLICTTYPE
.
_serialized_start
=
3179
_CONFLICTTYPE
.
_serialized_end
=
3289
_OPERATION
.
_serialized_start
=
3291
_OPERATION
.
_serialized_end
=
3406
_RETTASKELEMENT
.
_serialized_start
=
89
_RETTASKELEMENT
.
_serialized_end
=
820
_RETTASKELEMENT_EXTENDENTRY
.
_serialized_start
=
731
_RETTASKELEMENT_EXTENDENTRY
.
_serialized_end
=
776
_RETTASKELEMENT_RESENTRY
.
_serialized_start
=
778
_RETTASKELEMENT_RESENTRY
.
_serialized_end
=
820
_TASKLIST
.
_serialized_start
=
823
_TASKLIST
.
_serialized_end
=
1047
_TASKFORECAST
.
_serialized_start
=
1050
_TASKFORECAST
.
_serialized_end
=
1268
_SITESATELLITELIST
.
_serialized_start
=
1270
_SITESATELLITELIST
.
_serialized_end
=
1339
_RETFORECASTONEOVER
.
_serialized_start
=
1341
_RETFORECASTONEOVER
.
_serialized_end
=
1376
_TASKPLAN
.
_serialized_start
=
1378
_TASKPLAN
.
_serialized_end
=
1454
_TASKHANDLECONFLICT
.
_serialized_start
=
1457
_TASKHANDLECONFLICT
.
_serialized_end
=
1615
_TASKISSUED
.
_serialized_start
=
1617
_TASKISSUED
.
_serialized_end
=
1715
_TASKPAUSE
.
_serialized_start
=
1717
_TASKPAUSE
.
_serialized_end
=
1776
_TASKRECOVERY
.
_serialized_start
=
1778
_TASKRECOVERY
.
_serialized_end
=
1840
_TASKDEL
.
_serialized_start
=
1842
_TASKDEL
.
_serialized_end
=
1899
_TASKCONFIRM
.
_serialized_start
=
1901
_TASKCONFIRM
.
_serialized_end
=
1959
_RETTASKCONFIRM
.
_serialized_start
=
1961
_RETTASKCONFIRM
.
_serialized_end
=
2022
_RETTASKINDEX
.
_serialized_start
=
2025
_RETTASKINDEX
.
_serialized_end
=
2158
_RETTASKINDEX_DATAENTRY
.
_serialized_start
=
2115
_RETTASKINDEX_DATAENTRY
.
_serialized_end
=
2158
_TASKFORECASTPARAMSET
.
_serialized_start
=
2161
_TASKFORECASTPARAMSET
.
_serialized_end
=
2406
_TASKAUTOSET
.
_serialized_start
=
2409
_TASKAUTOSET
.
_serialized_end
=
2678
_TASKDETAILDAT
.
_serialized_start
=
2680
_TASKDETAILDAT
.
_serialized_end
=
2722
_RETTASKDAT
.
_serialized_start
=
2724
_RETTASKDAT
.
_serialized_end
=
2817
_TASKDETAILPOINT
.
_serialized_start
=
2819
_TASKDETAILPOINT
.
_serialized_end
=
2863
_RETTASKPOINT
.
_serialized_start
=
2865
_RETTASKPOINT
.
_serialized_end
=
2961
# @@protoc_insertion_point(module_scope)
mqtt/auto_generate_python/mod_user_pb2.py
deleted
100644 → 0
View file @
7d680efc
# -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mod-user.proto
"""Generated protocol buffer code."""
from
google.protobuf.internal
import
builder
as
_builder
from
google.protobuf
import
descriptor
as
_descriptor
from
google.protobuf
import
descriptor_pool
as
_descriptor_pool
from
google.protobuf
import
symbol_database
as
_symbol_database
# @@protoc_insertion_point(imports)
_sym_db
=
_symbol_database
.
Default
()
from
google.protobuf
import
timestamp_pb2
as
google_dot_protobuf_dot_timestamp__pb2
DESCRIPTOR
=
_descriptor_pool
.
Default
()
.
AddSerializedFile
(
b
'
\n\x0e
mod-user.proto
\x1a\x1f
google/protobuf/timestamp.proto
\"\xf1\x01\n\x13
RetAdminUserElement
\x12\n\n\x02
id
\x18\x01
\x01
(
\x05\x12\x13\n\x04
role
\x18\x02
\x01
(
\x0e\x32\x05
.Role
\x12\x10\n\x08
username
\x18\x03
\x01
(
\t\x12\x0b\n\x03
pwd
\x18\x04
\x01
(
\t\x12\x0b\n\x03
off
\x18\x05
\x01
(
\x05\x12\x30\n\x06\x65
xtend
\x18\x06
\x03
(
\x0b\x32
.RetAdminUserElement.ExtendEntry
\x12
,
\n\x08\x63
reateDt
\x18\x07
\x01
(
\x0b\x32\x1a
.google.protobuf.Timestamp
\x1a
-
\n\x0b\x45
xtendEntry
\x12\x0b\n\x03
key
\x18\x01
\x01
(
\t\x12\r\n\x05
value
\x18\x02
\x01
(
\t
:
\x02\x38\x01\"
.
\n\x08
UserList
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x13\n\x04
role
\x18\x02
\x01
(
\x0e\x32\x05
.Role
\"
P
\n\n
UserCreate
\x12\x10\n\x08
username
\x18\x01
\x01
(
\t\x12\x0b\n\x03
pwd
\x18\x02
\x01
(
\t\x12\x13\n\x04
role
\x18\x03
\x01
(
\x0e\x32\x05
.Role
\x12\x0e\n\x06
remark
\x18\x04
\x01
(
\t\"
r
\n\n
UserUpdate
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x10\n\x08
username
\x18\x02
\x01
(
\t\x12\x0e\n\x06
oldPwd
\x18\x03
\x01
(
\t\x12\x0e\n\x06
newPwd
\x18\x04
\x01
(
\t\x12\x13\n\x04
role
\x18\x05
\x01
(
\x0e\x32\x05
.Role
\x12\x0e\n\x06
remark
\x18\x06
\x01
(
\t\"
)
\n\x07
UserDel
\x12\r\n\x05
token
\x18\x01
\x01
(
\x05\x12\x0f\n\x07
idArray
\x18\x02
\x03
(
\x05\"
&
\n\x05
Login
\x12\x10\n\x08
username
\x18\x01
\x01
(
\t\x12\x0b\n\x03
pwd
\x18\x02
\x01
(
\t
*6
\n\x04
Role
\x12\r\n\t
User_None
\x10\x00\x12\x0e\n\n
User_Admin
\x10\x01\x12\x0f\n\x0b
User_Normal
\x10\x02\x42\x0c
Z
\n
../protogob
\x06
proto3'
)
_builder
.
BuildMessageAndEnumDescriptors
(
DESCRIPTOR
,
globals
())
_builder
.
BuildTopDescriptorsAndMessages
(
DESCRIPTOR
,
'mod_user_pb2'
,
globals
())
if
_descriptor
.
_USE_C_DESCRIPTORS
==
False
:
DESCRIPTOR
.
_options
=
None
DESCRIPTOR
.
_serialized_options
=
b
'Z
\n
../protogo'
_RETADMINUSERELEMENT_EXTENDENTRY
.
_options
=
None
_RETADMINUSERELEMENT_EXTENDENTRY
.
_serialized_options
=
b
'8
\001
'
_ROLE
.
_serialized_start
=
624
_ROLE
.
_serialized_end
=
678
_RETADMINUSERELEMENT
.
_serialized_start
=
52
_RETADMINUSERELEMENT
.
_serialized_end
=
293
_RETADMINUSERELEMENT_EXTENDENTRY
.
_serialized_start
=
248
_RETADMINUSERELEMENT_EXTENDENTRY
.
_serialized_end
=
293
_USERLIST
.
_serialized_start
=
295
_USERLIST
.
_serialized_end
=
341
_USERCREATE
.
_serialized_start
=
343
_USERCREATE
.
_serialized_end
=
423
_USERUPDATE
.
_serialized_start
=
425
_USERUPDATE
.
_serialized_end
=
539
_USERDEL
.
_serialized_start
=
541
_USERDEL
.
_serialized_end
=
582
_LOGIN
.
_serialized_start
=
584
_LOGIN
.
_serialized_end
=
622
# @@protoc_insertion_point(module_scope)
mqtt/mqtt.py
View file @
2030137d
...
...
@@ -28,8 +28,12 @@ def send_message(data: dict):
"""
发送 websocket 消息
"""
send_websocket_message
(
data
)
if
data
[
'CMDS'
][
0
]
==
'$'
:
cmds
=
data
.
get
(
'CMDS'
)
if
cmds
is
None
:
return
if
cmds
[
0
]
==
'$'
:
send_websocket_message
(
data
,
group_name
=
"chat_acu7m5"
)
else
:
send_websocket_message
(
data
,
group_name
=
"chat_hwf"
)
...
...
mqtt/urls.py
View file @
2030137d
from
django.contrib
import
admin
from
django.urls
import
path
,
include
from
django.urls
import
path
,
re_path
from
.
import
views
urlpatterns
=
[
path
(
''
,
views
.
index
,
name
=
'index'
),
path
(
'publish/'
,
views
.
publish_message
,
name
=
'publish'
),
re_path
(
r'publish/$'
,
views
.
publish_message
,
name
=
'publish'
),
re_path
(
r'^protocol/(?P<protocol_name>.+)/$'
,
views
.
cmd_list
),
re_path
(
r'^cmd/(?P<cmd_name>.+)/$'
,
views
.
cmd_fields_list
),
]
mqtt/utils.py
View file @
2030137d
...
...
@@ -11,13 +11,35 @@ def parse_proto(data: bytes) -> dict:
device_cmd
=
TDSXDC_Device_cmd
()
cmd
.
parameters
[
0
]
.
Unpack
(
device_cmd
)
data
=
MessageToJson
(
device_cmd
,
including_default_value_fields
=
True
,
preserving_proto_field_name
=
True
)
# data = MessageToJson(device_cmd,
#
including_default_value_fields=True,
#
preserving_proto_field_name=True)
device_cmd_dict
=
json
.
loads
(
data
)
data
=
{
item
.
get
(
'fieldName'
):
item
.
get
(
'value'
)
for
item
in
device_cmd_dict
[
'fields'
]}
# device_cmd_dict = json.loads(data)
# print(device_cmd_dict)
data
=
{
item
.
fieldName
:
item
.
value
for
item
in
device_cmd
.
fields
}
# return json.dumps(json.loads(data), separators=(',', ':'))
return
data
def
compose_protobuf_message
(
param
:
dict
,
dst_suid
:
int
)
->
bytes
:
cmd
=
TDSCmd_pb2
.
TDSCmd
()
cmd
.
interface_id
=
TDSCmd_pb2
.
IID_Device_Xpro_TX_cmd
cmd
.
dst_suid
=
dst_suid
cmd
.
src_suid
=
0x1116
_0000
cmd
.
priority
=
100
cmd
.
ts
.
GetCurrentTime
()
parameters
=
TDSXDC_Device_cmd
()
parameters
.
DeviceID
=
param
[
'device_id'
]
parameters
.
cmd_name
=
param
[
'cmd_name'
]
for
param_field
in
param
[
'fields'
]:
field
=
parameters
.
fields
.
add
()
field
.
fieldName
=
param_field
[
'fieldname'
]
field
.
value
=
param_field
[
'value'
]
cmd
.
parameters
.
add
()
.
Pack
(
parameters
)
data
=
cmd
.
SerializeToString
()
return
data
mqtt/views.py
View file @
2030137d
from
django.http
import
JsonResponse
,
HttpResponse
from
django.middleware.csrf
import
get_token
from
django.shortcuts
import
render
,
redirect
from
django.dispatch
import
receiver
from
rest_framework
import
status
from
rest_framework.response
import
Response
from
rest_framework.decorators
import
api_view
from
.utils
import
compose_protobuf_message
from
device_data_op.models
import
(
TableDevCmdNamePoll
,
TableAllDevCmdDefine
,
TableXproAllDevinfo
)
from
device_data_op.serializers
import
(
TableDevCmdNamePollSerializer
,
TableAllDevCmdDefineSerializer
)
from
mqtt.mqtt
import
client
as
mqtt_client
@api_view
([
'GET'
])
def
cmd_list
(
request
,
protocol_name
:
str
):
"""
返回传入协议的所有发出指令名
"""
cmd_lists
=
TableDevCmdNamePoll
.
objects
.
filter
(
protocol_name
=
protocol_name
)
.
all
()
serializer
=
TableDevCmdNamePollSerializer
(
cmd_lists
,
many
=
True
)
ret_data
=
[
data
[
'cmd_name'
]
for
data
in
serializer
.
data
if
data
[
'cmd_type'
]
==
'TX'
]
return
Response
(
data
=
ret_data
,
status
=
status
.
HTTP_200_OK
)
@api_view
([
'GET'
])
def
cmd_fields_list
(
request
,
cmd_name
:
str
):
"""
返回传入指令所需要的字段
"""
cmd_fields
=
TableAllDevCmdDefine
.
objects
.
filter
(
cmd_name
=
cmd_name
)
.
all
()
serializer
=
TableAllDevCmdDefineSerializer
(
cmd_fields
,
many
=
True
)
ret_data
=
[
data
[
'fieldname'
]
for
data
in
serializer
.
data
]
return
Response
(
data
=
ret_data
,
status
=
status
.
HTTP_200_OK
)
@api_view
([
'POST'
])
def
publish_message
(
request
):
# request_data = json.loads(request.body)
topic
=
request
.
POST
[
'topic'
]
msg
=
request
.
POST
[
'msg'
]
rc
,
mid
=
mqtt_client
.
publish
(
topic
,
msg
)
return
JsonResponse
({
'code'
:
rc
})
"""
发送指令到 device
:param request:
{
"type": "device",
"station_id": "XX1",
"device_id": 1,
"cmd_name": "HY_ACU7M5_PositionSet",
"fields": [
{
"fieldname": "Xaxis",
"value": "120"
},
{
"fieldname": "Yaxis",
"value": "60"
}
]
}
"""
if
request
.
data
[
'station_id'
]
==
"XX1"
:
topic
=
"/1/1/1/3"
dst_suid
=
0x1113
_0000
elif
request
.
data
[
'station_id'
]
==
"XX0"
:
topic
=
"/1/1/0/3"
dst_suid
=
0x1103
_0000
else
:
return
Response
(
status
=
status
.
HTTP_400_BAD_REQUEST
)
message
=
compose_protobuf_message
(
request
.
data
,
dst_suid
)
rc
,
mid
=
mqtt_client
.
publish
(
topic
,
message
)
return
Response
(
status
=
status
.
HTTP_200_OK
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment