From 6674608e3c3b08551109fe3560ee0240cedf83a8 Mon Sep 17 00:00:00 2001 From: geondo55 <102933884+geondo55@users.noreply.github.com> Date: Fri, 27 Jun 2025 17:34:00 +0900 Subject: [PATCH] =?UTF-8?q?Topic=20Test=20Result=EA=B0=80=20=EC=A0=95?= =?UTF-8?q?=EC=83=81=EC=A0=81=EC=9C=BC=EB=A1=9C=20=ED=91=9C=EC=8B=9C?= =?UTF-8?q?=EB=90=98=EC=A7=80=20=EC=95=8A=EC=9D=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/Studio/UI/Panel_MQTTTestResult.cs | 6 ++- .../Studio/UI/UI_MQTTTestResultItem.cs | 39 +++++++++++++++++-- 2 files changed, 40 insertions(+), 5 deletions(-) diff --git a/Assets/Scripts/Studio/UI/Panel_MQTTTestResult.cs b/Assets/Scripts/Studio/UI/Panel_MQTTTestResult.cs index d1282c2e..d81620f5 100644 --- a/Assets/Scripts/Studio/UI/Panel_MQTTTestResult.cs +++ b/Assets/Scripts/Studio/UI/Panel_MQTTTestResult.cs @@ -17,6 +17,9 @@ namespace Studio.UI public ScrollRect scrollView_TopicResults; public UI_MQTTTestResultItem prf_MQTTTestResultItem; public Button button_Close; + + private DateTime requestTime; + public struct MQTTTestResult { public string topic; @@ -48,6 +51,7 @@ namespace Studio.UI public void Open(string domain, string port) { Debug.Log($"Open MQTT Test Result Panel. Domain: {domain}, Port: {port}"); + requestTime = DateTime.Now; Item_Domain.SetValue(domain); Item_Port.SetValue(port); gameObject.SetActive(true); @@ -65,7 +69,7 @@ namespace Studio.UI } var item = Instantiate(prf_MQTTTestResultItem, scrollView_TopicResults.content); - item.SetResult(result.topic, result.message, result.payload); + item.SetResult(result.topic, result.message, result.payload, requestTime, DateTime.Now); item.transform.SetParent(scrollView_TopicResults.content); items.Add(item); } diff --git a/Assets/Scripts/Studio/UI/UI_MQTTTestResultItem.cs b/Assets/Scripts/Studio/UI/UI_MQTTTestResultItem.cs index 6f6b7a7f..eb41c57c 100644 --- a/Assets/Scripts/Studio/UI/UI_MQTTTestResultItem.cs +++ b/Assets/Scripts/Studio/UI/UI_MQTTTestResultItem.cs @@ -1,4 +1,5 @@ using System; +using System.Collections.Generic; using TMPro; using TriLibCore.Extensions; using UnityEngine; @@ -13,6 +14,9 @@ namespace Studio.UI public Transform Item_Topic; public UVCKeyValueItem Item_TopicPayload; public UVCKeyValueItem Item_TopicPacketSize; + public UVCKeyValueItem Item_LastRequestTime; + public UVCKeyValueItem Item_LastResponseTime; + public UVCKeyValueItem Item_LastSpandTime; public Button expand; public Button refresh; @@ -21,7 +25,9 @@ namespace Studio.UI Item_Topic = transform.DeepFind(nameof(Item_Topic)); Item_TopicPayload = transform.DeepFind(nameof(Item_TopicPayload)); Item_TopicPacketSize = transform.DeepFind(nameof(Item_TopicPacketSize)); - + Item_LastRequestTime = transform.DeepFind(nameof(Item_LastRequestTime)); + Item_LastResponseTime = transform.DeepFind(nameof(Item_LastResponseTime)); + Item_LastSpandTime = transform.DeepFind(nameof(Item_LastSpandTime)); refresh = Item_Topic.GetComponentInChildren