-
Notifications
You must be signed in to change notification settings - Fork 0
/
uatcoveyor.py
56 lines (37 loc) · 1002 Bytes
/
uatcoveyor.py
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
52
53
54
55
56
#!/usr/bin/env python
"""
@file uacoveyortype.py
@author Jefferson Alves
@date 2018-03-02
@version 0.1
"""
import os
import sys
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), ".."))
from opcua import ua
from devices.uatdevice import uaTDevice
class uaTCoveyor(uaTDevice):
# metodos
mON = "on"
mOFF = "off"
OPC_TYPE = uaTDevice.COVEYOR
@staticmethod
def create(parent,idx,handle=None):
"""
Cria o tipo
"""
return uaTDevice.create_type(parent,idx,uaTCoveyor,handle)
@staticmethod
def create_property(obj_type,idx):
"""
Cria as propriedades
"""
return obj_type
@staticmethod
def create_methods(obj_type,idx,handle):
"""
Cria os metodos
"""
obj_type.add_method(idx, uaTCoveyor.mON, handle.on)
obj_type.add_method(idx, uaTCoveyor.mOFF, handle.off)
return obj_type