Code Examples.
Code Examples.
The RBE is used to filter or select a subset of objects from a group. For example, group object implements "filtered walk" using RBE which is used by EM to select qualified subscribers to an event based on the event data. Similarly IOC provides received message filtering using RBE.
Following are some examples on how to use the RBE functions. Let's say that we have a message header - an array of bytes and the RBE is used to look for a perticular pattern - viz message from a perticular destination address and a perticular tag.
{
Rbe expression, user data, data length = 2 32 bit units
{
We have received a msg with ABCDABCD as the fist 4 bytes and
DEAD as the next two bytes.
}
}
ClRcT clRuleExprValueSet(CL_IN ClRuleExprT *pExpr, CL_IN ClUint16T offset, CL_IN ClUint32T value)
Set Value of a RBE expression.
ClRcT clRuleExprOffsetSet(CL_IN ClRuleExprT *pExpr, CL_IN ClUint16T offset)
Sets offset of a RBE expression.
ClRcT clRuleExprAllocate(CL_IN ClUint8T len, CL_OUT ClRuleExprT **ppExpr)
Allocates RBE expression.
ClRcT clRuleExprMaskSet(CL_IN ClRuleExprT *pExpr, CL_IN ClUint16T offset, CL_IN ClUint32T mask)
Set Mask of an RBE expression.
ClRuleResultT clRuleExprEvaluate(CL_IN ClRuleExprT *pExpr, CL_IN ClUint32T *pData, CL_IN int dataLen)
Evaluates a complex RBE Expression.
Rule to filter data.Expression definition.
Definition: clRuleApi.h:241