DLMS-SPODES 0.87.16__py3-none-any.whl → 0.88.1__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/Overview/__init__.py +0 -0
- DLMS_SPODES/cosem_interface_classes/Overview/class_id.py +107 -0
- DLMS_SPODES/cosem_interface_classes/__class_init__.py +3 -3
- DLMS_SPODES/cosem_interface_classes/__init__.py +3 -2
- DLMS_SPODES/cosem_interface_classes/activity_calendar.py +210 -254
- DLMS_SPODES/cosem_interface_classes/arbitrator.py +78 -105
- DLMS_SPODES/cosem_interface_classes/association_ln/abstract.py +50 -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 +440 -485
- DLMS_SPODES/cosem_interface_classes/association_ln/ver1.py +126 -133
- DLMS_SPODES/cosem_interface_classes/association_ln/ver2.py +30 -36
- DLMS_SPODES/cosem_interface_classes/association_ln/ver3.py +3 -4
- DLMS_SPODES/cosem_interface_classes/association_sn/ver0.py +14 -12
- DLMS_SPODES/cosem_interface_classes/clock.py +81 -131
- DLMS_SPODES/cosem_interface_classes/collection.py +2106 -2122
- DLMS_SPODES/cosem_interface_classes/cosem_interface_class.py +525 -583
- DLMS_SPODES/cosem_interface_classes/data.py +12 -21
- DLMS_SPODES/cosem_interface_classes/demand_register/ver0.py +32 -59
- DLMS_SPODES/cosem_interface_classes/disconnect_control.py +56 -74
- DLMS_SPODES/cosem_interface_classes/extended_register.py +18 -27
- DLMS_SPODES/cosem_interface_classes/gprs_modem_setup.py +33 -43
- DLMS_SPODES/cosem_interface_classes/gsm_diagnostic/ver0.py +78 -103
- DLMS_SPODES/cosem_interface_classes/gsm_diagnostic/ver1.py +42 -40
- DLMS_SPODES/cosem_interface_classes/gsm_diagnostic/ver2.py +6 -9
- DLMS_SPODES/cosem_interface_classes/iec_hdlc_setup/ver0.py +11 -11
- DLMS_SPODES/cosem_interface_classes/iec_hdlc_setup/ver1.py +27 -53
- DLMS_SPODES/cosem_interface_classes/iec_local_port_setup.py +9 -11
- DLMS_SPODES/cosem_interface_classes/image_transfer/image_transfer_status.py +15 -15
- DLMS_SPODES/cosem_interface_classes/image_transfer/ver0.py +54 -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 +491 -487
- DLMS_SPODES/cosem_interface_classes/implementations/profile_generic.py +85 -83
- DLMS_SPODES/cosem_interface_classes/ipv4_setup.py +42 -72
- DLMS_SPODES/cosem_interface_classes/limiter.py +77 -111
- DLMS_SPODES/cosem_interface_classes/ln_pattern.py +334 -333
- DLMS_SPODES/cosem_interface_classes/modem_configuration/ver0.py +51 -65
- DLMS_SPODES/cosem_interface_classes/modem_configuration/ver1.py +27 -39
- DLMS_SPODES/cosem_interface_classes/ntp_setup/ver0.py +48 -67
- DLMS_SPODES/cosem_interface_classes/obis.py +28 -23
- DLMS_SPODES/cosem_interface_classes/overview.py +198 -197
- DLMS_SPODES/cosem_interface_classes/parameter.py +548 -547
- DLMS_SPODES/cosem_interface_classes/parameters.py +172 -172
- DLMS_SPODES/cosem_interface_classes/profile_generic/ver0.py +90 -122
- DLMS_SPODES/cosem_interface_classes/profile_generic/ver1.py +268 -277
- DLMS_SPODES/cosem_interface_classes/push_setup/ver0.py +13 -12
- DLMS_SPODES/cosem_interface_classes/push_setup/ver1.py +9 -10
- DLMS_SPODES/cosem_interface_classes/push_setup/ver2.py +124 -166
- DLMS_SPODES/cosem_interface_classes/register.py +18 -45
- DLMS_SPODES/cosem_interface_classes/register_activation/ver0.py +45 -80
- DLMS_SPODES/cosem_interface_classes/register_monitor.py +33 -46
- DLMS_SPODES/cosem_interface_classes/reports.py +72 -70
- DLMS_SPODES/cosem_interface_classes/schedule.py +88 -176
- DLMS_SPODES/cosem_interface_classes/script_table.py +54 -87
- DLMS_SPODES/cosem_interface_classes/security_setup/ver0.py +45 -68
- DLMS_SPODES/cosem_interface_classes/security_setup/ver1.py +122 -158
- DLMS_SPODES/cosem_interface_classes/single_action_schedule.py +34 -50
- DLMS_SPODES/cosem_interface_classes/special_days_table.py +54 -84
- DLMS_SPODES/cosem_interface_classes/tcp_udp_setup.py +20 -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 +463 -465
- DLMS_SPODES/settings.py +551 -551
- DLMS_SPODES/types/choices.py +140 -142
- DLMS_SPODES/types/common_data_types.py +2379 -2401
- 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 +12 -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/type_alias.py +74 -0
- DLMS_SPODES/types/useful_types.py +627 -677
- {dlms_spodes-0.87.16.dist-info → dlms_spodes-0.88.1.dist-info}/METADATA +30 -30
- dlms_spodes-0.88.1.dist-info/RECORD +118 -0
- {dlms_spodes-0.87.16.dist-info → dlms_spodes-0.88.1.dist-info}/WHEEL +1 -1
- DLMS_SPODES/cosem_interface_classes/a_parameter.py +0 -20
- DLMS_SPODES/cosem_interface_classes/attr_indexes.py +0 -12
- dlms_spodes-0.87.16.dist-info/RECORD +0 -117
- {dlms_spodes-0.87.16.dist-info → dlms_spodes-0.88.1.dist-info}/top_level.txt +0 -0
|
@@ -1,166 +1,124 @@
|
|
|
1
|
-
from
|
|
2
|
-
from ...types
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
class
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
class
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
def randomisation_start_interval(self) -> cdt.LongUnsigned:
|
|
126
|
-
return self.get_attr(5)
|
|
127
|
-
|
|
128
|
-
@property
|
|
129
|
-
def number_of_retries(self) -> cdt.Unsigned:
|
|
130
|
-
return self.get_attr(6)
|
|
131
|
-
|
|
132
|
-
@property
|
|
133
|
-
def repetition_delay(self) -> RepetitionDelay:
|
|
134
|
-
return self.get_attr(7)
|
|
135
|
-
|
|
136
|
-
@property
|
|
137
|
-
def port_reference(self) -> cst.LogicalName:
|
|
138
|
-
return self.get_attr(8)
|
|
139
|
-
|
|
140
|
-
@property
|
|
141
|
-
def push_client_SAP(self) -> cdt.Integer:
|
|
142
|
-
return self.get_attr(9)
|
|
143
|
-
|
|
144
|
-
@property
|
|
145
|
-
def push_protection_parameters(self) -> PushProtectionParameters:
|
|
146
|
-
return self.get_attr(10)
|
|
147
|
-
|
|
148
|
-
@property
|
|
149
|
-
def push_operation_method(self) -> PushOperationMethod:
|
|
150
|
-
return self.get_attr(11)
|
|
151
|
-
|
|
152
|
-
@property
|
|
153
|
-
def confirmation_parameters(self) -> ConfirmationParameters:
|
|
154
|
-
return self.get_attr(12)
|
|
155
|
-
|
|
156
|
-
@property
|
|
157
|
-
def last_confirmation_date_time(self) -> cdt.DateTime:
|
|
158
|
-
return self.get_attr(13)
|
|
159
|
-
|
|
160
|
-
@property
|
|
161
|
-
def push(self) -> integers.Only0:
|
|
162
|
-
return self.get_meth(1)
|
|
163
|
-
|
|
164
|
-
@property
|
|
165
|
-
def reset(self) -> integers.Only0:
|
|
166
|
-
return self.get_meth(2)
|
|
1
|
+
from typing import Optional
|
|
2
|
+
from ...types import cdt, cst
|
|
3
|
+
from ...types.implementations import structs, enums, integers
|
|
4
|
+
from itertools import chain
|
|
5
|
+
from ...types import choices
|
|
6
|
+
from ..cosem_interface_class import ICAElement, ICMElement, Classifier, ICAuto
|
|
7
|
+
from ..Overview import class_id
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class RestrictionElement(choices.StructureMixin, cdt.Structure):
|
|
11
|
+
"""restriction_element"""
|
|
12
|
+
restriction_type: enums.RestrictionType
|
|
13
|
+
restriction_value: choices.restriction_value
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
class ColumnElement(cdt.Array):
|
|
17
|
+
"""column_element"""
|
|
18
|
+
TYPE = structs.CaptureObjectDefinition
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class PushObjectDefinition(cdt.Structure):
|
|
22
|
+
"""push_object_definition"""
|
|
23
|
+
class_id: cdt.LongUnsigned
|
|
24
|
+
logical_name: cst.LogicalName
|
|
25
|
+
attribute_index: cdt.Integer
|
|
26
|
+
data_index: cdt.LongUnsigned
|
|
27
|
+
restriction: RestrictionElement
|
|
28
|
+
column: ColumnElement
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class PushObjectList(cdt.Array):
|
|
32
|
+
"""push_object_list attribute"""
|
|
33
|
+
TYPE = PushObjectDefinition
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class TransportServiceType(cdt.Enum, elements=tuple(chain(range(9), range(200, 256)))): # TODO: elements 200.. is manufacturer specific
|
|
37
|
+
"""transport_service_type"""
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class MessageType(cdt.Enum, elements=tuple(chain((0, 1), range(128, 256)))): # TODO: elements 128.. is manufacturer specific
|
|
41
|
+
"""message_type"""
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class SendDestinationAndMethod(cdt.Structure):
|
|
45
|
+
"""send_destination_and_method"""
|
|
46
|
+
transport_service: TransportServiceType
|
|
47
|
+
destination: cdt.OctetString
|
|
48
|
+
message: MessageType
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class CommunicationWindow(cdt.Array):
|
|
52
|
+
"""communication_window attribute"""
|
|
53
|
+
TYPE = structs.WindowElement
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
class RepetitionDelay(cdt.Structure):
|
|
57
|
+
"""repetition_delay"""
|
|
58
|
+
repetition_delay_min: cdt.LongUnsigned
|
|
59
|
+
repetition_delay_exponent: cdt.LongUnsigned
|
|
60
|
+
repetition_delay_max: cdt.LongUnsigned
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
class PushOperationMethod(cdt.Enum, elements=(0, 1, 2)):
|
|
64
|
+
""""""
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class ConfirmationParameters(cdt.Structure):
|
|
68
|
+
confirmation_start_date: cdt.DateTime
|
|
69
|
+
confirmation_interval: cdt.DoubleLongUnsigned
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class KeyInfoElement(choices.StructureMixin, cdt.Structure):
|
|
73
|
+
"""Override several methods of cdt.Structure. It limited Structure."""
|
|
74
|
+
key_info_type: enums.KeyInfoType
|
|
75
|
+
key_info_options: choices.KeyInfoOptions
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
class ProtectionOptions(cdt.Structure):
|
|
79
|
+
transaction_id: cdt.OctetString
|
|
80
|
+
originator_system_title: cdt.OctetString
|
|
81
|
+
recipient_system_title: cdt.OctetString
|
|
82
|
+
other_information: cdt.OctetString
|
|
83
|
+
key_info: KeyInfoElement
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class ProtectionParametersElement(cdt.Structure):
|
|
87
|
+
protection_type: enums.ProtectionType
|
|
88
|
+
protection_options: ProtectionOptions
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class PushProtectionParameters(cdt.Array):
|
|
92
|
+
TYPE = ProtectionParametersElement
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
class PushSetup(ICAuto):
|
|
96
|
+
"""4.4.8.2 Push setup"""
|
|
97
|
+
CLASS_ID = class_id.PUSH_SETUP
|
|
98
|
+
VERSION = 2
|
|
99
|
+
A_ELEMENTS = (ICAElement(2, "push_object_list", PushObjectList),
|
|
100
|
+
ICAElement(3, "send_destination_and_method", SendDestinationAndMethod),
|
|
101
|
+
ICAElement(4, "communication_window", CommunicationWindow),
|
|
102
|
+
ICAElement(5, "randomisation_start_interval", cdt.LongUnsigned),
|
|
103
|
+
ICAElement(6, "number_of_retries", cdt.Unsigned),
|
|
104
|
+
ICAElement(7, "repetition_delay", RepetitionDelay),
|
|
105
|
+
ICAElement(8, "port_reference", cst.LogicalName),
|
|
106
|
+
ICAElement(9, "push_client_sap", cdt.Integer),
|
|
107
|
+
ICAElement(10, "push_protection_parameters", PushProtectionParameters),
|
|
108
|
+
ICAElement(11, "push_operation_method", PushOperationMethod),
|
|
109
|
+
ICAElement(12, "confirmation_parameters", ConfirmationParameters),
|
|
110
|
+
ICAElement(13, "last_confirmation_date_time", cdt.DateTime, classifier=Classifier.DYNAMIC))
|
|
111
|
+
M_ELEMENTS = (ICMElement(1, "push", integers.Only0),
|
|
112
|
+
ICMElement(2, "reset", integers.Only0))
|
|
113
|
+
push_object_list: Optional[PushObjectList]
|
|
114
|
+
send_destination_and_method: Optional[SendDestinationAndMethod]
|
|
115
|
+
communication_window: Optional[CommunicationWindow]
|
|
116
|
+
randomisation_start_interval: Optional[cdt.LongUnsigned]
|
|
117
|
+
number_of_retries: Optional[cdt.Unsigned]
|
|
118
|
+
repetition_delay: Optional[RepetitionDelay]
|
|
119
|
+
port_reference: Optional[cst.LogicalName]
|
|
120
|
+
push_client_SAP: Optional[cdt.Integer]
|
|
121
|
+
push_protection_parameters: Optional[PushProtectionParameters]
|
|
122
|
+
push_operation_method: Optional[PushOperationMethod]
|
|
123
|
+
confirmation_parameters: Optional[ConfirmationParameters]
|
|
124
|
+
last_confirmation_date_time: Optional[cdt.DateTime]
|
|
@@ -1,45 +1,18 @@
|
|
|
1
|
-
from .
|
|
2
|
-
from
|
|
3
|
-
from ..types
|
|
4
|
-
from .
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
def characteristics_init(self):
|
|
21
|
-
self._cbs_attr_post_init.update({2: self.__set_value_data_type})
|
|
22
|
-
|
|
23
|
-
self.scaler_unit_not_settable = False
|
|
24
|
-
""" usability scaler unit flag. if True then it not used"""
|
|
25
|
-
|
|
26
|
-
@property
|
|
27
|
-
def value(self) -> choices.RegisterValues:
|
|
28
|
-
return self.get_attr(2)
|
|
29
|
-
|
|
30
|
-
@property
|
|
31
|
-
def scaler_unit(self) -> cdt.ScalUnitType:
|
|
32
|
-
return self.get_attr(3)
|
|
33
|
-
|
|
34
|
-
@property
|
|
35
|
-
def reset(self) -> integers.Only0:
|
|
36
|
-
return self.get_meth(1)
|
|
37
|
-
|
|
38
|
-
def __set_value_data_type(self):
|
|
39
|
-
""" When instead of a “Data” object a “Register” object is used, (with the scaler_unit attribute not used or with scaler = 0, unit = 255) then the data types allowed for
|
|
40
|
-
the value attribute of the “Data” interface class are allowed. """
|
|
41
|
-
match self.value:
|
|
42
|
-
case cdt.Array() | cdt.CompactArray() | cdt.Structure():
|
|
43
|
-
self.set_attr(3, cdt.ScalUnitType(b'\x02\x02\x0f\x00\x16\xff'))
|
|
44
|
-
case _:
|
|
45
|
-
""" nothing do it """
|
|
1
|
+
from ..types.implementations import integers
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from ..types import choices, cdt
|
|
4
|
+
from .cosem_interface_class import ICAuto, ICAElement, ICMElement, Classifier, Cardinality
|
|
5
|
+
from .Overview import class_id
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Register(ICAuto):
|
|
9
|
+
"""4.3.2 Register"""
|
|
10
|
+
CLASS_ID = class_id.REGISTER
|
|
11
|
+
VERSION = 0
|
|
12
|
+
CARDINALITY = Cardinality()
|
|
13
|
+
A_ELEMENTS = (
|
|
14
|
+
ICAElement(2, "value", choices.register, classifier=Classifier.NOT_SPECIFIC),
|
|
15
|
+
ICAElement(3, "scaler_unit", cdt.ScalUnitType))
|
|
16
|
+
M_ELEMENTS = ICMElement(1, "reset", integers.Only0),
|
|
17
|
+
value: Optional[choices.RegisterValues]
|
|
18
|
+
scaler_unit: Optional[cdt.ScalUnitType]
|
|
@@ -1,80 +1,45 @@
|
|
|
1
|
-
from ..
|
|
2
|
-
from ...types import cst
|
|
3
|
-
from ...types.implementations import long_unsigneds
|
|
4
|
-
from
|
|
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
|
-
NAME="add_register",
|
|
47
|
-
DATA_TYPE=ObjectDefinition),
|
|
48
|
-
ic.ICMElement(
|
|
49
|
-
NAME="add_mask",
|
|
50
|
-
DATA_TYPE=RegisterActMask),
|
|
51
|
-
ic.ICMElement(
|
|
52
|
-
NAME="delete_mask",
|
|
53
|
-
DATA_TYPE=cdt.OctetString))
|
|
54
|
-
|
|
55
|
-
def characteristics_init(self):
|
|
56
|
-
"""nothing do"""
|
|
57
|
-
|
|
58
|
-
@property
|
|
59
|
-
def register_assignment(self) -> RegisterAssignment:
|
|
60
|
-
return self.get_attr(2)
|
|
61
|
-
|
|
62
|
-
@property
|
|
63
|
-
def mask_list(self) -> MaskList:
|
|
64
|
-
return self.get_attr(3)
|
|
65
|
-
|
|
66
|
-
@property
|
|
67
|
-
def active_mask(self) -> cdt.OctetString:
|
|
68
|
-
return self.get_attr(4)
|
|
69
|
-
|
|
70
|
-
@property
|
|
71
|
-
def add_register(self) -> ObjectDefinition:
|
|
72
|
-
return self.get_meth(1)
|
|
73
|
-
|
|
74
|
-
@property
|
|
75
|
-
def add_mask(self) -> RegisterActMask:
|
|
76
|
-
return self.get_meth(2)
|
|
77
|
-
|
|
78
|
-
@property
|
|
79
|
-
def delete_mask(self) -> cdt.OctetString:
|
|
80
|
-
return self.get_meth(3)
|
|
1
|
+
from ..cosem_interface_class import ICAuto, ICAElement, ICMElement
|
|
2
|
+
from ...types import cst
|
|
3
|
+
from ...types.implementations import long_unsigneds
|
|
4
|
+
from typing import Optional
|
|
5
|
+
from ...types import cdt
|
|
6
|
+
from ..Overview import class_id
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class ObjectDefinition(cdt.Structure):
|
|
10
|
+
class_id: long_unsigneds.ClassId
|
|
11
|
+
logical_name: cst.LogicalName
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class RegisterAssignment(cdt.Array):
|
|
15
|
+
TYPE = ObjectDefinition
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class IndexArray(cdt.Array):
|
|
19
|
+
TYPE = cdt.Unsigned
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class RegisterActMask(cdt.Structure):
|
|
23
|
+
mask_name: cdt.OctetString
|
|
24
|
+
index_list: IndexArray
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class MaskList(cdt.Array):
|
|
28
|
+
TYPE = RegisterActMask
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class RegisterActivation(ICAuto):
|
|
32
|
+
"""4.3.5 Register activation"""
|
|
33
|
+
CLASS_ID = class_id.REGISTER_ACTIVATION
|
|
34
|
+
VERSION = 0
|
|
35
|
+
A_ELEMENTS = (
|
|
36
|
+
ICAElement(2, "register_assignment", RegisterAssignment),
|
|
37
|
+
ICAElement(3, "mask_list", MaskList),
|
|
38
|
+
ICAElement(4, "active_mask", cdt.OctetString))
|
|
39
|
+
M_ELEMENTS = (
|
|
40
|
+
ICMElement(1, "add_register", ObjectDefinition),
|
|
41
|
+
ICMElement(2, "add_mask", RegisterActMask),
|
|
42
|
+
ICMElement(3, "delete_mask", cdt.OctetString))
|
|
43
|
+
register_assignment: Optional[RegisterAssignment]
|
|
44
|
+
mask_list: Optional[MaskList]
|
|
45
|
+
active_mask: Optional[cdt.OctetString]
|
|
@@ -1,46 +1,33 @@
|
|
|
1
|
-
from .
|
|
2
|
-
from
|
|
3
|
-
from ..types
|
|
4
|
-
from .
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class Thresholds(cdt.Array):
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
TYPE = ActionSet
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class RegisterMonitor(
|
|
25
|
-
"""
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
...
|
|
35
|
-
|
|
36
|
-
@property
|
|
37
|
-
def thresholds(self) -> Thresholds:
|
|
38
|
-
return self.get_attr(2)
|
|
39
|
-
|
|
40
|
-
@property
|
|
41
|
-
def monitored_value(self) -> structs.ValueDefinition:
|
|
42
|
-
return self.get_attr(3)
|
|
43
|
-
|
|
44
|
-
@property
|
|
45
|
-
def threshold_normal(self) -> Actions:
|
|
46
|
-
return self.get_attr(4)
|
|
1
|
+
from ..types.implementations import structs
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from ..types import choices, cdt
|
|
4
|
+
from .cosem_interface_class import ICAuto, ICAElement
|
|
5
|
+
from .Overview import class_id
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class Thresholds(cdt.Array):
|
|
9
|
+
"""thresholds attribute"""
|
|
10
|
+
TYPE = choices.simple_dt
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ActionSet(cdt.Structure):
|
|
14
|
+
"""action_set"""
|
|
15
|
+
action_up: structs.ActionItem
|
|
16
|
+
action_down: structs.ActionItem
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class Actions(cdt.Array):
|
|
20
|
+
"""actions attribute"""
|
|
21
|
+
TYPE = ActionSet
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class RegisterMonitor(ICAuto):
|
|
25
|
+
"""4.5.6 Register monitor"""
|
|
26
|
+
CLASS_ID = class_id.REGISTER_MONITOR
|
|
27
|
+
VERSION = 0
|
|
28
|
+
A_ELEMENTS = (ICAElement(2, "thresholds", Thresholds),
|
|
29
|
+
ICAElement(3, "monitored_value", structs.ValueDefinition),
|
|
30
|
+
ICAElement(4, "actions", Actions))
|
|
31
|
+
thresholds: Optional[Thresholds]
|
|
32
|
+
monitored_value: Optional[structs.ValueDefinition]
|
|
33
|
+
threshold_normal: Optional[Actions]
|