Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event filter #560

Open
PvanIeperen opened this issue Sep 26, 2023 · 1 comment
Open

Event filter #560

PvanIeperen opened this issue Sep 26, 2023 · 1 comment
Labels
question Further information is requested stale

Comments

@PvanIeperen
Copy link

I'm looking in to some examples regarding the event filters.
We noticed that while connecting to a server made with the open62541 library we cannot receive any events.

public SimpleAttributeOperandCollection GetSelectClause()
{
    SimpleAttributeOperandCollection selectClause = new SimpleAttributeOperandCollection();

    var operand = new SimpleAttributeOperand
    {
        TypeDefinitionId = Opc.Ua.ObjectTypeIds.BaseEventType,
        AttributeId = Attributes.NodeId
    };

     // What is the use of this first SelectClause?
    selectClause.Add(operand);

    foreach (FilterDeclarationField field in Fields)
    {
        if (field.Selected)
        {
            operand = new SimpleAttributeOperand
            {
                TypeDefinitionId = field.InstanceDeclaration.RootTypeId,
                AttributeId = (field.InstanceDeclaration.NodeClass == NodeClass.Object) ? Attributes.NodeId : Attributes.Value,
                BrowsePath = field.InstanceDeclaration.BrowsePath
            };

            selectClause.Add(operand);
        }
    }

    return selectClause;
}

When I do not add the first selectClause than I can receive events.

What is the use of the first selectClause?

Regards Patrick

@mregen mregen added the question Further information is requested label Dec 19, 2023
Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested stale
Projects
None yet
Development

No branches or pull requests

2 participants