Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄嘉阳
/
iot-mqtt-protocol
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bec0eec6
authored
Oct 30, 2023
by
huangjy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
mqtt协议包修改
parent
17e80146
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
src/main/java/org/jetlinks/protocol/official/JetLinksMqttDeviceMessageCodec.java
src/main/java/org/jetlinks/protocol/official/entity/CustomWriteMessage.java
src/main/java/org/jetlinks/protocol/official/JetLinksMqttDeviceMessageCodec.java
View file @
bec0eec6
...
...
@@ -182,12 +182,8 @@ public class JetLinksMqttDeviceMessageCodec implements DeviceMessageCodec {
Set
<
String
>
keySet
=
jsonObject
.
keySet
();
Map
<
String
,
Object
>
propertiesMap
=
new
HashMap
<>();
for
(
String
key
:
keySet
)
{
if
(
key
.
equals
(
"usrServerInfo"
))
{
propertiesMap
.
put
(
key
,
JSON
.
toJSONString
(
jsonObject
.
get
(
key
)));
}
else
{
propertiesMap
.
put
(
key
,
((
JSONObject
)
jsonObject
.
get
(
key
)).
get
(
"value"
));
}
}
map
.
put
(
"properties"
,
propertiesMap
);
map
.
put
(
"success"
,
true
);
map
.
put
(
"messageId"
,
messageId
);
...
...
src/main/java/org/jetlinks/protocol/official/entity/CustomWriteMessage.java
View file @
bec0eec6
...
...
@@ -2,11 +2,12 @@ package org.jetlinks.protocol.official.entity;
import
lombok.Data
;
import
org.jetlinks.core.message.property.ReadPropertyMessage
;
import
org.jetlinks.core.message.property.WritePropertyMessage
;
import
java.util.Map
;
@Data
public
class
CustomWriteMessage
extends
Read
PropertyMessage
{
public
class
CustomWriteMessage
extends
Write
PropertyMessage
{
private
Header
header
;
private
PayLoad
payload
;
...
...
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