You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
1.6 KiB

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CoreAgent.ProtocolClient.Models;
using Newtonsoft.Json.Linq;
namespace CoreAgent.ProtocolClient.ProtocolWsClient
{
public partial class ProtocolWsClient
{
#region 业务接口实现
public void ResetLogs() => _protocolLogProcessor.ResetLogs();
public void SetLogsConfig(ProtocolClientLogsConfig logsConfig, bool save = false) => _protocolLogProcessor.SetLogsConfig(logsConfig, save);
public void LogGet(Dictionary<string, object>? parameters = null) => _protocolLogProcessor.GetLogs(parameters);
public void TriggerStatsUpdate() => _statsManager.TriggerStatsUpdate();
public void ResetStatistics() => _statsManager.ResetStatistics();
public void SetStatisticsConfig(bool enableSamples, bool enableRf) => _statsManager.SetStatisticsConfig(enableSamples, enableRf);
public (bool samples, bool rf) GetStatisticsConfig() => _statsManager.GetStatisticsConfig();
public void SetRefreshDelay(int delay) => _statsManager.SetRefreshDelay(delay);
public void SetMessageHandler(string[] names, MessageHandler handler) => _handlerManager.SetMessageHandler(names, handler);
public void UnsetMessageHandler(string[] names) => _handlerManager.UnsetMessageHandler(names);
public long SendMessage(JObject message, Action<JObject>? callback = null, bool errorHandler = false)
{
return _messageManager.SendMessage(message, callback, errorHandler);
}
#endregion
}
}