OPC UA ContentFilterElement used in ContentFilter.
More...
#include <uacontentfilter.h>
|
OpcUa_FilterOperator | m_filterOperator |
|
UaFilterOperands | m_filterOperands |
|
OpcUa_Int32 | m_elementIndex |
|
OPC UA ContentFilterElement used in ContentFilter.
This class is used to build and hold an OPC UA ContentFilterElement used in the UaContentFilter. The content filter elements and the element filter operands (UaElementOperand derived from UaFilterOperand) can be used to build a filter hierarchy.
OpcUa_FilterOperator UaContentFilterElement::filterOperator |
( |
| ) |
const |
const UaFilterOperand * UaContentFilterElement::getFilterOperand |
( |
OpcUa_UInt32 |
index | ) |
const |
Returns the entry from the filter operand list on the requested index.
- Returns
- Pointer to the UaFilterOperand.
- Parameters
-
[in] | index | Index of the operand in the array |
void UaContentFilterElement::setElementIndex |
( |
OpcUa_Int32 |
elementIndex | ) |
|
Sets the index of the filter element in the content filter element array.
- Parameters
-
[in] | elementIndex | the index of the current element |
void UaContentFilterElement::setFilterOperand |
( |
OpcUa_UInt32 |
index, |
|
|
UaFilterOperand * |
pOperand, |
|
|
OpcUa_UInt32 |
arraySize |
|
) |
| |
Sets one operand of the filter operand list.
The passed element will be deleted by the UaContentFilterElement. There are three different filter operands defined:
- Element
- Implemented by UaElementOperand derived from UaFilterOperand
- Specifies an index into the array of elements. This type is use to build a logic tree of sub elements by linking the operand of one element to a sub-element.
- Literal
- SimpleAttribute
- Parameters
-
[in] | index | Index of the operand in the array |
[in] | pOperand | UaFilterOperand to set at the index in the array |
[in] | arraySize | Size of the operand array filled with this method |
void UaContentFilterElement::setFilterOperator |
( |
OpcUa_FilterOperator |
filterOperator | ) |
|
Sets the filter operator for the filter element.
Possible filter operators are:
- Equals (OpcUa_FilterOperator_OfType) - 2 operands
- TRUE if operand[0] is equal to operand[1].
- If the operands are of different types, the system shall perform any implicit conversion to a common type. This operator resolves to FALSE if no implicit conversion is available and the operands are of different types. This operator returns FALSE if the implicit conversion fails.
- IsNull (OpcUa_FilterOperator_IsNull) - 1 operand
- TRUE if operand[0] is a null value
- GreaterThan (OpcUa_FilterOperator_GreaterThan) - 2 operands
- TRUE if operand[0] is greater than operand[1].
- Operands must resolve to an ordered value
- The same conversion rules as defined for Equals apply.
- LessThan (OpcUa_FilterOperator_LessThan) - 2 operands
- TRUE if operand[0] is less than operand[1].
- The same conversion rules and restrictions as defined for GreaterThan apply.
- LessThanOrEqual (OpcUa_FilterOperator_LessThanOrEqual) - 2 operands
- TRUE if operand[0] is less than or equal to operand[1].
- The same conversion rules and restrictions as defined for GreaterThan apply.
- Like (OpcUa_FilterOperator_Like) - 2 operands
- TRUE if operand[0] matches a pattern defined by operand[1].
- Operands must resolve to an string. This operator resolves to FALSE if any operand can not be resolved to a string.
- The Like operator can be used to perform wild card comparisons. Several special characters can be included in the second operand of the Like operator. The valid characters are defined in Table 112. The wild card characters can be combined in a single string (i.e. 'Th[ia][ts]' would match 'That is fine', 'This is fine', 'That as one', 'This it is', 'Then at any' etc.).
- Wildcard characters
- % - Match any string of zero or more characters (i.e. 'main' would match any string that starts with 'main', 'en' would match any string that contains the letters 'en' such as 'entail', 'green' and 'content'.) If a '' sign is intend in a string the list operand can be used (i.e. 5[%] would match '5').
- _ - Match any single character (i.e. 'ould' would match 'would', 'could'). If the '' is indended in a string then the list operand can be used (i.e. 5[_] would match '5_').
- \ - Escape character allows literal interpretation (i.e. \\ is \, \% is %, \_ is _)
- [] - Match any single character in a list (i.e. 'abc[13-68] would match 'abc1','abc3','abc4','abc5','abc6', and 'abc8'. 'xyz[c-f]' would match 'xyzc', 'xyzd', 'xyze', 'xyzf').
- [^] - Not Matching any single character in a list. The ^ shall be the first character inside on the []. (i.e. 'ABC[^13-5]' would NOT match 'ABC1', 'ABC3', 'ABC4', and 'ABC5'. xyz[^dgh] would NOT match 'xyzd', 'xyzg', 'xyzh'. )
- Not (OpcUa_FilterOperator_Not) - 1 operand
- TRUE if operand[0] is FALSE.
- Operand must resolve to a Boolean.
- Between (OpcUa_FilterOperator_Between) - 3 operands
- TRUE if operand[0] is greater or equal to operand[1] and less than or equal to operand[2].
- Operands must resolve to an ordered value
- If the operands are of different types, the system shall perform any implicit conversion to match all operands to a common type. If no implicit conversion is available and the operands are of different types, the particular result is FALSE.
- InList (OpcUa_FilterOperator_OfType) - 2-n operands
- TRUE if operand[0] is equal to one or more of the remaining operands.
- And (OpcUa_FilterOperator_And) - 2 operands
- TRUE if operand[0] and operand[1] are TRUE.
- Operands must resolve to a Boolean.
- Or (OpcUa_FilterOperator_Or) - 2 operands
- TRUE if operand[0] or operand[1] are TRUE.
- Operands must resolve to a Boolean.
- Cast (OpcUa_FilterOperator_Cast) - 2 operands
- Converts operand[0] to a value with a data type with a NodeId identified by operand[1].
- BitwiseAnd (OpcUa_FilterOperator_BitwiseAnd) - 2 operands
- The result is an integer which matches the size of the largest operand and contains a bitwise And operation of the two operands where both have been converted to the same size (largest of the two operands)
- Operands must resolve to a Integer. If any operand can not be resolved to a Integer it is considered a NULL.
- BitwiseOr (OpcUa_FilterOperator_BitwiseOr) - 2 operands
- The result is an integer which matches the size of the largest operand and contains a bitwise Or operation of the two operands where both have been converted to the same size (largest of the two operands)
- Operands must resolve to a Integer. If any operand can not be resolved to a Integer it is considered a NULL.
- OfType (OpcUa_FilterOperator_OfType) - 1 operand
- TRUE if the target Node is of type operand[0] or of a subtype of operand[0].
- Operand must resolves to a NodeId that identifies an ObjectType or VariableType Node.
- If operand[0] does not resolve to a NodeId that identifies an ObjectType or VariableType Node, this operation shall always be False.
The documentation for this class was generated from the following files:
- D:/work/uasdkcpp/src/uabase/uabasecpp/uacontentfilter.h
- D:/work/uasdkcpp/src/uabase/uabasecpp/uacontentfilter.cpp