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
DLMS_SPODES/hdlc/sub_layer.py
CHANGED
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
from struct import pack
|
|
2
|
-
from functools import cached_property
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
class LLC:
|
|
6
|
-
__DESTINATION__LSAP: int = 0xe6
|
|
7
|
-
__BROADCAST: int = 0xff
|
|
8
|
-
__COMMAND: int = 0xe6
|
|
9
|
-
__RESPONSE: int = 0xe7
|
|
10
|
-
__QUALITY: int = 0x00
|
|
11
|
-
__destination_lsap: int
|
|
12
|
-
__source_lsap: int
|
|
13
|
-
__info: bytes
|
|
14
|
-
|
|
15
|
-
def __init__(self, content: bytearray = None,
|
|
16
|
-
message: bytes = None):
|
|
17
|
-
if message is None:
|
|
18
|
-
self.__destination_lsap = content.pop(0)
|
|
19
|
-
if self.__destination_lsap not in (self.__DESTINATION__LSAP, self.__BROADCAST):
|
|
20
|
-
raise ValueError(F'Destination tag wrong, expected {hex(self.__DESTINATION__LSAP), hex(self.__BROADCAST)}, got {hex(self.__destination_lsap)}')
|
|
21
|
-
else:
|
|
22
|
-
self.__source_lsap = content.pop(0)
|
|
23
|
-
if self.__source_lsap not in (self.__COMMAND, self.__RESPONSE):
|
|
24
|
-
raise ValueError(F'Destination tag wrong, expected {hex(self.__COMMAND)}, {hex(self.__RESPONSE)}, got {hex(self.__source_lsap)}')
|
|
25
|
-
else:
|
|
26
|
-
quality = content.pop(0)
|
|
27
|
-
if quality != self.__QUALITY:
|
|
28
|
-
raise ValueError(F'Quality tag wrong, expected {hex(self.__QUALITY)}, got {hex(quality)}')
|
|
29
|
-
else:
|
|
30
|
-
self.__info = bytes(content)
|
|
31
|
-
else:
|
|
32
|
-
self.__destination_lsap = self.__DESTINATION__LSAP
|
|
33
|
-
self.__source_lsap = self.__COMMAND
|
|
34
|
-
self.__info = message
|
|
35
|
-
|
|
36
|
-
@property
|
|
37
|
-
def info(self) -> bytes:
|
|
38
|
-
return self.__info
|
|
39
|
-
|
|
40
|
-
@cached_property
|
|
41
|
-
def content(self) -> bytes:
|
|
42
|
-
return pack('BBB', self.__destination_lsap, self.__source_lsap, self.__QUALITY) + self.__info
|
|
43
|
-
|
|
44
|
-
def __str__(self):
|
|
45
|
-
return F'{"broadcast " if self.__destination_lsap == self.__BROADCAST else ""}' \
|
|
46
|
-
F'{"command" if self.__source_lsap == self.__COMMAND else "response"} {self.__info[:10].hex(" ")}'
|
|
47
|
-
|
|
48
|
-
def __len__(self):
|
|
49
|
-
return len(self.content)
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
if __name__ == '__main__':
|
|
53
|
-
l = LLC(content=bytearray((0xe6, 0xe7, 0, 1, 2, 3)))
|
|
54
|
-
print(l)
|
|
1
|
+
from struct import pack
|
|
2
|
+
from functools import cached_property
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class LLC:
|
|
6
|
+
__DESTINATION__LSAP: int = 0xe6
|
|
7
|
+
__BROADCAST: int = 0xff
|
|
8
|
+
__COMMAND: int = 0xe6
|
|
9
|
+
__RESPONSE: int = 0xe7
|
|
10
|
+
__QUALITY: int = 0x00
|
|
11
|
+
__destination_lsap: int
|
|
12
|
+
__source_lsap: int
|
|
13
|
+
__info: bytes
|
|
14
|
+
|
|
15
|
+
def __init__(self, content: bytearray = None,
|
|
16
|
+
message: bytes = None):
|
|
17
|
+
if message is None:
|
|
18
|
+
self.__destination_lsap = content.pop(0)
|
|
19
|
+
if self.__destination_lsap not in (self.__DESTINATION__LSAP, self.__BROADCAST):
|
|
20
|
+
raise ValueError(F'Destination tag wrong, expected {hex(self.__DESTINATION__LSAP), hex(self.__BROADCAST)}, got {hex(self.__destination_lsap)}')
|
|
21
|
+
else:
|
|
22
|
+
self.__source_lsap = content.pop(0)
|
|
23
|
+
if self.__source_lsap not in (self.__COMMAND, self.__RESPONSE):
|
|
24
|
+
raise ValueError(F'Destination tag wrong, expected {hex(self.__COMMAND)}, {hex(self.__RESPONSE)}, got {hex(self.__source_lsap)}')
|
|
25
|
+
else:
|
|
26
|
+
quality = content.pop(0)
|
|
27
|
+
if quality != self.__QUALITY:
|
|
28
|
+
raise ValueError(F'Quality tag wrong, expected {hex(self.__QUALITY)}, got {hex(quality)}')
|
|
29
|
+
else:
|
|
30
|
+
self.__info = bytes(content)
|
|
31
|
+
else:
|
|
32
|
+
self.__destination_lsap = self.__DESTINATION__LSAP
|
|
33
|
+
self.__source_lsap = self.__COMMAND
|
|
34
|
+
self.__info = message
|
|
35
|
+
|
|
36
|
+
@property
|
|
37
|
+
def info(self) -> bytes:
|
|
38
|
+
return self.__info
|
|
39
|
+
|
|
40
|
+
@cached_property
|
|
41
|
+
def content(self) -> bytes:
|
|
42
|
+
return pack('BBB', self.__destination_lsap, self.__source_lsap, self.__QUALITY) + self.__info
|
|
43
|
+
|
|
44
|
+
def __str__(self):
|
|
45
|
+
return F'{"broadcast " if self.__destination_lsap == self.__BROADCAST else ""}' \
|
|
46
|
+
F'{"command" if self.__source_lsap == self.__COMMAND else "response"} {self.__info[:10].hex(" ")}'
|
|
47
|
+
|
|
48
|
+
def __len__(self):
|
|
49
|
+
return len(self.content)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
if __name__ == '__main__':
|
|
53
|
+
l = LLC(content=bytearray((0xe6, 0xe7, 0, 1, 2, 3)))
|
|
54
|
+
print(l)
|
DLMS_SPODES/literals.py
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
from typing import Literal
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Attributes = Literal[
|
|
5
|
-
'value', 'scaler_unit', 'status', 'capture_time', 'current_average_value', 'last_average_value', 'start_time_current', 'period', 'number_of_periods', 'mask', 'active_value',
|
|
6
|
-
'active_objects', 'buffer', 'capture_objects', 'capture_period', 'sort_method', 'sort_object', 'entries_in_use', 'profile_entries', 'table', 'table_cell_values', 'status_map',
|
|
7
|
-
'compact_buffer', 'object_list', 'access_rights_list', 'sap_assignment_list', 'image_block_size', 'image_transferred_blocks_status',
|
|
8
|
-
'image_first_not_transferred_block_number', 'image_transfer_enabled', 'image_transfer_status', 'security_policy', 'security_suite', 'push_object_list',
|
|
9
|
-
'send_destination_and_method', 'protection_parameters_get', 'protection_parameters_set', 'function', 'array_components', 'protection_mode', 'time', 'time_zone', 'scripts',
|
|
10
|
-
'entries', 'calendar_name', 'season_profile', 'week_profile', 'thresholds', 'monitored_value', 'executed_script', 'output_state', 'sensor_values', 'action_sets',
|
|
11
|
-
'payment_mode', 'account_balance', 'current_credit_amount', 'unit_charge_active', 'token'
|
|
12
|
-
]
|
|
13
|
-
Methods = Literal[
|
|
14
|
-
'reset', 'next_period', 'image_transfer_initiate', 'image_block_transfer', 'image_verify', 'image_activate', 'security_activate', 'push', 'get_protected_attributes',
|
|
15
|
-
'set_protected_attributes', 'invoke_protected_method', 'add_element', 'remove_element', 'adjust_to_measurement', 'adjust_to_quarter', 'adjust_to_minute', 'activate',
|
|
16
|
-
'disconnect', 'reconnect', 'credit_payment', 'debit_payment', 'set_credit', 'collect_charge', 'process_token'
|
|
17
|
-
]
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
Attributes = Literal[
|
|
5
|
+
'value', 'scaler_unit', 'status', 'capture_time', 'current_average_value', 'last_average_value', 'start_time_current', 'period', 'number_of_periods', 'mask', 'active_value',
|
|
6
|
+
'active_objects', 'buffer', 'capture_objects', 'capture_period', 'sort_method', 'sort_object', 'entries_in_use', 'profile_entries', 'table', 'table_cell_values', 'status_map',
|
|
7
|
+
'compact_buffer', 'object_list', 'access_rights_list', 'sap_assignment_list', 'image_block_size', 'image_transferred_blocks_status',
|
|
8
|
+
'image_first_not_transferred_block_number', 'image_transfer_enabled', 'image_transfer_status', 'security_policy', 'security_suite', 'push_object_list',
|
|
9
|
+
'send_destination_and_method', 'protection_parameters_get', 'protection_parameters_set', 'function', 'array_components', 'protection_mode', 'time', 'time_zone', 'scripts',
|
|
10
|
+
'entries', 'calendar_name', 'season_profile', 'week_profile', 'thresholds', 'monitored_value', 'executed_script', 'output_state', 'sensor_values', 'action_sets',
|
|
11
|
+
'payment_mode', 'account_balance', 'current_credit_amount', 'unit_charge_active', 'token'
|
|
12
|
+
]
|
|
13
|
+
Methods = Literal[
|
|
14
|
+
'reset', 'next_period', 'image_transfer_initiate', 'image_block_transfer', 'image_verify', 'image_activate', 'security_activate', 'push', 'get_protected_attributes',
|
|
15
|
+
'set_protected_attributes', 'invoke_protected_method', 'add_element', 'remove_element', 'adjust_to_measurement', 'adjust_to_quarter', 'adjust_to_minute', 'activate',
|
|
16
|
+
'disconnect', 'reconnect', 'credit_payment', 'debit_payment', 'set_credit', 'collect_charge', 'process_token'
|
|
17
|
+
]
|
DLMS_SPODES/obis/__init__.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
|