![]() |
Developing with ZBOSS for Zigbee
|
Macros | |
#define | ZB_ASSERT_COMPILE_TIME(expr) ((void)(zb_int_t (*)[(expr) ? 1 : -1])0) |
#define | ZB_ASSERT_COMPILE_TIME_EXPR(expr) ((zb_int_t)((zb_int_t (*)[(expr) ? 1 : -1])0)) |
#define | ZB_ASSERT_COMPILE_DECL(expr) |
#define | ZB_ASSERT_TYPE_SIZE_NOT_GREATER(type, limit) ZB_ASSERT_COMPILE_DECL(sizeof(type) <= (limit)) |
#define | ZB_ASSERT_TYPE_SIZE_NOT_LESS(type, limit) ZB_ASSERT_COMPILE_DECL(sizeof(type) >= (limit)) |
#define | ZB_ASSERT_TYPE_SIZE_EQ(type, limit) ZB_ASSERT_COMPILE_DECL(sizeof(type) == (limit)) |
#define ZB_ASSERT_COMPILE_DECL | ( | expr | ) |
Check condition at compile time in the declaration block
expr | - expression to check. |
#define ZB_ASSERT_COMPILE_TIME | ( | expr | ) | ((void)(zb_int_t (*)[(expr) ? 1 : -1])0) |
Check condition at compile time in the code (not declaration block)
expr | - expression to check. |
Check condition at compile time in the code (not declaration block), return 0 To be used inside an expressions.
expr | - expression to check. |
#define ZB_ASSERT_TYPE_SIZE_EQ | ( | type, | |
limit | |||
) | ZB_ASSERT_COMPILE_DECL(sizeof(type) == (limit)) |
Ensures, that size of type ‘type’ is equal to the ‘limit’. If it is not, compilation is aborted.
type | - type name |
limit | - size limit |
#define ZB_ASSERT_TYPE_SIZE_NOT_GREATER | ( | type, | |
limit | |||
) | ZB_ASSERT_COMPILE_DECL(sizeof(type) <= (limit)) |
Ensures, that size of type ‘type’ is not greater than ‘limit’. If it is not, compilation is aborted.
type | - type name |
limit | - size limit |
#define ZB_ASSERT_TYPE_SIZE_NOT_LESS | ( | type, | |
limit | |||
) | ZB_ASSERT_COMPILE_DECL(sizeof(type) >= (limit)) |
Ensures, that size of type ‘type’ is not less than ‘limit’. If it is not, compilation is aborted.
type | - type name |
limit | - size limit |