/* * 模块名称:主机侧单测桩 - dbg_log.h(net_socket 模块专用) * 模块功能:DBG_* 换成计数,风格与本目录既有 NET 域桩一致(net_listener / net_events * 同名文件)。net_socket.c 有 11 条 DBG_ERROR + 6 条 DBG_INFO,其中 * 「短写必留痕」「版本门控拒置 bit3 必 [ERR]」「open 失败必 [ERR]」 * 「close 复位没成也放行仍要留痕」这四条本身就是可断言的契约。 * 本模块在 include 本头之前把 DBG_LINE_BUF_MAX 设为 128U(AGENTS 深调用链纪律), * 桩不关心缓冲大小,只数条数。 * ⚠ 仅供主机侧单测使用,不参与 MCU 构建。 * 创建日期:2026-10-24 */ #ifndef DBG_LOG_H #define DBG_LOG_H extern int g_ns_info_count; extern int g_ns_error_count; extern int g_ns_debug_count; #define DBG_INFO(fmt, ...) do { (void)(fmt); g_ns_info_count++; } while (0) #define DBG_DEBUG(fmt, ...) do { (void)(fmt); g_ns_debug_count++; } while (0) #define DBG_ERROR(fmt, ...) do { (void)(fmt); g_ns_error_count++; } while (0) #endif /* DBG_LOG_H */