72 #ifndef _CL_RULE_API_H_
73 #define _CL_RULE_API_H_
89 #define CL_RULE_SWAP32(x) ( (((x)>>24)&0xFF) | \
94 #define CL_RULE_SWAP16(x) ( (((x)>>8)&0xFF) | \
165 #define CL_RULE_EXPR_FLAG_BITS (2)
166 #define CL_RULE_ARCH_FLAG_MASK (0x3)
167 #define CL_RULE_EXPR_FLAG_MASK (~(CL_RULE_ARCH_FLAG_MASK))
168 #define CL_RULE_EXPR_FLAG_DEFAULT (CL_RULE_NON_ZERO_MATCH | CL_RULE_EXPR_CHAIN_AND)
262 #define maskByte BI_u.Byte
263 #define maskInt BI_u.Int
Typical defines found in any software project.
Common Error Codes shared across multiple Clovis ASP Components.
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
#define CL_OUT
CL_OUT macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:110
#define CL_IN
CL_IN macro assists in clearly defining arguments of an API, but has no actual meaning.
Definition: clCommon.h:106
ClRcT clRuleExprValueSet(CL_IN ClRuleExprT *pExpr, CL_IN ClUint16T offset, CL_IN ClUint32T value)
Set Value of a RBE expression.
ClRcT clRuleExprPrint(CL_IN ClRuleExprT *pExpr)
Prints a complex RBE Expression.
ClRcT clRuleExprOffsetSet(CL_IN ClRuleExprT *pExpr, CL_IN ClUint16T offset)
Sets offset of a RBE expression.
ClRcT clRuleExprMaskGet(CL_IN ClRuleExprT *pExpr, CL_IN ClUint16T offset, CL_OUT ClUint32T *pMask)
Get RBE expression Mask value.
ClRcT clRuleExprUnpack(CL_IN ClUint8T *pBuf, CL_IN ClUint32T len, CL_OUT ClRuleExprT **ppDstExpr)
UnPack a RBE Expression.
ClRcT clRuleExprAllocate(CL_IN ClUint8T len, CL_OUT ClRuleExprT **ppExpr)
Allocates RBE expression.
ClRcT clRuleExprAppend(CL_IN ClRuleExprT *pFirstExpr, CL_IN ClRuleExprT *pNextExpr)
Appends a RBE expression.
ClRcT clRuleExprValueGet(CL_IN ClRuleExprT *pExpr, CL_IN ClUint16T offset, CL_OUT ClUint32T *pValue)
Get RBE expression value.
ClRcT clRuleExprPack(CL_IN ClRuleExprT *pSrcExpr, CL_OUT ClUint8T **ppBuf, CL_OUT ClUint32T *pLen)
Pack an RBE Expression into the given memory area.
ClRuleResultT
RBE result enum.
Definition: clRuleApi.h:218
ClRcT clRuleExprOffsetGet(CL_IN ClRuleExprT *pExpr, CL_OUT ClUint16T *pOffset)
Get RBE expression Offset value.
ClUint32T clRuleExprMemLenGet(CL_IN ClRuleExprT *pExpr)
Get the total memory used by the expression.
ClRuleResultT clRuleDoubleExprEvaluate(CL_IN ClRuleExprT *pExpr1, CL_IN ClRuleExprT *pExpr2)
Evaluates Double RBE Expressions.
struct ClRuleExpr ClRuleExprT
Rule to filter data.Expression definition.
ClRcT clRuleExprFlagsGet(CL_IN ClRuleExprT *pExpr, CL_OUT ClRuleExprFlagsT *pFlags)
Gets RBE expression flags.
ClRcT clRuleExprMaskSet(CL_IN ClRuleExprT *pExpr, CL_IN ClUint16T offset, CL_IN ClUint32T mask)
Set Mask of an RBE expression.
ClRcT clRuleExprFlagsSet(CL_IN ClRuleExprT *pExpr, CL_IN ClRuleExprFlagsT flags)
Sets Flags of an RBE expression.
ClRuleResultT clRuleExprEvaluate(CL_IN ClRuleExprT *pExpr, CL_IN ClUint32T *pData, CL_IN int dataLen)
Evaluates a complex RBE Expression.
ClRcT clRuleExprDeallocate(CL_IN ClRuleExprT *pExpr)
Frees an RBE expression.
ClRuleExprFlagsT
Its filters acc, filter the data based on the rule.Expression qualification.
Definition: clRuleApi.h:178
@ CL_RULE_UNKNOWN
Unknown result (not used).
Definition: clRuleApi.h:233
@ CL_RULE_TRUE
Expression evaluation passed.
Definition: clRuleApi.h:228
@ CL_RULE_FALSE
Expression evaluated failed.
Definition: clRuleApi.h:223
@ CL_RULE_LITTLE_END
Little endian.
Definition: clRuleApi.h:183
@ CL_RULE_NON_ZERO_MATCH
Non-zero match.
Definition: clRuleApi.h:193
@ CL_RULE_EXPR_CHAIN_AND
Appending two RBE expression with AND relation.
Definition: clRuleApi.h:203
@ CL_RULE_BIG_END
Big endian.
Definition: clRuleApi.h:188
@ CL_RULE_EXPR_CHAIN_GROUP_OR
Appending a grouping expression with a AND/OR.
Definition: clRuleApi.h:208
@ CL_RULE_MATCH_EXACT
Exact match.
Definition: clRuleApi.h:198
Rule to filter data.Expression definition.
Definition: clRuleApi.h:241
ClUint8T Byte[1]
Expression mask and value array.
Definition: clRuleApi.h:268
ClUint8T len
Expression length in multiples of four bytes.
Definition: clRuleApi.h:251
struct ClRuleExpr * next
Multiple RBEs can be chained to build complex expression.
Definition: clRuleApi.h:261
ClUint16T offset
Offset with the data where expression is applied.
Definition: clRuleApi.h:256
ClUint8T flags
Architecture and other flags.
Definition: clRuleApi.h:246