DLMS-SPODES 0.87.12__py3-none-any.whl → 0.87.15__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- DLMS_SPODES/Values/EN/__init__.py +1 -1
- DLMS_SPODES/Values/EN/actors.py +8 -8
- DLMS_SPODES/Values/EN/relation_to_obis_names.py +387 -387
- DLMS_SPODES/Values/RU/__init__.py +1 -1
- DLMS_SPODES/Values/RU/actors.py +8 -8
- DLMS_SPODES/Values/RU/relation_to_obis_names.py +396 -396
- DLMS_SPODES/__init__.py +6 -6
- DLMS_SPODES/configEN.ini +126 -126
- DLMS_SPODES/config_parser.py +53 -53
- DLMS_SPODES/cosem_interface_classes/__class_init__.py +3 -3
- DLMS_SPODES/cosem_interface_classes/__init__.py +1 -1
- DLMS_SPODES/cosem_interface_classes/a_parameter.py +20 -20
- DLMS_SPODES/cosem_interface_classes/activity_calendar.py +254 -254
- DLMS_SPODES/cosem_interface_classes/arbitrator.py +105 -105
- DLMS_SPODES/cosem_interface_classes/association_ln/abstract.py +34 -34
- DLMS_SPODES/cosem_interface_classes/association_ln/authentication_mechanism_name.py +25 -25
- DLMS_SPODES/cosem_interface_classes/association_ln/mechanism_id.py +25 -25
- DLMS_SPODES/cosem_interface_classes/association_ln/method.py +5 -5
- DLMS_SPODES/cosem_interface_classes/association_ln/ver0.py +485 -485
- DLMS_SPODES/cosem_interface_classes/association_ln/ver1.py +133 -133
- DLMS_SPODES/cosem_interface_classes/association_ln/ver2.py +36 -36
- DLMS_SPODES/cosem_interface_classes/association_ln/ver3.py +4 -4
- DLMS_SPODES/cosem_interface_classes/association_sn/ver0.py +12 -12
- DLMS_SPODES/cosem_interface_classes/attr_indexes.py +12 -12
- DLMS_SPODES/cosem_interface_classes/clock.py +131 -131
- DLMS_SPODES/cosem_interface_classes/collection.py +2122 -2122
- DLMS_SPODES/cosem_interface_classes/cosem_interface_class.py +583 -583
- DLMS_SPODES/cosem_interface_classes/data.py +21 -21
- DLMS_SPODES/cosem_interface_classes/demand_register/ver0.py +59 -59
- DLMS_SPODES/cosem_interface_classes/disconnect_control.py +74 -74
- DLMS_SPODES/cosem_interface_classes/extended_register.py +27 -27
- DLMS_SPODES/cosem_interface_classes/gprs_modem_setup.py +43 -43
- DLMS_SPODES/cosem_interface_classes/gsm_diagnostic/ver0.py +103 -103
- DLMS_SPODES/cosem_interface_classes/gsm_diagnostic/ver1.py +40 -40
- DLMS_SPODES/cosem_interface_classes/gsm_diagnostic/ver2.py +9 -9
- DLMS_SPODES/cosem_interface_classes/iec_hdlc_setup/ver0.py +11 -11
- DLMS_SPODES/cosem_interface_classes/iec_hdlc_setup/ver1.py +53 -53
- DLMS_SPODES/cosem_interface_classes/iec_local_port_setup.py +11 -11
- DLMS_SPODES/cosem_interface_classes/image_transfer/image_transfer_status.py +15 -15
- DLMS_SPODES/cosem_interface_classes/image_transfer/ver0.py +126 -126
- DLMS_SPODES/cosem_interface_classes/implementations/__init__.py +3 -3
- DLMS_SPODES/cosem_interface_classes/implementations/arbitrator.py +19 -19
- DLMS_SPODES/cosem_interface_classes/implementations/data.py +487 -487
- DLMS_SPODES/cosem_interface_classes/implementations/profile_generic.py +83 -83
- DLMS_SPODES/cosem_interface_classes/ipv4_setup.py +72 -72
- DLMS_SPODES/cosem_interface_classes/limiter.py +111 -111
- DLMS_SPODES/cosem_interface_classes/ln_pattern.py +333 -333
- DLMS_SPODES/cosem_interface_classes/modem_configuration/ver0.py +65 -65
- DLMS_SPODES/cosem_interface_classes/modem_configuration/ver1.py +39 -39
- DLMS_SPODES/cosem_interface_classes/ntp_setup/ver0.py +67 -67
- DLMS_SPODES/cosem_interface_classes/obis.py +23 -23
- DLMS_SPODES/cosem_interface_classes/overview.py +197 -197
- DLMS_SPODES/cosem_interface_classes/parameter.py +547 -547
- DLMS_SPODES/cosem_interface_classes/parameters.py +172 -172
- DLMS_SPODES/cosem_interface_classes/profile_generic/ver0.py +122 -122
- DLMS_SPODES/cosem_interface_classes/profile_generic/ver1.py +277 -277
- DLMS_SPODES/cosem_interface_classes/push_setup/ver0.py +12 -12
- DLMS_SPODES/cosem_interface_classes/push_setup/ver1.py +10 -10
- DLMS_SPODES/cosem_interface_classes/push_setup/ver2.py +166 -166
- DLMS_SPODES/cosem_interface_classes/register.py +45 -45
- DLMS_SPODES/cosem_interface_classes/register_activation/ver0.py +80 -80
- DLMS_SPODES/cosem_interface_classes/register_monitor.py +46 -46
- DLMS_SPODES/cosem_interface_classes/reports.py +70 -70
- DLMS_SPODES/cosem_interface_classes/schedule.py +176 -176
- DLMS_SPODES/cosem_interface_classes/script_table.py +87 -87
- DLMS_SPODES/cosem_interface_classes/security_setup/ver0.py +68 -68
- DLMS_SPODES/cosem_interface_classes/security_setup/ver1.py +158 -158
- DLMS_SPODES/cosem_interface_classes/single_action_schedule.py +50 -50
- DLMS_SPODES/cosem_interface_classes/special_days_table.py +84 -84
- DLMS_SPODES/cosem_interface_classes/tcp_udp_setup.py +42 -42
- DLMS_SPODES/cosem_pdu.py +93 -93
- DLMS_SPODES/enums.py +625 -625
- DLMS_SPODES/exceptions.py +106 -106
- DLMS_SPODES/firmwares.py +99 -99
- DLMS_SPODES/hdlc/frame.py +875 -875
- DLMS_SPODES/hdlc/sub_layer.py +54 -54
- DLMS_SPODES/literals.py +17 -17
- DLMS_SPODES/obis/__init__.py +1 -1
- DLMS_SPODES/obis/media_id.py +931 -931
- DLMS_SPODES/pardata.py +22 -22
- DLMS_SPODES/pdu_enums.py +98 -98
- DLMS_SPODES/relation_to_OBIS.py +465 -463
- DLMS_SPODES/settings.py +551 -551
- DLMS_SPODES/types/choices.py +142 -142
- DLMS_SPODES/types/common_data_types.py +2401 -2399
- DLMS_SPODES/types/cosem_service_types.py +109 -109
- DLMS_SPODES/types/implementations/arrays.py +25 -25
- DLMS_SPODES/types/implementations/bitstrings.py +97 -97
- DLMS_SPODES/types/implementations/double_long_usingneds.py +35 -35
- DLMS_SPODES/types/implementations/enums.py +57 -57
- DLMS_SPODES/types/implementations/integers.py +11 -11
- DLMS_SPODES/types/implementations/long_unsigneds.py +127 -127
- DLMS_SPODES/types/implementations/octet_string.py +11 -11
- DLMS_SPODES/types/implementations/structs.py +64 -64
- DLMS_SPODES/types/useful_types.py +677 -677
- {dlms_spodes-0.87.12.dist-info → dlms_spodes-0.87.15.dist-info}/METADATA +30 -30
- dlms_spodes-0.87.15.dist-info/RECORD +117 -0
- {dlms_spodes-0.87.12.dist-info → dlms_spodes-0.87.15.dist-info}/WHEEL +1 -1
- dlms_spodes-0.87.12.dist-info/RECORD +0 -117
- {dlms_spodes-0.87.12.dist-info → dlms_spodes-0.87.15.dist-info}/top_level.txt +0 -0
|
@@ -1,133 +1,133 @@
|
|
|
1
|
-
from . import ver0
|
|
2
|
-
from ...types import choices
|
|
3
|
-
from ... import exceptions as exc
|
|
4
|
-
from ..__class_init__ import *
|
|
5
|
-
from ...types.implementations import structs, arrays
|
|
6
|
-
from . import authentication_mechanism_name
|
|
7
|
-
from . import abstract
|
|
8
|
-
from ..overview import VERSION_1
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class AccessMode(abstract.AccessMode, elements=tuple(range(7))):
|
|
12
|
-
"""Version 0 extension"""
|
|
13
|
-
def is_writable(self) -> bool:
|
|
14
|
-
return True if int(self) in (2, 3, 5, 6) else False
|
|
15
|
-
|
|
16
|
-
def is_readable(self) -> bool:
|
|
17
|
-
return True if int(self) in (1, 3, 4, 6) else False
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
class AccessModeMeth(cdt.Enum, elements=(0, 1, 2)):
|
|
21
|
-
""" Enum of access mode for methods """
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
# TODO: make as subclass of ver0
|
|
25
|
-
class AttributeAccessItem(abstract.AttributeAccessItem):
|
|
26
|
-
""" Implemented attribute and it access . Use in Association LN """
|
|
27
|
-
attribute_id: cdt.Integer
|
|
28
|
-
access_mode: AccessMode
|
|
29
|
-
access_selectors: choices.access_selectors
|
|
30
|
-
|
|
31
|
-
def abstract_marker(self):
|
|
32
|
-
...
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
class AttributeAccessDescriptor(abstract.AttributeAccessDescriptor):
|
|
36
|
-
""" Array of attribute_access_item """
|
|
37
|
-
TYPE = AttributeAccessItem
|
|
38
|
-
|
|
39
|
-
def set_read_access(self, attribute_id: cdt.Integer):
|
|
40
|
-
it: AttributeAccessItem
|
|
41
|
-
for it in self:
|
|
42
|
-
if it.attribute_id == attribute_id:
|
|
43
|
-
it.access_mode.set(1)
|
|
44
|
-
break
|
|
45
|
-
else:
|
|
46
|
-
self.append(AttributeAccessItem((attribute_id, AccessMode.parse("1"), None)))
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
# TODO: make as subclass of ver0
|
|
50
|
-
class MethodAccessItem(cdt.Structure):
|
|
51
|
-
""" Implemented method and it access . Use in Association LN """
|
|
52
|
-
method_id: cdt.Integer
|
|
53
|
-
access_mode: AccessModeMeth
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
class MethodAccessDescriptor(cdt.Array):
|
|
57
|
-
""" Contain all implemented methods """
|
|
58
|
-
TYPE = MethodAccessItem
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
class AccessRight(cdt.Structure):
|
|
62
|
-
""" TODO: """
|
|
63
|
-
attribute_access: AttributeAccessDescriptor
|
|
64
|
-
method_access: MethodAccessDescriptor
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
class ObjectListElement(structs.ObjectListElement, access_rights=AccessRight):
|
|
68
|
-
""""""
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
class ObjectListType(ver0.ObjectListType):
|
|
72
|
-
TYPE = ObjectListElement
|
|
73
|
-
|
|
74
|
-
def is_writable(self, ln: cst.LogicalName, indexes: set[int]) -> bool:
|
|
75
|
-
""" index - DLMS object attribute index.
|
|
76
|
-
True: AccessRight is WriteOnly or ReadAndWrite """
|
|
77
|
-
el: ObjectListElement = next(filter(lambda it: it.logical_name == ln, self), None)
|
|
78
|
-
if el is None:
|
|
79
|
-
raise exc.NoObject(F"not find {ln} in object_list")
|
|
80
|
-
item: AttributeAccessItem
|
|
81
|
-
for index in indexes:
|
|
82
|
-
for item in el.access_rights.attribute_access:
|
|
83
|
-
if int(item.attribute_id) == index:
|
|
84
|
-
if int(item.access_mode) not in (2, 3, 5, 6):
|
|
85
|
-
return False
|
|
86
|
-
else:
|
|
87
|
-
break
|
|
88
|
-
else:
|
|
89
|
-
continue
|
|
90
|
-
else:
|
|
91
|
-
raise ValueError(F"not find in {ln} attribute index: {index}")
|
|
92
|
-
return True
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
class ContextNameType(cdt.AXDR, ver0.ApplicationContextName):
|
|
96
|
-
""" In the COSEM environment, it is intended that an application context pre-exists and is referenced by its name during the establishment of an
|
|
97
|
-
application association. This attribute contains the name of the application context for that association."""
|
|
98
|
-
DEFAULT = b'\x09\x07\x60\x85\x74\x05\x08\x01\x01'
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
class MechanismNameType(cdt.AXDR, authentication_mechanism_name.AuthenticationMechanismName):
|
|
102
|
-
""" In the COSEM environment, it is intended that an application context pre-exists and is referenced by its name during the establishment of an
|
|
103
|
-
application association. This attribute contains the name of the application context for that association."""
|
|
104
|
-
DEFAULT = b'\x09\x07\x60\x85\x74\x05\x08\x02\x00'
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
class AssociationLN(ver0.AssociationLN):
|
|
108
|
-
"""5.4.6 Association LN"""
|
|
109
|
-
VERSION = VERSION_1
|
|
110
|
-
A_ELEMENTS = (ic.ICAElement("object_list", ObjectListType, selective_access=ver0.SelectiveAccessDescriptor),
|
|
111
|
-
ver0.AssociationLN.get_attr_element(3), # associated_partners_id
|
|
112
|
-
ic.ICAElement("application_context_name", ContextNameType),
|
|
113
|
-
ver0.AssociationLN.get_attr_element(5), # xDLMS_context_info
|
|
114
|
-
ic.ICAElement("authentication_mechanism_name", MechanismNameType),
|
|
115
|
-
ic.ICAElement("secret", ver0.LLCSecret), # TODO: make new class Secret(LLC_Secret)
|
|
116
|
-
ver0.AssociationLN.get_attr_element(8), # association_status
|
|
117
|
-
ic.ICAElement("security_setup_reference", cst.LogicalName))
|
|
118
|
-
M_ELEMENTS = (ver0.AssociationLN.get_meth_element(1),
|
|
119
|
-
ver0.AssociationLN.get_meth_element(2),
|
|
120
|
-
ic.ICMElement("add_object", ObjectListElement),
|
|
121
|
-
ic.ICMElement("remove_object", ObjectListElement))
|
|
122
|
-
object_list: ObjectListType
|
|
123
|
-
application_context_name: ContextNameType
|
|
124
|
-
authentication_mechanism_name: MechanismNameType
|
|
125
|
-
security_setup_reference: cst.LogicalName
|
|
126
|
-
add_object: ObjectListElement
|
|
127
|
-
remove_object: ObjectListElement
|
|
128
|
-
|
|
129
|
-
def characteristics_init(self):
|
|
130
|
-
super(AssociationLN, self).characteristics_init()
|
|
131
|
-
# References a "Security setup" object by its logical name. The referenced object manages security for a given "Association LN" object
|
|
132
|
-
# instance.
|
|
133
|
-
self.set_attr(9, None)
|
|
1
|
+
from . import ver0
|
|
2
|
+
from ...types import choices
|
|
3
|
+
from ... import exceptions as exc
|
|
4
|
+
from ..__class_init__ import *
|
|
5
|
+
from ...types.implementations import structs, arrays
|
|
6
|
+
from . import authentication_mechanism_name
|
|
7
|
+
from . import abstract
|
|
8
|
+
from ..overview import VERSION_1
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class AccessMode(abstract.AccessMode, elements=tuple(range(7))):
|
|
12
|
+
"""Version 0 extension"""
|
|
13
|
+
def is_writable(self) -> bool:
|
|
14
|
+
return True if int(self) in (2, 3, 5, 6) else False
|
|
15
|
+
|
|
16
|
+
def is_readable(self) -> bool:
|
|
17
|
+
return True if int(self) in (1, 3, 4, 6) else False
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class AccessModeMeth(cdt.Enum, elements=(0, 1, 2)):
|
|
21
|
+
""" Enum of access mode for methods """
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
# TODO: make as subclass of ver0
|
|
25
|
+
class AttributeAccessItem(abstract.AttributeAccessItem):
|
|
26
|
+
""" Implemented attribute and it access . Use in Association LN """
|
|
27
|
+
attribute_id: cdt.Integer
|
|
28
|
+
access_mode: AccessMode
|
|
29
|
+
access_selectors: choices.access_selectors
|
|
30
|
+
|
|
31
|
+
def abstract_marker(self):
|
|
32
|
+
...
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class AttributeAccessDescriptor(abstract.AttributeAccessDescriptor):
|
|
36
|
+
""" Array of attribute_access_item """
|
|
37
|
+
TYPE = AttributeAccessItem
|
|
38
|
+
|
|
39
|
+
def set_read_access(self, attribute_id: cdt.Integer):
|
|
40
|
+
it: AttributeAccessItem
|
|
41
|
+
for it in self:
|
|
42
|
+
if it.attribute_id == attribute_id:
|
|
43
|
+
it.access_mode.set(1)
|
|
44
|
+
break
|
|
45
|
+
else:
|
|
46
|
+
self.append(AttributeAccessItem((attribute_id, AccessMode.parse("1"), None)))
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
# TODO: make as subclass of ver0
|
|
50
|
+
class MethodAccessItem(cdt.Structure):
|
|
51
|
+
""" Implemented method and it access . Use in Association LN """
|
|
52
|
+
method_id: cdt.Integer
|
|
53
|
+
access_mode: AccessModeMeth
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class MethodAccessDescriptor(cdt.Array):
|
|
57
|
+
""" Contain all implemented methods """
|
|
58
|
+
TYPE = MethodAccessItem
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
class AccessRight(cdt.Structure):
|
|
62
|
+
""" TODO: """
|
|
63
|
+
attribute_access: AttributeAccessDescriptor
|
|
64
|
+
method_access: MethodAccessDescriptor
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class ObjectListElement(structs.ObjectListElement, access_rights=AccessRight):
|
|
68
|
+
""""""
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
class ObjectListType(ver0.ObjectListType):
|
|
72
|
+
TYPE = ObjectListElement
|
|
73
|
+
|
|
74
|
+
def is_writable(self, ln: cst.LogicalName, indexes: set[int]) -> bool:
|
|
75
|
+
""" index - DLMS object attribute index.
|
|
76
|
+
True: AccessRight is WriteOnly or ReadAndWrite """
|
|
77
|
+
el: ObjectListElement = next(filter(lambda it: it.logical_name == ln, self), None)
|
|
78
|
+
if el is None:
|
|
79
|
+
raise exc.NoObject(F"not find {ln} in object_list")
|
|
80
|
+
item: AttributeAccessItem
|
|
81
|
+
for index in indexes:
|
|
82
|
+
for item in el.access_rights.attribute_access:
|
|
83
|
+
if int(item.attribute_id) == index:
|
|
84
|
+
if int(item.access_mode) not in (2, 3, 5, 6):
|
|
85
|
+
return False
|
|
86
|
+
else:
|
|
87
|
+
break
|
|
88
|
+
else:
|
|
89
|
+
continue
|
|
90
|
+
else:
|
|
91
|
+
raise ValueError(F"not find in {ln} attribute index: {index}")
|
|
92
|
+
return True
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class ContextNameType(cdt.AXDR, ver0.ApplicationContextName):
|
|
96
|
+
""" In the COSEM environment, it is intended that an application context pre-exists and is referenced by its name during the establishment of an
|
|
97
|
+
application association. This attribute contains the name of the application context for that association."""
|
|
98
|
+
DEFAULT = b'\x09\x07\x60\x85\x74\x05\x08\x01\x01'
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
class MechanismNameType(cdt.AXDR, authentication_mechanism_name.AuthenticationMechanismName):
|
|
102
|
+
""" In the COSEM environment, it is intended that an application context pre-exists and is referenced by its name during the establishment of an
|
|
103
|
+
application association. This attribute contains the name of the application context for that association."""
|
|
104
|
+
DEFAULT = b'\x09\x07\x60\x85\x74\x05\x08\x02\x00'
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
class AssociationLN(ver0.AssociationLN):
|
|
108
|
+
"""5.4.6 Association LN"""
|
|
109
|
+
VERSION = VERSION_1
|
|
110
|
+
A_ELEMENTS = (ic.ICAElement("object_list", ObjectListType, selective_access=ver0.SelectiveAccessDescriptor),
|
|
111
|
+
ver0.AssociationLN.get_attr_element(3), # associated_partners_id
|
|
112
|
+
ic.ICAElement("application_context_name", ContextNameType),
|
|
113
|
+
ver0.AssociationLN.get_attr_element(5), # xDLMS_context_info
|
|
114
|
+
ic.ICAElement("authentication_mechanism_name", MechanismNameType),
|
|
115
|
+
ic.ICAElement("secret", ver0.LLCSecret), # TODO: make new class Secret(LLC_Secret)
|
|
116
|
+
ver0.AssociationLN.get_attr_element(8), # association_status
|
|
117
|
+
ic.ICAElement("security_setup_reference", cst.LogicalName))
|
|
118
|
+
M_ELEMENTS = (ver0.AssociationLN.get_meth_element(1),
|
|
119
|
+
ver0.AssociationLN.get_meth_element(2),
|
|
120
|
+
ic.ICMElement("add_object", ObjectListElement),
|
|
121
|
+
ic.ICMElement("remove_object", ObjectListElement))
|
|
122
|
+
object_list: ObjectListType
|
|
123
|
+
application_context_name: ContextNameType
|
|
124
|
+
authentication_mechanism_name: MechanismNameType
|
|
125
|
+
security_setup_reference: cst.LogicalName
|
|
126
|
+
add_object: ObjectListElement
|
|
127
|
+
remove_object: ObjectListElement
|
|
128
|
+
|
|
129
|
+
def characteristics_init(self):
|
|
130
|
+
super(AssociationLN, self).characteristics_init()
|
|
131
|
+
# References a "Security setup" object by its logical name. The referenced object manages security for a given "Association LN" object
|
|
132
|
+
# instance.
|
|
133
|
+
self.set_attr(9, None)
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
from ..__class_init__ import *
|
|
2
|
-
from . import ver0, ver1
|
|
3
|
-
from ...types.implementations import structs, arrays
|
|
4
|
-
from ..overview import VERSION_2
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class AssociationLN(ver1.AssociationLN):
|
|
8
|
-
"""5.4.7 Association LN"""
|
|
9
|
-
VERSION = VERSION_2
|
|
10
|
-
A_ELEMENTS = (
|
|
11
|
-
ver1.AssociationLN.get_attr_element(2), # <object_list>
|
|
12
|
-
ver0.AssociationLN.get_attr_element(3), # associated_partners_id
|
|
13
|
-
ver0.AssociationLN.get_attr_element(4), # application_context_name
|
|
14
|
-
ver0.AssociationLN.get_attr_element(5), # xDLMS_context_info
|
|
15
|
-
ver0.AssociationLN.get_attr_element(6), # authentication_mechanism_name
|
|
16
|
-
ver1.AssociationLN.get_attr_element(7), # secret
|
|
17
|
-
ver0.AssociationLN.get_attr_element(8), # association_status
|
|
18
|
-
ver1.AssociationLN.get_attr_element(9), # security_setup_reference
|
|
19
|
-
ic.ICAElement("user_list", arrays.UserList),
|
|
20
|
-
ic.ICAElement("current_user", structs.UserListEntry),
|
|
21
|
-
)
|
|
22
|
-
M_ELEMENTS = (
|
|
23
|
-
ver0.AssociationLN.get_meth_element(1),
|
|
24
|
-
ver0.AssociationLN.get_meth_element(2),
|
|
25
|
-
ver1.AssociationLN.get_meth_element(3), # add_object
|
|
26
|
-
ver1.AssociationLN.get_meth_element(4), # remove_object
|
|
27
|
-
ic.ICMElement("add_user", structs.UserListEntry),
|
|
28
|
-
ic.ICMElement("remove_user", structs.UserListEntry),
|
|
29
|
-
)
|
|
30
|
-
user_list: arrays.UserList
|
|
31
|
-
current_user: structs.UserListEntry
|
|
32
|
-
|
|
33
|
-
def characteristics_init(self):
|
|
34
|
-
super(AssociationLN, self).characteristics_init()
|
|
35
|
-
# TODO: more 2 attribute
|
|
36
|
-
# TODO: more 2 methods
|
|
1
|
+
from ..__class_init__ import *
|
|
2
|
+
from . import ver0, ver1
|
|
3
|
+
from ...types.implementations import structs, arrays
|
|
4
|
+
from ..overview import VERSION_2
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class AssociationLN(ver1.AssociationLN):
|
|
8
|
+
"""5.4.7 Association LN"""
|
|
9
|
+
VERSION = VERSION_2
|
|
10
|
+
A_ELEMENTS = (
|
|
11
|
+
ver1.AssociationLN.get_attr_element(2), # <object_list>
|
|
12
|
+
ver0.AssociationLN.get_attr_element(3), # associated_partners_id
|
|
13
|
+
ver0.AssociationLN.get_attr_element(4), # application_context_name
|
|
14
|
+
ver0.AssociationLN.get_attr_element(5), # xDLMS_context_info
|
|
15
|
+
ver0.AssociationLN.get_attr_element(6), # authentication_mechanism_name
|
|
16
|
+
ver1.AssociationLN.get_attr_element(7), # secret
|
|
17
|
+
ver0.AssociationLN.get_attr_element(8), # association_status
|
|
18
|
+
ver1.AssociationLN.get_attr_element(9), # security_setup_reference
|
|
19
|
+
ic.ICAElement("user_list", arrays.UserList),
|
|
20
|
+
ic.ICAElement("current_user", structs.UserListEntry),
|
|
21
|
+
)
|
|
22
|
+
M_ELEMENTS = (
|
|
23
|
+
ver0.AssociationLN.get_meth_element(1),
|
|
24
|
+
ver0.AssociationLN.get_meth_element(2),
|
|
25
|
+
ver1.AssociationLN.get_meth_element(3), # add_object
|
|
26
|
+
ver1.AssociationLN.get_meth_element(4), # remove_object
|
|
27
|
+
ic.ICMElement("add_user", structs.UserListEntry),
|
|
28
|
+
ic.ICMElement("remove_user", structs.UserListEntry),
|
|
29
|
+
)
|
|
30
|
+
user_list: arrays.UserList
|
|
31
|
+
current_user: structs.UserListEntry
|
|
32
|
+
|
|
33
|
+
def characteristics_init(self):
|
|
34
|
+
super(AssociationLN, self).characteristics_init()
|
|
35
|
+
# TODO: more 2 attribute
|
|
36
|
+
# TODO: more 2 methods
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
class AssociationLN:
|
|
2
|
-
def __init__(self):
|
|
3
|
-
raise ValueError(F"version: {__name__[-1]} of {self.__class__.__name__} not support framework")
|
|
4
|
-
|
|
1
|
+
class AssociationLN:
|
|
2
|
+
def __init__(self):
|
|
3
|
+
raise ValueError(F"version: {__name__[-1]} of {self.__class__.__name__} not support framework")
|
|
4
|
+
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
from ..__class_init__ import *
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class AssociationSN(ic.COSEMInterfaceClasses):
|
|
5
|
-
"""dummy class"""
|
|
6
|
-
CLASS_ID = ClassID.ASSOCIATION_SN
|
|
7
|
-
|
|
8
|
-
def __new__(cls, *args, **kwargs):
|
|
9
|
-
raise ValueError(F"version: {__name__[-1]} of {cls.__class__.__name__} not support framework")
|
|
10
|
-
|
|
11
|
-
def characteristics_init(self):
|
|
12
|
-
""" initiate all attributes and methods of class """
|
|
1
|
+
from ..__class_init__ import *
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class AssociationSN(ic.COSEMInterfaceClasses):
|
|
5
|
+
"""dummy class"""
|
|
6
|
+
CLASS_ID = ClassID.ASSOCIATION_SN
|
|
7
|
+
|
|
8
|
+
def __new__(cls, *args, **kwargs):
|
|
9
|
+
raise ValueError(F"version: {__name__[-1]} of {cls.__class__.__name__} not support framework")
|
|
10
|
+
|
|
11
|
+
def characteristics_init(self):
|
|
12
|
+
""" initiate all attributes and methods of class """
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
""" Keep all attributes indexes"""
|
|
2
|
-
# activity calendar
|
|
3
|
-
CALENDAR_NAME_ACTIVE = 2
|
|
4
|
-
SEASON_PROFILE_ACTIVE = 3
|
|
5
|
-
WEEK_PROFILE_TABLE_ACTIVE = 4
|
|
6
|
-
DAY_PROFILE_TABLE_ACTIVE = 5
|
|
7
|
-
CALENDAR_NAME_PASSIVE = 6
|
|
8
|
-
SEASON_PROFILE_PASSIVE = 7
|
|
9
|
-
WEEK_PROFILE_TABLE_PASSIVE = 8
|
|
10
|
-
DAY_PROFILE_TABLE_PASSIVE = 9
|
|
11
|
-
ACTIVATE_PASSIVE_CALENDAR_TIME = 10
|
|
12
|
-
|
|
1
|
+
""" Keep all attributes indexes"""
|
|
2
|
+
# activity calendar
|
|
3
|
+
CALENDAR_NAME_ACTIVE = 2
|
|
4
|
+
SEASON_PROFILE_ACTIVE = 3
|
|
5
|
+
WEEK_PROFILE_TABLE_ACTIVE = 4
|
|
6
|
+
DAY_PROFILE_TABLE_ACTIVE = 5
|
|
7
|
+
CALENDAR_NAME_PASSIVE = 6
|
|
8
|
+
SEASON_PROFILE_PASSIVE = 7
|
|
9
|
+
WEEK_PROFILE_TABLE_PASSIVE = 8
|
|
10
|
+
DAY_PROFILE_TABLE_PASSIVE = 9
|
|
11
|
+
ACTIVATE_PASSIVE_CALENDAR_TIME = 10
|
|
12
|
+
|