When calling Subscription.CreateMonitoredItems() in a client, I got this message for the results StatusCode: BadFilterNotAllowed.
I think my server is not OK.
What is the reason for this problem?
Thanks for answers.
kaippp
BadFilterNotAllowed
Moderator: uasdknet
- Support Team
- Hero Member
- Posts: 3072
- Joined: 18 Mar 2011, 15:09
Re: BadFilterNotAllowed
Hello,
If you are creating DataMonitoredItems, the most propable reason for this error code is that a DeadbandFilter is specified for a MonitoredItem although the DataType of the Variable to monitore is not a numeric DataType.
If your are creating EventMonitoredItems, the most propable reason is that the NodeClass of the specified node is neither Object nor View or EventNotifier attribute is not set to SubscribeToEvents.
Best regards
Support Team
If you are creating DataMonitoredItems, the most propable reason for this error code is that a DeadbandFilter is specified for a MonitoredItem although the DataType of the Variable to monitore is not a numeric DataType.
If your are creating EventMonitoredItems, the most propable reason is that the NodeClass of the specified node is neither Object nor View or EventNotifier attribute is not set to SubscribeToEvents.
Best regards
Support Team
-
- Jr. Member
- Posts: 4
- Joined: 22 May 2014, 17:20
Re: BadFilterNotAllowed
I was able to resolve the issue.
My client subscribes a node of a structure data type.
I used the following code to create a DataMonitoredItem:
DataMonitoredItem dmi = new DataMonitoredItem(new NodeId(nodeIdOfStructureVariable, mNameSpaceIndex))
{
DataChangeTrigger = DataChangeTrigger.StatusValueTimestamp // Causes BadFilterNotAllowed for a node of a structure data type
};
Setting the DataChangeTrigger property to DataChangeTrigger.StatusValueTimestamp
caused the BadFilterNotAllowed issue.
Omitting the line with DataChangeTrigger = ...
solved the problem.
My client subscribes a node of a structure data type.
I used the following code to create a DataMonitoredItem:
DataMonitoredItem dmi = new DataMonitoredItem(new NodeId(nodeIdOfStructureVariable, mNameSpaceIndex))
{
DataChangeTrigger = DataChangeTrigger.StatusValueTimestamp // Causes BadFilterNotAllowed for a node of a structure data type
};
Setting the DataChangeTrigger property to DataChangeTrigger.StatusValueTimestamp
caused the BadFilterNotAllowed issue.
Omitting the line with DataChangeTrigger = ...
solved the problem.