DLMS-SPODES 0.87.13__py3-none-any.whl → 0.87.16__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 -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 +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.13.dist-info → dlms_spodes-0.87.16.dist-info}/METADATA +30 -30
- dlms_spodes-0.87.16.dist-info/RECORD +117 -0
- {dlms_spodes-0.87.13.dist-info → dlms_spodes-0.87.16.dist-info}/WHEEL +1 -1
- dlms_spodes-0.87.13.dist-info/RECORD +0 -117
- {dlms_spodes-0.87.13.dist-info → dlms_spodes-0.87.16.dist-info}/top_level.txt +0 -0
|
@@ -1,166 +1,166 @@
|
|
|
1
|
-
from ..__class_init__ import *
|
|
2
|
-
from ...types.implementations import structs, enums, integers
|
|
3
|
-
from itertools import chain
|
|
4
|
-
from ...types import choices
|
|
5
|
-
from ..overview import VERSION_2
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
class RestrictionElement(choices.StructureMixin, cdt.Structure):
|
|
9
|
-
"""Override several methods of cdt.Structure. It limited Structure."""
|
|
10
|
-
restriction_type: enums.RestrictionType
|
|
11
|
-
restriction_value: choices.restriction_value
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class ColumnElement(cdt.Array):
|
|
15
|
-
""" Specifies the list of capture objects """
|
|
16
|
-
TYPE = structs.CaptureObjectDefinition
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class PushObjectDefinition(cdt.Structure):
|
|
20
|
-
class_id: cdt.LongUnsigned
|
|
21
|
-
logical_name: cst.LogicalName
|
|
22
|
-
attribute_index: cdt.Integer
|
|
23
|
-
data_index: cdt.LongUnsigned
|
|
24
|
-
restriction: RestrictionElement
|
|
25
|
-
column: ColumnElement
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class PushObjectList(cdt.Array):
|
|
29
|
-
""" Defines the list of attributes to be pushed. """
|
|
30
|
-
TYPE = PushObjectDefinition
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
class TransportServiceType(cdt.Enum, elements=tuple(chain(range(9), range(200, 256)))): # TODO: elements 200.. is manufacturer specific
|
|
34
|
-
""""""
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
class MessageType(cdt.Enum, elements=tuple(chain((0, 1), range(128, 256)))): # TODO: elements 128.. is manufacturer specific
|
|
38
|
-
""""""
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
class SendDestinationAndMethod(cdt.Structure):
|
|
42
|
-
transport_service: TransportServiceType
|
|
43
|
-
destination: cdt.OctetString
|
|
44
|
-
message: MessageType
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
class CommunicationWindow(cdt.Array):
|
|
48
|
-
""" Defines the time points when the communication window(s) for the push become(s) active (start_time) and inactive (end_time). """
|
|
49
|
-
TYPE = structs.WindowElement
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
class RepetitionDelay(cdt.Structure):
|
|
53
|
-
repetition_delay_min: cdt.LongUnsigned
|
|
54
|
-
repetition_delay_exponent: cdt.LongUnsigned
|
|
55
|
-
repetition_delay_max: cdt.LongUnsigned
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
class PushOperationMethod(cdt.Enum, elements=(0, 1, 2)):
|
|
59
|
-
""""""
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
class ConfirmationParameters(cdt.Structure):
|
|
63
|
-
confirmation_start_date: cdt.DateTime
|
|
64
|
-
confirmation_interval: cdt.DoubleLongUnsigned
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
class KeyInfoElement(choices.StructureMixin, cdt.Structure):
|
|
68
|
-
"""Override several methods of cdt.Structure. It limited Structure."""
|
|
69
|
-
key_info_type: enums.KeyInfoType
|
|
70
|
-
key_info_options: choices.KeyInfoOptions
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
class ProtectionOptions(cdt.Structure):
|
|
74
|
-
transaction_id: cdt.OctetString
|
|
75
|
-
originator_system_title: cdt.OctetString
|
|
76
|
-
recipient_system_title: cdt.OctetString
|
|
77
|
-
other_information: cdt.OctetString
|
|
78
|
-
key_info: KeyInfoElement
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
class ProtectionParametersElement(cdt.Structure):
|
|
82
|
-
protection_type: enums.ProtectionType
|
|
83
|
-
protection_options: ProtectionOptions
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
class PushProtectionParameters(cdt.Array):
|
|
87
|
-
TYPE = ProtectionParametersElement
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
class PushSetup(ic.COSEMInterfaceClasses):
|
|
91
|
-
""" DLMS UA 1000-1 Ed. 14 4.4.8.2 Push setup"""
|
|
92
|
-
CLASS_ID = ClassID.PUSH_SETUP
|
|
93
|
-
VERSION = VERSION_2
|
|
94
|
-
A_ELEMENTS = (ic.ICAElement("push_object_list", PushObjectList),
|
|
95
|
-
ic.ICAElement("send_destination_and_method", SendDestinationAndMethod),
|
|
96
|
-
ic.ICAElement("communication_window", CommunicationWindow),
|
|
97
|
-
ic.ICAElement("randomisation_start_interval", cdt.LongUnsigned),
|
|
98
|
-
ic.ICAElement("number_of_retries", cdt.Unsigned),
|
|
99
|
-
ic.ICAElement("repetition_delay", RepetitionDelay),
|
|
100
|
-
ic.ICAElement("port_reference", cst.LogicalName),
|
|
101
|
-
ic.ICAElement("push_client_sap", cdt.Integer),
|
|
102
|
-
ic.ICAElement("push_protection_parameters", PushProtectionParameters),
|
|
103
|
-
ic.ICAElement("push_operation_method", PushOperationMethod),
|
|
104
|
-
ic.ICAElement("confirmation_parameters", ConfirmationParameters),
|
|
105
|
-
ic.ICAElement("last_confirmation_date_time", cdt.DateTime, classifier=ic.Classifier.DYNAMIC))
|
|
106
|
-
M_ELEMENTS = (ic.ICMElement("push", integers.Only0),
|
|
107
|
-
ic.ICMElement("reset", integers.Only0))
|
|
108
|
-
|
|
109
|
-
def characteristics_init(self):
|
|
110
|
-
"""nothing do it"""
|
|
111
|
-
|
|
112
|
-
@property
|
|
113
|
-
def push_object_list(self) -> PushObjectList:
|
|
114
|
-
return self.get_attr(2)
|
|
115
|
-
|
|
116
|
-
@property
|
|
117
|
-
def send_destination_and_method(self) -> SendDestinationAndMethod:
|
|
118
|
-
return self.get_attr(3)
|
|
119
|
-
|
|
120
|
-
@property
|
|
121
|
-
def communication_window(self) -> CommunicationWindow:
|
|
122
|
-
return self.get_attr(4)
|
|
123
|
-
|
|
124
|
-
@property
|
|
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 ..__class_init__ import *
|
|
2
|
+
from ...types.implementations import structs, enums, integers
|
|
3
|
+
from itertools import chain
|
|
4
|
+
from ...types import choices
|
|
5
|
+
from ..overview import VERSION_2
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class RestrictionElement(choices.StructureMixin, cdt.Structure):
|
|
9
|
+
"""Override several methods of cdt.Structure. It limited Structure."""
|
|
10
|
+
restriction_type: enums.RestrictionType
|
|
11
|
+
restriction_value: choices.restriction_value
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class ColumnElement(cdt.Array):
|
|
15
|
+
""" Specifies the list of capture objects """
|
|
16
|
+
TYPE = structs.CaptureObjectDefinition
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class PushObjectDefinition(cdt.Structure):
|
|
20
|
+
class_id: cdt.LongUnsigned
|
|
21
|
+
logical_name: cst.LogicalName
|
|
22
|
+
attribute_index: cdt.Integer
|
|
23
|
+
data_index: cdt.LongUnsigned
|
|
24
|
+
restriction: RestrictionElement
|
|
25
|
+
column: ColumnElement
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class PushObjectList(cdt.Array):
|
|
29
|
+
""" Defines the list of attributes to be pushed. """
|
|
30
|
+
TYPE = PushObjectDefinition
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
class TransportServiceType(cdt.Enum, elements=tuple(chain(range(9), range(200, 256)))): # TODO: elements 200.. is manufacturer specific
|
|
34
|
+
""""""
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class MessageType(cdt.Enum, elements=tuple(chain((0, 1), range(128, 256)))): # TODO: elements 128.. is manufacturer specific
|
|
38
|
+
""""""
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
class SendDestinationAndMethod(cdt.Structure):
|
|
42
|
+
transport_service: TransportServiceType
|
|
43
|
+
destination: cdt.OctetString
|
|
44
|
+
message: MessageType
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class CommunicationWindow(cdt.Array):
|
|
48
|
+
""" Defines the time points when the communication window(s) for the push become(s) active (start_time) and inactive (end_time). """
|
|
49
|
+
TYPE = structs.WindowElement
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class RepetitionDelay(cdt.Structure):
|
|
53
|
+
repetition_delay_min: cdt.LongUnsigned
|
|
54
|
+
repetition_delay_exponent: cdt.LongUnsigned
|
|
55
|
+
repetition_delay_max: cdt.LongUnsigned
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
class PushOperationMethod(cdt.Enum, elements=(0, 1, 2)):
|
|
59
|
+
""""""
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
class ConfirmationParameters(cdt.Structure):
|
|
63
|
+
confirmation_start_date: cdt.DateTime
|
|
64
|
+
confirmation_interval: cdt.DoubleLongUnsigned
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class KeyInfoElement(choices.StructureMixin, cdt.Structure):
|
|
68
|
+
"""Override several methods of cdt.Structure. It limited Structure."""
|
|
69
|
+
key_info_type: enums.KeyInfoType
|
|
70
|
+
key_info_options: choices.KeyInfoOptions
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class ProtectionOptions(cdt.Structure):
|
|
74
|
+
transaction_id: cdt.OctetString
|
|
75
|
+
originator_system_title: cdt.OctetString
|
|
76
|
+
recipient_system_title: cdt.OctetString
|
|
77
|
+
other_information: cdt.OctetString
|
|
78
|
+
key_info: KeyInfoElement
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
class ProtectionParametersElement(cdt.Structure):
|
|
82
|
+
protection_type: enums.ProtectionType
|
|
83
|
+
protection_options: ProtectionOptions
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class PushProtectionParameters(cdt.Array):
|
|
87
|
+
TYPE = ProtectionParametersElement
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class PushSetup(ic.COSEMInterfaceClasses):
|
|
91
|
+
""" DLMS UA 1000-1 Ed. 14 4.4.8.2 Push setup"""
|
|
92
|
+
CLASS_ID = ClassID.PUSH_SETUP
|
|
93
|
+
VERSION = VERSION_2
|
|
94
|
+
A_ELEMENTS = (ic.ICAElement("push_object_list", PushObjectList),
|
|
95
|
+
ic.ICAElement("send_destination_and_method", SendDestinationAndMethod),
|
|
96
|
+
ic.ICAElement("communication_window", CommunicationWindow),
|
|
97
|
+
ic.ICAElement("randomisation_start_interval", cdt.LongUnsigned),
|
|
98
|
+
ic.ICAElement("number_of_retries", cdt.Unsigned),
|
|
99
|
+
ic.ICAElement("repetition_delay", RepetitionDelay),
|
|
100
|
+
ic.ICAElement("port_reference", cst.LogicalName),
|
|
101
|
+
ic.ICAElement("push_client_sap", cdt.Integer),
|
|
102
|
+
ic.ICAElement("push_protection_parameters", PushProtectionParameters),
|
|
103
|
+
ic.ICAElement("push_operation_method", PushOperationMethod),
|
|
104
|
+
ic.ICAElement("confirmation_parameters", ConfirmationParameters),
|
|
105
|
+
ic.ICAElement("last_confirmation_date_time", cdt.DateTime, classifier=ic.Classifier.DYNAMIC))
|
|
106
|
+
M_ELEMENTS = (ic.ICMElement("push", integers.Only0),
|
|
107
|
+
ic.ICMElement("reset", integers.Only0))
|
|
108
|
+
|
|
109
|
+
def characteristics_init(self):
|
|
110
|
+
"""nothing do it"""
|
|
111
|
+
|
|
112
|
+
@property
|
|
113
|
+
def push_object_list(self) -> PushObjectList:
|
|
114
|
+
return self.get_attr(2)
|
|
115
|
+
|
|
116
|
+
@property
|
|
117
|
+
def send_destination_and_method(self) -> SendDestinationAndMethod:
|
|
118
|
+
return self.get_attr(3)
|
|
119
|
+
|
|
120
|
+
@property
|
|
121
|
+
def communication_window(self) -> CommunicationWindow:
|
|
122
|
+
return self.get_attr(4)
|
|
123
|
+
|
|
124
|
+
@property
|
|
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,45 +1,45 @@
|
|
|
1
|
-
from .__class_init__ import *
|
|
2
|
-
from ..types import choices
|
|
3
|
-
from ..types.implementations import integers
|
|
4
|
-
from .overview import VERSION_0
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
class Register(ic.COSEMInterfaceClasses):
|
|
8
|
-
""" A “Register” object stores a process value or a status value with its associated unit. The register object knows
|
|
9
|
-
the nature of the process value or of the status value. The nature of the value is described by the attribute
|
|
10
|
-
“logical name” using the OBIS identification system. """
|
|
11
|
-
CLASS_ID = ClassID.REGISTER
|
|
12
|
-
VERSION = VERSION_0
|
|
13
|
-
scaler_unit_not_settable: bool
|
|
14
|
-
A_ELEMENTS = (
|
|
15
|
-
ic.ICAElement("value", choices.register, classifier=ic.Classifier.NOT_SPECIFIC),
|
|
16
|
-
ic.ICAElement("scaler_unit", cdt.ScalUnitType))
|
|
17
|
-
M_ELEMENTS = (
|
|
18
|
-
ic.ICMElement("reset", integers.Only0),)
|
|
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 .__class_init__ import *
|
|
2
|
+
from ..types import choices
|
|
3
|
+
from ..types.implementations import integers
|
|
4
|
+
from .overview import VERSION_0
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class Register(ic.COSEMInterfaceClasses):
|
|
8
|
+
""" A “Register” object stores a process value or a status value with its associated unit. The register object knows
|
|
9
|
+
the nature of the process value or of the status value. The nature of the value is described by the attribute
|
|
10
|
+
“logical name” using the OBIS identification system. """
|
|
11
|
+
CLASS_ID = ClassID.REGISTER
|
|
12
|
+
VERSION = VERSION_0
|
|
13
|
+
scaler_unit_not_settable: bool
|
|
14
|
+
A_ELEMENTS = (
|
|
15
|
+
ic.ICAElement("value", choices.register, classifier=ic.Classifier.NOT_SPECIFIC),
|
|
16
|
+
ic.ICAElement("scaler_unit", cdt.ScalUnitType))
|
|
17
|
+
M_ELEMENTS = (
|
|
18
|
+
ic.ICMElement("reset", integers.Only0),)
|
|
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,80 +1,80 @@
|
|
|
1
|
-
from ..__class_init__ import *
|
|
2
|
-
from ...types import cst
|
|
3
|
-
from ...types.implementations import long_unsigneds
|
|
4
|
-
from ..overview import VERSION_0
|
|
5
|
-
|
|
6
|
-
class ObjectDefinition(cdt.Structure):
|
|
7
|
-
class_id: long_unsigneds.ClassId
|
|
8
|
-
logical_name: cst.LogicalName
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class RegisterAssignment(cdt.Array):
|
|
12
|
-
TYPE = ObjectDefinition
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
class IndexArray(cdt.Array):
|
|
16
|
-
TYPE = cdt.Unsigned
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
class RegisterActMask(cdt.Structure):
|
|
20
|
-
mask_name: cdt.OctetString
|
|
21
|
-
index_list: IndexArray
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
class MaskList(cdt.Array):
|
|
25
|
-
TYPE = RegisterActMask
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
class RegisterActivation(ic.COSEMInterfaceClasses):
|
|
29
|
-
""" A “Register” object stores a process value or a status value with its associated unit. The register object knows
|
|
30
|
-
the nature of the process value or of the status value. The nature of the value is described by the attribute
|
|
31
|
-
“logical name” using the OBIS identification system. """
|
|
32
|
-
CLASS_ID = ClassID.REGISTER_ACTIVATION
|
|
33
|
-
VERSION = VERSION_0
|
|
34
|
-
A_ELEMENTS = (
|
|
35
|
-
ic.ICAElement(
|
|
36
|
-
NAME="register_assignment",
|
|
37
|
-
DATA_TYPE=RegisterAssignment),
|
|
38
|
-
ic.ICAElement(
|
|
39
|
-
NAME="mask_list",
|
|
40
|
-
DATA_TYPE=MaskList),
|
|
41
|
-
ic.ICAElement(
|
|
42
|
-
NAME="active_mask",
|
|
43
|
-
DATA_TYPE=cdt.OctetString))
|
|
44
|
-
M_ELEMENTS = (
|
|
45
|
-
ic.ICMElement(
|
|
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 ..__class_init__ import *
|
|
2
|
+
from ...types import cst
|
|
3
|
+
from ...types.implementations import long_unsigneds
|
|
4
|
+
from ..overview import VERSION_0
|
|
5
|
+
|
|
6
|
+
class ObjectDefinition(cdt.Structure):
|
|
7
|
+
class_id: long_unsigneds.ClassId
|
|
8
|
+
logical_name: cst.LogicalName
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RegisterAssignment(cdt.Array):
|
|
12
|
+
TYPE = ObjectDefinition
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
class IndexArray(cdt.Array):
|
|
16
|
+
TYPE = cdt.Unsigned
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
class RegisterActMask(cdt.Structure):
|
|
20
|
+
mask_name: cdt.OctetString
|
|
21
|
+
index_list: IndexArray
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
class MaskList(cdt.Array):
|
|
25
|
+
TYPE = RegisterActMask
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
class RegisterActivation(ic.COSEMInterfaceClasses):
|
|
29
|
+
""" A “Register” object stores a process value or a status value with its associated unit. The register object knows
|
|
30
|
+
the nature of the process value or of the status value. The nature of the value is described by the attribute
|
|
31
|
+
“logical name” using the OBIS identification system. """
|
|
32
|
+
CLASS_ID = ClassID.REGISTER_ACTIVATION
|
|
33
|
+
VERSION = VERSION_0
|
|
34
|
+
A_ELEMENTS = (
|
|
35
|
+
ic.ICAElement(
|
|
36
|
+
NAME="register_assignment",
|
|
37
|
+
DATA_TYPE=RegisterAssignment),
|
|
38
|
+
ic.ICAElement(
|
|
39
|
+
NAME="mask_list",
|
|
40
|
+
DATA_TYPE=MaskList),
|
|
41
|
+
ic.ICAElement(
|
|
42
|
+
NAME="active_mask",
|
|
43
|
+
DATA_TYPE=cdt.OctetString))
|
|
44
|
+
M_ELEMENTS = (
|
|
45
|
+
ic.ICMElement(
|
|
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)
|