XFusion API v1.3.0
载入中...
搜索中...
未找到
xf_check.h 文件参考

运行时检查宏。 更多...

xf_check.h 的引用(Include)关系图:

浏览源代码.

宏定义

#define XF_CHECK_ACTION_RETURN(condition, retval, action)
 检查条件(condition),成立则执行(action),并 return (retval).
 
#define XF_CHECK_ACTION_GOTO(condition, label, action)
 检查条件(condition),成立则执行(action),并跳转到(label).
 
#define XF_CHECK(condition, retval, tag, format, ...)
 xfusion 检查宏(条件 成立 时则输出日志后返回)。
 
#define XF_CHECK_GOTO(condition, label, tag, format, ...)
 xfusion 检查宏(条件 成立 时则输出日志后跳转)。
 
#define XF_ASSERT(condition, retval, tag, format, ...)
 xfusion 断言宏(条件 不成立 时则输出日志后返回)。
 
#define XF_ASSERT_GOTO(condition, label, tag, format, ...)
 xfusion 断言宏(条件 不成立 时则输出日志后跳转)。
 
#define XF_ERROR_CHECK(expression)
 xfusion 错误检查宏(表达式 不等于 XF_OK 时则调用 XF_CHECK_ERROR_HANDLER)。
 
XF_CHECK_NO_ACTION

XF_RETURN_VOID、XF_ACTION_NO 是在 XF_CHECK 无需返回的情况使用:

XF_CHECK(timer == NULL , XF_RETURN_VOID, TAG, "timer == NULL");
XF_CHECK_ACTION_RETURN(port_in == NULL, port_out, XF_ACTION_NO);
#define XF_RETURN_VOID
Definition xf_check.h:47
#define XF_CHECK(condition, retval, tag, format,...)
xfusion 检查宏(条件 成立 时则输出日志后返回)。
Definition xf_check.h:112
#define XF_CHECK_ACTION_RETURN(condition, retval, action)
检查条件(condition),成立则执行(action),并 return (retval).
Definition xf_check.h:69
#define XF_ACTION_NO
Definition xf_check.h:48
#define TAG
Definition xf_main.c:24
static xf_osal_timer_t timer
Definition xf_main.c:41
#define XF_RETURN_VOID
 
#define XF_ACTION_NO
 

详细描述

运行时检查宏。

作者
catcatBlue (catca.nosp@m.tblu.nosp@m.e@qq..nosp@m.com)
版本
1.0
日期
2024-06-25

Copyright (c) 2024, CorAL. All rights reserved.

在文件 xf_check.h 中定义.