Files

50 lines
1.6 KiB
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/*
* 模块名称:sim_latency_stub
* 模块功能:链路时延探针(net_latency_test.h)的宿主空实现——探针打点站点位于
* 双端共享核心(ui_net_sink.c,TEST_LATENCY_PROBE 使能时编译),
* MCU 端符号由 test/board/net_latency_test.c 提供(DWT CYCCNT 时基,
* MCU 专属、宿主不可编译);模拟器构建在此以空操作满足链接,
* 不计时、不出报告(时延测量属台架能力,模拟器无意义)
* 适用平台:PC 模拟器(仅 simulator 构建编译本文件)
* 作者:王建锋
* 创建日期:2026-09-21
* 修改记录:
* 2026-09-21 王建锋 初版:修复模拟器链接断链(ui_net_sink.c 探针引用
* lat_mark/lat_mark_us/lat_probe_add_seg 无宿主定义)
*/
#include "net_latency_test.h"
/*
* 函数功能:打点标记(空操作,字段清零保证可辨识)
* 入口参数:p - 打点标记容器
* 返回值:无
*/
void lat_mark(lat_tmark_t *p) {
if (p != NULL) {
p->cyc = 0u;
p->tick = 0u;
}
}
/*
* 函数功能:打点差值(恒 0:模拟器不测时延)
* 入口参数:p - 打点标记容器
* 返回值:恒 0(微秒) uint32_t
*/
uint32_t lat_mark_us(const lat_tmark_t *p) {
(void)p;
return 0u;
}
/*
* 函数功能:按段名追加样本(空操作)
* 入口参数:seg - 段名 const char *
* us - 样本值(微秒) uint32_t
* 返回值:无
*/
void lat_probe_add_seg(const char *seg, uint32_t us) {
(void)seg;
(void)us;
}