In my opinion there is a lack of clarity in the comments to the IOPCItemMgt::SetActiveState Method in the OPC Data Access Custom Interface Specification 2.05.
The comments says: …Activating items will generally result in an IAdvise callback at the next UpdateRate period.
For me it is not 100% clear what ‘Activating items’ means. Does it imply that the present state is ‘deactivated’ and only a rising edge from ‘deactivated’ to ‘activated’ state results in an IAdvise callback (what is my assumption) or has the IAdvice callback be performed independent on the present state, means every time the item is set to ‘activated’ regardless of the present state.
I’m asking since we currently trying to analyse and solve an issue with an OPC client which calls the IOPCItemMgt::SetActiveState method to activate items which are already activated but the server doesn’t update the item values via IAdvise callback. The server only calls IAdvice when it detects a state change from ‘deactivated’ to ‘activated’.
Can anybody help to clarify?
Servers often need to allocate resources before they can monitor the source of an item. Setting Active = FALSE tells the server that it can release those resources without deleting the item. No subsequent updates will be reported.
Setting Active = TRUE tells the server to allocate those resources and report every change.