UaContentFilterElement Class Reference

#include <uacontentfilter.h>

Collaboration diagram for UaContentFilterElement:

List of all members.

Public Member Functions

 UaContentFilterElement ()
virtual ~UaContentFilterElement ()
void setElementIndex (OpcUa_Int32 elementIndex)
OpcUa_Int32 elementIndex () const
void setFilterOperator (OpcUa_FilterOperator filterOperator)
OpcUa_FilterOperator filterOperator () const
void setFilterOperand (OpcUa_UInt32 index, UaFilterOperand *pOperand, OpcUa_UInt32 arraySize)
OpcUa_UInt32 getFilterOperandArraySize () const
const UaFilterOperandgetFilterOperand (OpcUa_UInt32 index) const
 < [in] Index of the operand in the array
UaString toString () const

Detailed Description

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 hirarchy.


Constructor & Destructor Documentation

UaContentFilterElement::UaContentFilterElement (  )

Constructs an empty content filter element object.

UaContentFilterElement::~UaContentFilterElement (  ) [virtual]

Destroys the content filter element object


Member Function Documentation

OpcUa_Int32 UaContentFilterElement::elementIndex (  ) const

Returns the index of the filter element in the content filter element array.

OpcUa_FilterOperator UaContentFilterElement::filterOperator (  ) const

Returns the filter operator of the filter element.

See also:
setFilterOperator
const UaFilterOperand * UaContentFilterElement::getFilterOperand ( OpcUa_UInt32  index ) const

< [in] Index of the operand in the array

Returns the entry from the filter operand list on the requested index.

Returns:
Pointer to the UaFilterOperand.
OpcUa_UInt32 UaContentFilterElement::getFilterOperandArraySize (  ) const

Returns the array size of filter operand list.

void UaContentFilterElement::setElementIndex ( OpcUa_Int32  elementIndex )

Sets the index of the filter element in the content filter element array.

Parameters:
[in]elementIndexthe 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 definde:

  • 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 subelements by linking the operand of one element to a sub-element.
  • Literal
  • SimpleAttribute
    • Implemented by UaSimpleAttributeOperand derived from UaFilterOperand
    • Specifies any Attribute of an Object or Variable Node using a TypeDefinition and a relative path constructed from BrowseNames
Parameters:
[in]indexIndex of the operand in the array
[in]pOperandUaFilterOperand to set at the index in the array
[in]arraySizeSize 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 wildcard comparisons. Several special characters can be included in the second operand of the Like operator. The valid characters are defined in Table 112. The wildcard 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 charcter 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 lsame 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 lsame 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.
UaString UaContentFilterElement::toString (  ) const

Returns the content filter element as string.


The documentation for this class was generated from the following files:
  • /home/buildbot/work/uasdkcpp/src/uabase/uabasecpp/uacontentfilter.h
  • /home/buildbot/work/uasdkcpp/src/uabase/uabasecpp/uacontentfilter.cpp