Public Member Functions | |
def | __init__ |
def | create_monitored_items |
def | deadband_monitor |
def | delete |
def | modify_monitored_item |
def | publish_callback |
def | subscribe_data_change |
def | subscribe_events |
def | unsubscribe |
Public Attributes | |
logger | |
parameters | |
server | |
subscription_id | |
Private Member Functions | |
def | _call_datachange |
def | _call_event |
def | _call_status |
def | _make_monitored_item_request |
def | _modify_monitored_item_request |
def | _subscribe |
Private Attributes | |
_client_handle | |
_handler | |
_lock | |
_monitoreditems_map |
Subscription object returned by Server or Client objects. The object represent a subscription to an opc-ua server. This is a high level class, especially subscribe_data_change and subscribe_events methods. If more control is necessary look at code and/or use create_monitored_items method.
Definition at line 70 of file subscription.py.
def opcua.common.subscription.Subscription.__init__ | ( | self, | |
server, | |||
params, | |||
handler | |||
) |
Definition at line 79 of file subscription.py.
def opcua.common.subscription.Subscription._call_datachange | ( | self, | |
datachange | |||
) | [private] |
Definition at line 124 of file subscription.py.
def opcua.common.subscription.Subscription._call_event | ( | self, | |
eventlist | |||
) | [private] |
Definition at line 146 of file subscription.py.
def opcua.common.subscription.Subscription._call_status | ( | self, | |
status | |||
) | [private] |
Definition at line 165 of file subscription.py.
def opcua.common.subscription.Subscription._make_monitored_item_request | ( | self, | |
node, | |||
attr, | |||
mfilter, | |||
queuesize | |||
) | [private] |
Definition at line 218 of file subscription.py.
def opcua.common.subscription.Subscription._modify_monitored_item_request | ( | self, | |
new_queuesize, | |||
new_samp_time, | |||
mod_filter | |||
) | [private] |
Definition at line 323 of file subscription.py.
def opcua.common.subscription.Subscription._subscribe | ( | self, | |
nodes, | |||
attr, | |||
mfilter = None , |
|||
queuesize = 0 |
|||
) | [private] |
Definition at line 199 of file subscription.py.
def opcua.common.subscription.Subscription.create_monitored_items | ( | self, | |
monitored_items | |||
) |
low level method to have full control over subscription parameters Client handle must be unique since it will be used as key for internal registration of data
Definition at line 238 of file subscription.py.
def opcua.common.subscription.Subscription.deadband_monitor | ( | self, | |
var, | |||
deadband_val, | |||
deadbandtype = 1 , |
|||
queuesize = 0 , |
|||
attr = ua.AttributeIds.Value |
|||
) |
Method to create a subscription with a Deadband Value. Default deadband value type is absolute. Return a handle which can be used to unsubscribe :param var: Variable to which you want to subscribe :param deadband_val: Absolute float value :param deadbandtype: Default value is 1 (absolute), change to 2 for percentage deadband :param queuesize: Wanted queue size, default is 1
Definition at line 332 of file subscription.py.
def opcua.common.subscription.Subscription.delete | ( | self | ) |
Delete subscription on server. This is automatically done by Client and Server classes on exit
Definition at line 97 of file subscription.py.
def opcua.common.subscription.Subscription.modify_monitored_item | ( | self, | |
handle, | |||
new_samp_time, | |||
new_queuesize = 0 , |
|||
mod_filter_val = -1 |
|||
) |
Modify a monitored item. :param handle: Handle returned when originally subscribing :param new_samp_time: New wanted sample time :param new_queuesize: New wanted queuesize, default is 0 :param mod_filter_val: New deadband filter value :return: Return a Modify Monitored Item Result
Definition at line 290 of file subscription.py.
def opcua.common.subscription.Subscription.publish_callback | ( | self, | |
publishresult | |||
) |
Definition at line 104 of file subscription.py.
def opcua.common.subscription.Subscription.subscribe_data_change | ( | self, | |
nodes, | |||
attr = ua.AttributeIds.Value |
|||
) |
Subscribe for data change events for a node or list of nodes. default attribute is Value. Return a handle which can be used to unsubscribe If more control is necessary use create_monitored_items method
Definition at line 171 of file subscription.py.
def opcua.common.subscription.Subscription.subscribe_events | ( | self, | |
sourcenode = ua.ObjectIds.Server , |
|||
evtypes = ua.ObjectIds.BaseEventType , |
|||
evfilter = None |
|||
) |
Subscribe to events from a node. Default node is Server node. In most servers the server node is the only one you can subscribe to. if evtypes is not provided, evtype defaults to BaseEventType if evtypes is a list or tuple of custom event types, the events will be filtered to the supplied types Return a handle which can be used to unsubscribe
Definition at line 180 of file subscription.py.
def opcua.common.subscription.Subscription.unsubscribe | ( | self, | |
handle | |||
) |
unsubscribe to datachange or events using the handle returned while subscribing if you delete subscription, you do not need to unsubscribe
Definition at line 274 of file subscription.py.
Definition at line 79 of file subscription.py.
Definition at line 79 of file subscription.py.
Definition at line 79 of file subscription.py.
Definition at line 79 of file subscription.py.
Definition at line 79 of file subscription.py.
Definition at line 79 of file subscription.py.
Definition at line 79 of file subscription.py.
Definition at line 79 of file subscription.py.