-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathactionengine.py
More file actions
51 lines (37 loc) · 1.79 KB
/
Copy pathactionengine.py
File metadata and controls
51 lines (37 loc) · 1.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# onvif/services/actionengine.py
from ..operator import ONVIFOperator
from ..utils import ONVIFWSDL, ONVIFService
class ActionEngine(ONVIFService):
def __init__(self, xaddr=None, **kwargs):
# References:
# - ONVIF Release 2.2 (September 2012) Release Notes
# - ActionEngineBinding (ver10/actionengine.wsdl)
# - Operations: https://developer.onvif.org/pub/specs/branches/development/wsdl/ver10/actionengine.wsdl
definition = ONVIFWSDL.get_definition("actionengine")
self.operator = ONVIFOperator(
definition["path"],
binding=f"{{{definition['namespace']}}}{definition['binding']}",
service_path="ActionEngine", # fallback
xaddr=xaddr,
**kwargs,
)
def GetServiceCapabilities(self):
return self.operator.call("GetServiceCapabilities")
def GetSupportedActions(self):
return self.operator.call("GetSupportedActions")
def GetActions(self):
return self.operator.call("GetActions")
def CreateActions(self, Action):
return self.operator.call("CreateActions", Action=Action)
def DeleteActions(self, Token):
return self.operator.call("DeleteActions", Token=Token)
def ModifyActions(self, Action):
return self.operator.call("ModifyActions", Action=Action)
def GetActionTriggers(self):
return self.operator.call("GetActionTriggers")
def CreateActionTriggers(self, ActionTrigger):
return self.operator.call("CreateActionTriggers", ActionTrigger=ActionTrigger)
def DeleteActionTriggers(self, Token):
return self.operator.call("DeleteActionTriggers", Token=Token)
def ModifyActionTriggers(self, ActionTrigger):
return self.operator.call("ModifyActionTriggers", ActionTrigger=ActionTrigger)