缩减代码

This commit is contained in:
2026-08-09 22:00:30 +08:00
parent 11e7affc75
commit 256c41fa9c
28 changed files with 157 additions and 1024 deletions
+2 -9
View File
@@ -3,7 +3,7 @@
#include <string_view>
#include "Local_Server/server/With_Loop_Coro.h"
#include "global.h"
enum class Output_Data_Format { AVR, AVR_MLAT, BIN, SBS, BIN_ID };
enum class Output_Data_Format { AVR, AVR_MLAT, BIN, SBS };
enum class Mode_S_Output_Type { DF_11_17_18, NO_POS_Mode_S, ALL_Mode_S };
struct Output_Format {
Output_Data_Format type = Output_Data_Format::BIN;
@@ -349,10 +349,7 @@ inline std::shared_ptr<Data_Feed> create_data_feed_from_type(std::string_view t)
}
class Data_feed_Config_Data {
public:
std::uint16_t empty_wait_milliseconds{};
std::uint16_t packet_byte_size{};
size_t tcp_server_default_connect_user_buffer_size{};
size_t tcp_server_default_connect_system_buffer_size{};
PSC_USE_JSON
};
namespace adminive {
@@ -361,10 +358,7 @@ struct Type_Descriptor<Data_feed_Config_Data> {
static auto get() {
using T = Data_feed_Config_Data;
return object<T>("data_feed_settings", "数据馈送全局配置",
ADMINIVE_FIELD_LABEL(T, empty_wait_milliseconds, "忙等待时间(毫秒").editable().number_input(),
ADMINIVE_FIELD_LABEL(T, packet_byte_size, "最小批大小(byte").editable().number_input(),
ADMINIVE_FIELD_LABEL(T, tcp_server_default_connect_user_buffer_size, "TCP 默认用户缓冲区").editable().number_input(),
ADMINIVE_FIELD_LABEL(T, tcp_server_default_connect_system_buffer_size, "TCP 默认系统缓冲区").editable().number_input());
ADMINIVE_FIELD_LABEL(T, packet_byte_size, "最小批大小(byte").editable().number_input());
}
};
}
@@ -398,6 +392,5 @@ public:
ret.append({"list", list()});
return ret;
}
Psc::JSON get_feed(std::string_view key);
void server(Global* g);
};