Hello
Under certain conditions, the status of individual attributes (variables) should be set to "BadNotReadable". This can be done with a custom IOManager. The problem is, however, that the client always has to update (manually) before the "BadNotReadable" status is displayed. The client works with subscriptions so the server would have to make notifications. This works with values of attributes but not with their status. Does anyone have any idea how the status on the server side can be notified so that the client updates automaticaly?
Thanks in advance, PUSHFD
Notify attribute status changes to client
Moderator: uasdknet
- Support Team
- Hero Member
- Posts: 3070
- Joined: 18 Mar 2011, 15:09
Re: Notify attribute status changes to client
Hello,
creating an own IOManager seems to be too laborious for this use case.
You can solve this issue by overriding the Read and Write Methods of the BaseNodeManager.
If NodeHandleType ExternalPushed is used for the variables, then you need to push Bad DataValue into each MonitoredItem if the values get Bad and push the Good ones if the values get goot again.
creating an own IOManager seems to be too laborious for this use case.
You can solve this issue by overriding the Read and Write Methods of the BaseNodeManager.
Code: Select all
bool m_dataSourceAvailable;
protected override DataValue Read(RequestContext context, NodeAttributeHandle nodeHandle, string indexRange, QualifiedName dataEncoding)
{
if (m_dataSourceAvailable || nodeHandle.AttributeId != Attributes.Value)
{
return base.Read(context, nodeHandle, indexRange, dataEncoding);
}
return new DataValue(StatusCodes.BadNoCommunication);
}
protected override StatusCode? Write(RequestContext context, NodeAttributeHandle nodeHandle, string indexRange, DataValue value)
{
if (m_dataSourceAvailable || nodeHandle.AttributeId != Attributes.Value)
{
return base.Write(context, nodeHandle, indexRange, value);
}
return StatusCodes.BadNoCommunication;
}
Best regards
Unified Automation Support Team
Unified Automation Support Team