refactor(vd960DBN): tcp_json_srv data_json[2048] 宏化 → TCP_JSON_DATA_BUF_LEN(1024)
三处 char data_json[2048] (sensor_report×2 + loop_param_query×1) 改用头文件宏 TCP_JSON_DATA_BUF_LEN, 默认 1024。 容量核验: format_sensor_json 4通道~660B / format_loop_param_json~920B 均 < 1024, format 函数有 snprintf 溢出保护; 最终帧受 MAX_FRAME=800 截断。 附带: 栈上缓冲 2048→1024 每处省 1KB
This commit is contained in:
@@ -18,6 +18,7 @@
|
||||
*===========================================================================*/
|
||||
#define TCP_JSON_PORT 5960 // TCP JSON protocol default port
|
||||
#define TCP_JSON_MAX_FRAME 800 //4096 // Max JSON frame length
|
||||
#define TCP_JSON_DATA_BUF_LEN 1024 // 本地 JSON 组装缓冲长度 (data_json)
|
||||
#define TCP_JSON_AUTH_TIMEOUT_MS 60000 // 60s auth timeout (ms)
|
||||
#define TCP_JSON_RECV_BUF_LEN (TCP_JSON_MAX_FRAME * 2)
|
||||
#define TCP_JSON_MAX_PWD_RETRY 3 // Max password retries before lockout
|
||||
|
||||
Reference in New Issue
Block a user