CVBpy 14.0
Subscription Class Reference

Offers a callback mechanism on OPCUA variables. More...

Inherits object.

Public Member Functions

cvb.EventCookie add_monitored_item (self, cvb.opcua.VariableNode node, Callable[[], None] callback)
 Adds an monitored item to the subscription. More...
 
None delete_monitored_item (self, cvb.EventCookie event_cookie)
 Remove a monitored item from the subscription. More...
 

Detailed Description

Offers a callback mechanism on OPCUA variables.

It serves to monitor OPCUA variables and provides a callback mechanism for changes on the item to be monitored.

Member Function Documentation

◆ add_monitored_item()

cvb.EventCookie add_monitored_item (   self,
cvb.opcua.VariableNode  node,
Callable[[], None]  callback 
)

Adds an monitored item to the subscription.

This method is specialized to monitor the value of OPCUA variables.

Parameters

node : cvb.opcua.VariableNode Item to be monitored.

callback : Callable[[], None] Callback to execute.

Returns

cvb.EventCookie Event cookie to manually unregister the registered callback.

◆ delete_monitored_item()

None delete_monitored_item (   self,
cvb.EventCookie  event_cookie 
)

Remove a monitored item from the subscription.

Parameters

event_cookie : cvb.EventCookie Event cookie of the monitored item to be removed.