From 642dac3e705380eea241648f875836e64dbc809e Mon Sep 17 00:00:00 2001
From: sean.zhou <sean.zhou@dji.com>
Date: Thu, 18 May 2023 17:43:06 +0800
Subject: [PATCH] Merge branch 'v1.5.0' What's new? 1. Add new model: DJI Matrices 350 RTK. 2. Update file hms.json. 3. Fixed some issues.
---
src/main/java/com/dji/sample/component/mqtt/service/IMessageSenderService.java | 50 +++++++++++++++++++++++++++++++++++++++++++++++---
1 files changed, 47 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/dji/sample/component/mqtt/service/IMessageSenderService.java b/src/main/java/com/dji/sample/component/mqtt/service/IMessageSenderService.java
index 40f7f18..e21816c 100644
--- a/src/main/java/com/dji/sample/component/mqtt/service/IMessageSenderService.java
+++ b/src/main/java/com/dji/sample/component/mqtt/service/IMessageSenderService.java
@@ -2,6 +2,7 @@
import com.dji.sample.component.mqtt.model.CommonTopicResponse;
import com.dji.sample.component.mqtt.model.ServiceReply;
+import com.fasterxml.jackson.core.type.TypeReference;
/**
* @author sean.zhou
@@ -26,15 +27,16 @@
void publish(String topic, int qos, CommonTopicResponse response);
/**
- * Send live streaming start message and receive a response at the same time.
+ * Send message and receive a response at the same time.
+ * @param clazz
* @param topic
* @param response notification of whether the start is successful.
* @return
*/
- ServiceReply publishWithReply(String topic, CommonTopicResponse response);
+ <T> T publishWithReply(Class<T> clazz, String topic, CommonTopicResponse response);
/**
- * Send live streaming start message and receive a response at the same time.
+ * Send message and receive a response at the same time.
* @param clazz
* @param topic
* @param response
@@ -43,4 +45,46 @@
* @return
*/
<T> T publishWithReply(Class<T> clazz, String topic, CommonTopicResponse response, int retryTime);
+
+ /**
+ * Used exclusively for sending messages for services.
+ * @param clazz The generic class for ServiceReply.
+ * @param sn
+ * @param method
+ * @param data
+ * @param bid
+ * @param <T>
+ * @return
+ */
+ <T> ServiceReply<T> publishServicesTopic(TypeReference<T> clazz, String sn, String method, Object data, String bid);
+
+ /**
+ * Used exclusively for sending messages for services, and does not set the received subtype.
+ * @param sn
+ * @param method
+ * @param data
+ * @param bid
+ * @return
+ */
+ ServiceReply publishServicesTopic(String sn, String method, Object data, String bid);
+
+ /**
+ * Used exclusively for sending messages for services.
+ * @param clazz The generic class for ServiceReply.
+ * @param sn
+ * @param method
+ * @param data
+ * @param <T>
+ * @return
+ */
+ <T> ServiceReply<T> publishServicesTopic(TypeReference<T> clazz, String sn, String method, Object data);
+
+ /**
+ * Used exclusively for sending messages for services, and does not set the received subtype.
+ * @param sn
+ * @param method
+ * @param data
+ * @return
+ */
+ ServiceReply publishServicesTopic(String sn, String method, Object data);
}
--
Gitblit v1.9.3