private void Update()
        {
            if (!IsTaskRunning)
            {
                return;
            }

            if (TargetSockets.Count == 0)
            {
                return;
            }

            var targetNode = TargetSockets[CurrentTargetSocketIndex].Node;

            if (ShowExtendedMetrics)
            {
                RadioMetrics.Interop.ExtendedMetrics metrics;
                try {
                    metrics = _radioMetricsCotask.getExtendedMetrics(targetNode);
                    Debug.Log($"Tx (bytes): {metrics.txBytes}, Tx packets count: {metrics.txPacketsCount}, " +
                              $"Rx bytes: {metrics.rxBytes}, Rx packets count: {metrics.rxPacketsCount}, flow count: {metrics.flowCount}, " +
                              $"average RSSI: {metrics.averageRssi} dBm, min RSSI: {metrics.minRssi} dBm, max RSSI: {metrics.maxRssi} dBm, " +
                              $"missed packets: {metrics.missedPacketsCount}, failed packets: {metrics.failedPacketsCount}");
                }
                catch (Exception e) {
                    Debug.Log($"{e.Message}");
                    return;
                }
            }
            else
            {
                RadioMetrics.Metrics metrics;
                try {
                    metrics = _radioMetricsCotask.getMetrics(targetNode);
                    Debug.Log($"Average RSSI: {metrics.averageRssi} dBm, packet loss rate: {metrics.packetLossRate.ToString("0.00")}%");
                }
                catch (Exception e) {
                    Debug.Log($"{e.Message}");
                    return;
                }
            }
        }
        private void Update()
        {
            if (!IsTaskRunning)
            {
                return;
            }
            var targetNode = TargetSockets[CurrentTargetSocketIndex].Node;

            if (ShowExtendedMetrics)
            {
                var metrics = _radioMetricsCotask.getExtendedMetrics(targetNode);
                Debug.LogFormat("Tx (bytes): {0}, Tx packets count: {1}, Rx bytes: {2}, Rx packets count: {3}, " +
                                "flow count: {4}, average RSSI: {5}, min RSSI: {6}, max RSSI: {7}, missed packets: {8}, failed packets: {9}",
                                metrics.txBytes, metrics.txPacketsCount, metrics.rxBytes, metrics.rxPacketsCount,
                                metrics.flowCount, metrics.averageRssi, metrics.minRssi, metrics.maxRssi, metrics.missedPacketsCount, metrics.failedPacketsCount);
            }
            else
            {
                var metrics = _radioMetricsCotask.getMetrics(targetNode);
                Debug.LogFormat("Average RSSI: {0}, packet loss rate: {1}", metrics.averageRssi, metrics.packetLossRate);
            }
        }