DLMS-SPODES-client 0.19.21__py3-none-any.whl → 0.19.23__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_client/FCS16.py +39 -39
- DLMS_SPODES_client/__init__.py +12 -12
- DLMS_SPODES_client/client.py +2091 -2091
- DLMS_SPODES_client/gurux_common/enums/TraceLevel.py +21 -21
- DLMS_SPODES_client/gurux_dlms/AesGcmParameter.py +37 -37
- DLMS_SPODES_client/gurux_dlms/CountType.py +16 -16
- DLMS_SPODES_client/gurux_dlms/GXByteBuffer.py +545 -545
- DLMS_SPODES_client/gurux_dlms/GXCiphering.py +196 -196
- DLMS_SPODES_client/gurux_dlms/GXDLMS.py +426 -426
- DLMS_SPODES_client/gurux_dlms/GXDLMSChippering.py +237 -237
- DLMS_SPODES_client/gurux_dlms/GXDLMSChipperingStream.py +977 -977
- DLMS_SPODES_client/gurux_dlms/GXDLMSConfirmedServiceError.py +90 -90
- DLMS_SPODES_client/gurux_dlms/GXDLMSException.py +139 -139
- DLMS_SPODES_client/gurux_dlms/GXDLMSLNParameters.py +33 -33
- DLMS_SPODES_client/gurux_dlms/GXDLMSSNParameters.py +21 -21
- DLMS_SPODES_client/gurux_dlms/GXDLMSSettings.py +254 -254
- DLMS_SPODES_client/gurux_dlms/GXReplyData.py +87 -87
- DLMS_SPODES_client/gurux_dlms/HdlcControlFrame.py +9 -9
- DLMS_SPODES_client/gurux_dlms/MBusCommand.py +8 -8
- DLMS_SPODES_client/gurux_dlms/MBusEncryptionMode.py +27 -27
- DLMS_SPODES_client/gurux_dlms/ResponseType.py +8 -8
- DLMS_SPODES_client/gurux_dlms/SetResponseType.py +29 -29
- DLMS_SPODES_client/gurux_dlms/_HDLCInfo.py +9 -9
- DLMS_SPODES_client/gurux_dlms/__init__.py +75 -75
- DLMS_SPODES_client/gurux_dlms/enums/Access.py +12 -12
- DLMS_SPODES_client/gurux_dlms/enums/ApplicationReference.py +14 -14
- DLMS_SPODES_client/gurux_dlms/enums/Authentication.py +41 -41
- DLMS_SPODES_client/gurux_dlms/enums/BerType.py +35 -35
- DLMS_SPODES_client/gurux_dlms/enums/Command.py +285 -285
- DLMS_SPODES_client/gurux_dlms/enums/Definition.py +9 -9
- DLMS_SPODES_client/gurux_dlms/enums/ErrorCode.py +46 -46
- DLMS_SPODES_client/gurux_dlms/enums/ExceptionServiceError.py +12 -12
- DLMS_SPODES_client/gurux_dlms/enums/HardwareResource.py +10 -10
- DLMS_SPODES_client/gurux_dlms/enums/HdlcFrameType.py +9 -9
- DLMS_SPODES_client/gurux_dlms/enums/Initiate.py +10 -10
- DLMS_SPODES_client/gurux_dlms/enums/LoadDataSet.py +13 -13
- DLMS_SPODES_client/gurux_dlms/enums/ObjectType.py +306 -306
- DLMS_SPODES_client/gurux_dlms/enums/Priority.py +7 -7
- DLMS_SPODES_client/gurux_dlms/enums/RequestTypes.py +9 -9
- DLMS_SPODES_client/gurux_dlms/enums/Security.py +14 -14
- DLMS_SPODES_client/gurux_dlms/enums/Service.py +16 -16
- DLMS_SPODES_client/gurux_dlms/enums/ServiceClass.py +9 -9
- DLMS_SPODES_client/gurux_dlms/enums/ServiceError.py +8 -8
- DLMS_SPODES_client/gurux_dlms/enums/Standard.py +18 -18
- DLMS_SPODES_client/gurux_dlms/enums/StateError.py +7 -7
- DLMS_SPODES_client/gurux_dlms/enums/Task.py +10 -10
- DLMS_SPODES_client/gurux_dlms/enums/VdeStateError.py +10 -10
- DLMS_SPODES_client/gurux_dlms/enums/__init__.py +33 -33
- DLMS_SPODES_client/gurux_dlms/internal/_GXCommon.py +1673 -1673
- DLMS_SPODES_client/logger.py +56 -56
- DLMS_SPODES_client/services.py +97 -97
- DLMS_SPODES_client/session.py +365 -365
- DLMS_SPODES_client/settings.py +48 -48
- DLMS_SPODES_client/task.py +1842 -1840
- {dlms_spodes_client-0.19.21.dist-info → dlms_spodes_client-0.19.23.dist-info}/METADATA +29 -27
- dlms_spodes_client-0.19.23.dist-info/RECORD +61 -0
- dlms_spodes_client-0.19.21.dist-info/RECORD +0 -61
- {dlms_spodes_client-0.19.21.dist-info → dlms_spodes_client-0.19.23.dist-info}/WHEEL +0 -0
- {dlms_spodes_client-0.19.21.dist-info → dlms_spodes_client-0.19.23.dist-info}/entry_points.txt +0 -0
- {dlms_spodes_client-0.19.21.dist-info → dlms_spodes_client-0.19.23.dist-info}/top_level.txt +0 -0
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
from dataclasses import dataclass, field
|
|
2
|
-
from typing import Optional, Any
|
|
3
|
-
from DLMS_SPODES.enums import XDLMSAPDU
|
|
4
|
-
from .GXByteBuffer import GXByteBuffer
|
|
5
|
-
from .enums import RequestTypes
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
@dataclass
|
|
9
|
-
class GXReplyData:
|
|
10
|
-
command: Optional[XDLMSAPDU] = None
|
|
11
|
-
"""Received command"""
|
|
12
|
-
moreData: RequestTypes = RequestTypes.NONE
|
|
13
|
-
"""Is more data available"""
|
|
14
|
-
data: GXByteBuffer = field(init=False, default_factory=GXByteBuffer)
|
|
15
|
-
"""Received data"""
|
|
16
|
-
complete: bool = False
|
|
17
|
-
"""Is frame complete"""
|
|
18
|
-
error: int = 0
|
|
19
|
-
"""Received error"""
|
|
20
|
-
value: Any = None
|
|
21
|
-
commandType: int = 0
|
|
22
|
-
"""Received command type"""
|
|
23
|
-
frameId: int = 0
|
|
24
|
-
"""HDLC frame ID"""
|
|
25
|
-
dataValue: Any = None
|
|
26
|
-
totalCount: int = 0
|
|
27
|
-
"""Expected count of element in the array"""
|
|
28
|
-
readPosition: int = 0
|
|
29
|
-
"""Last read position. This is used in peek to solve how far data is read"""
|
|
30
|
-
packetLength: int = 0
|
|
31
|
-
"""Packet length"""
|
|
32
|
-
peek: bool = False
|
|
33
|
-
"""Try get value"""
|
|
34
|
-
cipherIndex: int = 0
|
|
35
|
-
"""Cipher index is position where data is decrypted"""
|
|
36
|
-
blockNumber: int = 0
|
|
37
|
-
"""GBT block number"""
|
|
38
|
-
blockNumberAck: int = 0
|
|
39
|
-
"""GBT block number ACK"""
|
|
40
|
-
streaming: bool = False
|
|
41
|
-
"""Is GBT streaming in use"""
|
|
42
|
-
windowSize: int = 0
|
|
43
|
-
"""GBT Window size. This is for internal use"""
|
|
44
|
-
clientAddress: int = 0
|
|
45
|
-
"""Client address of the notification message. Notification message sets this"""
|
|
46
|
-
serverAddress: int = 0
|
|
47
|
-
""" Server address of the notification message. Notification message sets this"""
|
|
48
|
-
|
|
49
|
-
def clear(self):
|
|
50
|
-
"""" Reset data values to default. """
|
|
51
|
-
self.moreData = RequestTypes.NONE
|
|
52
|
-
self.command = None
|
|
53
|
-
self.commandType = 0
|
|
54
|
-
self.data.capacity = 0
|
|
55
|
-
self.complete = False
|
|
56
|
-
self.error = 0
|
|
57
|
-
self.totalCount = 0
|
|
58
|
-
self.dataValue = None
|
|
59
|
-
self.readPosition = 0
|
|
60
|
-
self.packetLength = 0
|
|
61
|
-
self.cipherIndex = 0
|
|
62
|
-
self.value = None
|
|
63
|
-
|
|
64
|
-
def isMoreData(self):
|
|
65
|
-
""" Is more data available. """
|
|
66
|
-
return self.moreData != RequestTypes.NONE and self.error == 0
|
|
67
|
-
|
|
68
|
-
def isNotify(self):
|
|
69
|
-
""" Is notify message. """
|
|
70
|
-
return self.command == XDLMSAPDU.EVENT_NOTIFICATION_REQUEST or self.command == XDLMSAPDU.DATA_NOTIFICATION or self.command == XDLMSAPDU.INFORMATION_REPORT_REQUEST
|
|
71
|
-
|
|
72
|
-
def getTotalCount(self):
|
|
73
|
-
""" Get total count of element in the array. If this method is used peek must be set true."""
|
|
74
|
-
return self.totalCount
|
|
75
|
-
|
|
76
|
-
def getCount(self):
|
|
77
|
-
""" Get count of read elements. If this method is used peek must be set true."""
|
|
78
|
-
if isinstance(self.dataValue, list):
|
|
79
|
-
return len(self.dataValue)
|
|
80
|
-
return 0
|
|
81
|
-
|
|
82
|
-
def isStreaming(self) -> bool:
|
|
83
|
-
""" Is GBT streaming. """
|
|
84
|
-
return self.streaming and (self.blockNumberAck * self.windowSize) + 1 > self.blockNumber
|
|
85
|
-
|
|
86
|
-
def __str__(self) -> str:
|
|
87
|
-
return str(self.data) if self.data else ""
|
|
1
|
+
from dataclasses import dataclass, field
|
|
2
|
+
from typing import Optional, Any
|
|
3
|
+
from DLMS_SPODES.enums import XDLMSAPDU
|
|
4
|
+
from .GXByteBuffer import GXByteBuffer
|
|
5
|
+
from .enums import RequestTypes
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
@dataclass
|
|
9
|
+
class GXReplyData:
|
|
10
|
+
command: Optional[XDLMSAPDU] = None
|
|
11
|
+
"""Received command"""
|
|
12
|
+
moreData: RequestTypes = RequestTypes.NONE
|
|
13
|
+
"""Is more data available"""
|
|
14
|
+
data: GXByteBuffer = field(init=False, default_factory=GXByteBuffer)
|
|
15
|
+
"""Received data"""
|
|
16
|
+
complete: bool = False
|
|
17
|
+
"""Is frame complete"""
|
|
18
|
+
error: int = 0
|
|
19
|
+
"""Received error"""
|
|
20
|
+
value: Any = None
|
|
21
|
+
commandType: int = 0
|
|
22
|
+
"""Received command type"""
|
|
23
|
+
frameId: int = 0
|
|
24
|
+
"""HDLC frame ID"""
|
|
25
|
+
dataValue: Any = None
|
|
26
|
+
totalCount: int = 0
|
|
27
|
+
"""Expected count of element in the array"""
|
|
28
|
+
readPosition: int = 0
|
|
29
|
+
"""Last read position. This is used in peek to solve how far data is read"""
|
|
30
|
+
packetLength: int = 0
|
|
31
|
+
"""Packet length"""
|
|
32
|
+
peek: bool = False
|
|
33
|
+
"""Try get value"""
|
|
34
|
+
cipherIndex: int = 0
|
|
35
|
+
"""Cipher index is position where data is decrypted"""
|
|
36
|
+
blockNumber: int = 0
|
|
37
|
+
"""GBT block number"""
|
|
38
|
+
blockNumberAck: int = 0
|
|
39
|
+
"""GBT block number ACK"""
|
|
40
|
+
streaming: bool = False
|
|
41
|
+
"""Is GBT streaming in use"""
|
|
42
|
+
windowSize: int = 0
|
|
43
|
+
"""GBT Window size. This is for internal use"""
|
|
44
|
+
clientAddress: int = 0
|
|
45
|
+
"""Client address of the notification message. Notification message sets this"""
|
|
46
|
+
serverAddress: int = 0
|
|
47
|
+
""" Server address of the notification message. Notification message sets this"""
|
|
48
|
+
|
|
49
|
+
def clear(self):
|
|
50
|
+
"""" Reset data values to default. """
|
|
51
|
+
self.moreData = RequestTypes.NONE
|
|
52
|
+
self.command = None
|
|
53
|
+
self.commandType = 0
|
|
54
|
+
self.data.capacity = 0
|
|
55
|
+
self.complete = False
|
|
56
|
+
self.error = 0
|
|
57
|
+
self.totalCount = 0
|
|
58
|
+
self.dataValue = None
|
|
59
|
+
self.readPosition = 0
|
|
60
|
+
self.packetLength = 0
|
|
61
|
+
self.cipherIndex = 0
|
|
62
|
+
self.value = None
|
|
63
|
+
|
|
64
|
+
def isMoreData(self):
|
|
65
|
+
""" Is more data available. """
|
|
66
|
+
return self.moreData != RequestTypes.NONE and self.error == 0
|
|
67
|
+
|
|
68
|
+
def isNotify(self):
|
|
69
|
+
""" Is notify message. """
|
|
70
|
+
return self.command == XDLMSAPDU.EVENT_NOTIFICATION_REQUEST or self.command == XDLMSAPDU.DATA_NOTIFICATION or self.command == XDLMSAPDU.INFORMATION_REPORT_REQUEST
|
|
71
|
+
|
|
72
|
+
def getTotalCount(self):
|
|
73
|
+
""" Get total count of element in the array. If this method is used peek must be set true."""
|
|
74
|
+
return self.totalCount
|
|
75
|
+
|
|
76
|
+
def getCount(self):
|
|
77
|
+
""" Get count of read elements. If this method is used peek must be set true."""
|
|
78
|
+
if isinstance(self.dataValue, list):
|
|
79
|
+
return len(self.dataValue)
|
|
80
|
+
return 0
|
|
81
|
+
|
|
82
|
+
def isStreaming(self) -> bool:
|
|
83
|
+
""" Is GBT streaming. """
|
|
84
|
+
return self.streaming and (self.blockNumberAck * self.windowSize) + 1 > self.blockNumber
|
|
85
|
+
|
|
86
|
+
def __str__(self) -> str:
|
|
87
|
+
return str(self.data) if self.data else ""
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
from enum import IntEnum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class HdlcControlFrame(IntEnum):
|
|
5
|
-
"""HDLC control frame types."""
|
|
6
|
-
RECEIVE_READY = 0
|
|
7
|
-
RECEIVE_NOT_READY = 1
|
|
8
|
-
REJECT = 2
|
|
9
|
-
SELECTIVE_REJECT = 3
|
|
1
|
+
from enum import IntEnum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class HdlcControlFrame(IntEnum):
|
|
5
|
+
"""HDLC control frame types."""
|
|
6
|
+
RECEIVE_READY = 0
|
|
7
|
+
RECEIVE_NOT_READY = 1
|
|
8
|
+
REJECT = 2
|
|
9
|
+
SELECTIVE_REJECT = 3
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from enum import IntEnum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class MBusCommand(IntEnum):
|
|
5
|
-
"""M-Bus command."""
|
|
6
|
-
SND_NR = 0x44
|
|
7
|
-
SND_UD2 = 0x43
|
|
8
|
-
RSP_UD = 0x08
|
|
1
|
+
from enum import IntEnum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class MBusCommand(IntEnum):
|
|
5
|
+
"""M-Bus command."""
|
|
6
|
+
SND_NR = 0x44
|
|
7
|
+
SND_UD2 = 0x43
|
|
8
|
+
RSP_UD = 0x08
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
from enum import IntEnum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class MBusEncryptionMode(IntEnum):
|
|
5
|
-
"""Encryption modes."""
|
|
6
|
-
|
|
7
|
-
# Encryption is not used.
|
|
8
|
-
NONE = 0
|
|
9
|
-
|
|
10
|
-
# AES with Counter Mode = CTR) noPadding and IV.
|
|
11
|
-
AES_128 = 1
|
|
12
|
-
|
|
13
|
-
# DES with Cipher Block Chaining Mode = CBC).
|
|
14
|
-
DES_CBC = 2
|
|
15
|
-
|
|
16
|
-
# DES with Cipher Block Chaining Mode = CBC) and Initial Vector.
|
|
17
|
-
DES_CBC_IV = 3
|
|
18
|
-
|
|
19
|
-
# AES with Cipher Block Chaining Mode = CBC) and Initial Vector.
|
|
20
|
-
AES_CBC_IV = 5
|
|
21
|
-
|
|
22
|
-
# AES 128 with Cipher Block Chaining Mode = CBC) and dynamic key and
|
|
23
|
-
# Initial Vector with 0.
|
|
24
|
-
AES_CBC_IV0 = 7
|
|
25
|
-
|
|
26
|
-
# TLS
|
|
27
|
-
Tls = 13
|
|
1
|
+
from enum import IntEnum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class MBusEncryptionMode(IntEnum):
|
|
5
|
+
"""Encryption modes."""
|
|
6
|
+
|
|
7
|
+
# Encryption is not used.
|
|
8
|
+
NONE = 0
|
|
9
|
+
|
|
10
|
+
# AES with Counter Mode = CTR) noPadding and IV.
|
|
11
|
+
AES_128 = 1
|
|
12
|
+
|
|
13
|
+
# DES with Cipher Block Chaining Mode = CBC).
|
|
14
|
+
DES_CBC = 2
|
|
15
|
+
|
|
16
|
+
# DES with Cipher Block Chaining Mode = CBC) and Initial Vector.
|
|
17
|
+
DES_CBC_IV = 3
|
|
18
|
+
|
|
19
|
+
# AES with Cipher Block Chaining Mode = CBC) and Initial Vector.
|
|
20
|
+
AES_CBC_IV = 5
|
|
21
|
+
|
|
22
|
+
# AES 128 with Cipher Block Chaining Mode = CBC) and dynamic key and
|
|
23
|
+
# Initial Vector with 0.
|
|
24
|
+
AES_CBC_IV0 = 7
|
|
25
|
+
|
|
26
|
+
# TLS
|
|
27
|
+
Tls = 13
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
from enum import IntEnum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class ResponseType(IntEnum):
|
|
5
|
-
""" IS/IEC 62056-53 : 2006 """
|
|
6
|
-
NORMAL = 1
|
|
7
|
-
WITH_DATABLOCK = 2
|
|
8
|
-
WITH_LIST = 3
|
|
1
|
+
from enum import IntEnum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ResponseType(IntEnum):
|
|
5
|
+
""" IS/IEC 62056-53 : 2006 """
|
|
6
|
+
NORMAL = 1
|
|
7
|
+
WITH_DATABLOCK = 2
|
|
8
|
+
WITH_LIST = 3
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
from enum import IntEnum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class SetResponseType(IntEnum):
|
|
5
|
-
"""Enumerates Set response types."""
|
|
6
|
-
#
|
|
7
|
-
# Normal set response.
|
|
8
|
-
#
|
|
9
|
-
NORMAL = 1
|
|
10
|
-
|
|
11
|
-
#
|
|
12
|
-
# Set response in data blocks.
|
|
13
|
-
#
|
|
14
|
-
DATA_BLOCK = 2
|
|
15
|
-
|
|
16
|
-
#
|
|
17
|
-
# Set response in last data block.
|
|
18
|
-
#
|
|
19
|
-
LAST_DATA_BLOCK = 3
|
|
20
|
-
|
|
21
|
-
#
|
|
22
|
-
# Set response in last data block with list.
|
|
23
|
-
#
|
|
24
|
-
LAST_DATA_BLOCK_WITH_LIST = 4
|
|
25
|
-
|
|
26
|
-
#
|
|
27
|
-
# Set with list response.
|
|
28
|
-
#
|
|
29
|
-
WITH_LIST = 5
|
|
1
|
+
from enum import IntEnum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class SetResponseType(IntEnum):
|
|
5
|
+
"""Enumerates Set response types."""
|
|
6
|
+
#
|
|
7
|
+
# Normal set response.
|
|
8
|
+
#
|
|
9
|
+
NORMAL = 1
|
|
10
|
+
|
|
11
|
+
#
|
|
12
|
+
# Set response in data blocks.
|
|
13
|
+
#
|
|
14
|
+
DATA_BLOCK = 2
|
|
15
|
+
|
|
16
|
+
#
|
|
17
|
+
# Set response in last data block.
|
|
18
|
+
#
|
|
19
|
+
LAST_DATA_BLOCK = 3
|
|
20
|
+
|
|
21
|
+
#
|
|
22
|
+
# Set response in last data block with list.
|
|
23
|
+
#
|
|
24
|
+
LAST_DATA_BLOCK_WITH_LIST = 4
|
|
25
|
+
|
|
26
|
+
#
|
|
27
|
+
# Set with list response.
|
|
28
|
+
#
|
|
29
|
+
WITH_LIST = 5
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
class _HDLCInfo:
|
|
2
|
-
# Constructor.
|
|
3
|
-
def __init__(self):
|
|
4
|
-
pass
|
|
5
|
-
|
|
6
|
-
MAX_INFO_TX = 0x5
|
|
7
|
-
MAX_INFO_RX = 0x6
|
|
8
|
-
WINDOW_SIZE_TX = 0x7
|
|
9
|
-
WINDOW_SIZE_RX = 0x8
|
|
1
|
+
class _HDLCInfo:
|
|
2
|
+
# Constructor.
|
|
3
|
+
def __init__(self):
|
|
4
|
+
pass
|
|
5
|
+
|
|
6
|
+
MAX_INFO_TX = 0x5
|
|
7
|
+
MAX_INFO_RX = 0x6
|
|
8
|
+
WINDOW_SIZE_TX = 0x7
|
|
9
|
+
WINDOW_SIZE_RX = 0x8
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
from .ResponseType import ResponseType
|
|
2
|
-
from .GXByteBuffer import GXByteBuffer
|
|
3
|
-
from .GXDLMS import GXDLMS
|
|
4
|
-
from .GXDLMSConfirmedServiceError import GXDLMSConfirmedServiceError
|
|
5
|
-
from .GXDLMSException import GXDLMSException
|
|
6
|
-
from .GXDLMSLNParameters import GXDLMSLNParameters
|
|
7
|
-
from .GXDLMSSettings import GXDLMSSettings
|
|
8
|
-
from .GXDLMSSNParameters import GXDLMSSNParameters
|
|
9
|
-
from .GXReplyData import GXReplyData
|
|
10
|
-
from .HdlcControlFrame import HdlcControlFrame
|
|
11
|
-
from ._HDLCInfo import _HDLCInfo
|
|
12
|
-
from .MBusCommand import MBusCommand
|
|
13
|
-
from .MBusEncryptionMode import MBusEncryptionMode
|
|
14
|
-
from .SetResponseType import SetResponseType
|
|
15
|
-
from .AesGcmParameter import AesGcmParameter
|
|
16
|
-
from .CountType import CountType
|
|
17
|
-
from .GXCiphering import GXCiphering
|
|
18
|
-
from .GXDLMSChippering import GXDLMSChippering
|
|
19
|
-
from .GXDLMSChipperingStream import GXDLMSChipperingStream
|
|
20
|
-
# from .GXDLMSSNCommandHandler import GXDLMSSNCommandHandler
|
|
21
|
-
# from .GXArray import GXArray
|
|
22
|
-
# from .GXStructure import GXStructure
|
|
23
|
-
# from .ActionRequestType import ActionRequestType
|
|
24
|
-
# from .ActionResponseType import ActionResponseType
|
|
25
|
-
# from ._GXAPDU import _GXAPDU
|
|
26
|
-
# from .GXBitString import GXBitString
|
|
27
|
-
# from .GXTimeZone import GXTimeZone
|
|
28
|
-
# from .GXDate import GXDate
|
|
29
|
-
# from .GXDateTime import GXDateTime
|
|
30
|
-
# from .GXDLMSAccessItem import GXDLMSAccessItem
|
|
31
|
-
# from .GXDLMSConnectionEventArgs import GXDLMSConnectionEventArgs
|
|
32
|
-
# from .GXDLMSConverter import GXDLMSConverter
|
|
33
|
-
# from .GXDLMSGateway import GXDLMSGateway
|
|
34
|
-
# from .GXDLMSLimits import GXDLMSLimits
|
|
35
|
-
# from .GXDLMSLNCommandHandler import GXDLMSLNCommandHandler
|
|
36
|
-
# from .GXDLMSLongTransaction import GXDLMSLongTransaction
|
|
37
|
-
# from .GXDLMSNotify import GXDLMSNotify
|
|
38
|
-
# from .GXDLMSServer import GXDLMSServer
|
|
39
|
-
# from .GXDLMSTranslatorStructure import GXDLMSTranslatorStructure
|
|
40
|
-
# from .GXDLMSXmlPdu import GXDLMSXmlPdu
|
|
41
|
-
# from .GXDLMSXmlSettings import GXDLMSXmlSettings
|
|
42
|
-
# from .GXICipher import GXICipher
|
|
43
|
-
# from .GXServerReply import GXServerReply
|
|
44
|
-
# from .GXSNInfo import GXSNInfo
|
|
45
|
-
# from .GXStandardObisCode import GXStandardObisCode
|
|
46
|
-
# from .GXStandardObisCodeCollection import GXStandardObisCodeCollection
|
|
47
|
-
# from .GXTime import GXTime
|
|
48
|
-
# from .GXWriteItem import GXWriteItem
|
|
49
|
-
# from .GXXmlLoadSettings import GXXmlLoadSettings
|
|
50
|
-
# from .MBusControlInfo import MBusControlInfo
|
|
51
|
-
# from .MBusMeterType import MBusMeterType
|
|
52
|
-
# from .ReleaseRequestReason import ReleaseRequestReason
|
|
53
|
-
# from .ReleaseResponseReason import ReleaseResponseReason
|
|
54
|
-
# from .SerialnumberCounter import SerialNumberCounter
|
|
55
|
-
# from .SingleWriteResponse import SingleWriteResponse
|
|
56
|
-
# from .TranslatorGeneralTags import TranslatorGeneralTags
|
|
57
|
-
# from .TranslatorOutputType import TranslatorOutputType
|
|
58
|
-
# from .TranslatorSimpleTags import TranslatorSimpleTags
|
|
59
|
-
# from .TranslatorStandardTags import TranslatorStandardTags
|
|
60
|
-
# from .TranslatorTags import TranslatorTags
|
|
61
|
-
# from .ValueEventArgs import ValueEventArgs
|
|
62
|
-
# from ._GXObjectFactory import _GXObjectFactory
|
|
63
|
-
# from .GXEnum import GXEnum
|
|
64
|
-
# from .GXInt8 import GXInt8
|
|
65
|
-
# from .GXInt16 import GXInt16
|
|
66
|
-
# from .GXInt32 import GXInt32
|
|
67
|
-
# from .GXInt64 import GXInt64
|
|
68
|
-
# from .GXUInt8 import GXUInt8
|
|
69
|
-
# from .GXUInt16 import GXUInt16
|
|
70
|
-
# from .GXUInt32 import GXUInt32
|
|
71
|
-
# from .GXUInt64 import GXUInt64
|
|
72
|
-
# from .GXFloat32 import GXFloat32
|
|
73
|
-
# from .GXFloat64 import GXFloat64
|
|
74
|
-
# from .GXIntEnum import GXIntEnum
|
|
75
|
-
# from .GXIntFlag import GXIntFlag
|
|
1
|
+
from .ResponseType import ResponseType
|
|
2
|
+
from .GXByteBuffer import GXByteBuffer
|
|
3
|
+
from .GXDLMS import GXDLMS
|
|
4
|
+
from .GXDLMSConfirmedServiceError import GXDLMSConfirmedServiceError
|
|
5
|
+
from .GXDLMSException import GXDLMSException
|
|
6
|
+
from .GXDLMSLNParameters import GXDLMSLNParameters
|
|
7
|
+
from .GXDLMSSettings import GXDLMSSettings
|
|
8
|
+
from .GXDLMSSNParameters import GXDLMSSNParameters
|
|
9
|
+
from .GXReplyData import GXReplyData
|
|
10
|
+
from .HdlcControlFrame import HdlcControlFrame
|
|
11
|
+
from ._HDLCInfo import _HDLCInfo
|
|
12
|
+
from .MBusCommand import MBusCommand
|
|
13
|
+
from .MBusEncryptionMode import MBusEncryptionMode
|
|
14
|
+
from .SetResponseType import SetResponseType
|
|
15
|
+
from .AesGcmParameter import AesGcmParameter
|
|
16
|
+
from .CountType import CountType
|
|
17
|
+
from .GXCiphering import GXCiphering
|
|
18
|
+
from .GXDLMSChippering import GXDLMSChippering
|
|
19
|
+
from .GXDLMSChipperingStream import GXDLMSChipperingStream
|
|
20
|
+
# from .GXDLMSSNCommandHandler import GXDLMSSNCommandHandler
|
|
21
|
+
# from .GXArray import GXArray
|
|
22
|
+
# from .GXStructure import GXStructure
|
|
23
|
+
# from .ActionRequestType import ActionRequestType
|
|
24
|
+
# from .ActionResponseType import ActionResponseType
|
|
25
|
+
# from ._GXAPDU import _GXAPDU
|
|
26
|
+
# from .GXBitString import GXBitString
|
|
27
|
+
# from .GXTimeZone import GXTimeZone
|
|
28
|
+
# from .GXDate import GXDate
|
|
29
|
+
# from .GXDateTime import GXDateTime
|
|
30
|
+
# from .GXDLMSAccessItem import GXDLMSAccessItem
|
|
31
|
+
# from .GXDLMSConnectionEventArgs import GXDLMSConnectionEventArgs
|
|
32
|
+
# from .GXDLMSConverter import GXDLMSConverter
|
|
33
|
+
# from .GXDLMSGateway import GXDLMSGateway
|
|
34
|
+
# from .GXDLMSLimits import GXDLMSLimits
|
|
35
|
+
# from .GXDLMSLNCommandHandler import GXDLMSLNCommandHandler
|
|
36
|
+
# from .GXDLMSLongTransaction import GXDLMSLongTransaction
|
|
37
|
+
# from .GXDLMSNotify import GXDLMSNotify
|
|
38
|
+
# from .GXDLMSServer import GXDLMSServer
|
|
39
|
+
# from .GXDLMSTranslatorStructure import GXDLMSTranslatorStructure
|
|
40
|
+
# from .GXDLMSXmlPdu import GXDLMSXmlPdu
|
|
41
|
+
# from .GXDLMSXmlSettings import GXDLMSXmlSettings
|
|
42
|
+
# from .GXICipher import GXICipher
|
|
43
|
+
# from .GXServerReply import GXServerReply
|
|
44
|
+
# from .GXSNInfo import GXSNInfo
|
|
45
|
+
# from .GXStandardObisCode import GXStandardObisCode
|
|
46
|
+
# from .GXStandardObisCodeCollection import GXStandardObisCodeCollection
|
|
47
|
+
# from .GXTime import GXTime
|
|
48
|
+
# from .GXWriteItem import GXWriteItem
|
|
49
|
+
# from .GXXmlLoadSettings import GXXmlLoadSettings
|
|
50
|
+
# from .MBusControlInfo import MBusControlInfo
|
|
51
|
+
# from .MBusMeterType import MBusMeterType
|
|
52
|
+
# from .ReleaseRequestReason import ReleaseRequestReason
|
|
53
|
+
# from .ReleaseResponseReason import ReleaseResponseReason
|
|
54
|
+
# from .SerialnumberCounter import SerialNumberCounter
|
|
55
|
+
# from .SingleWriteResponse import SingleWriteResponse
|
|
56
|
+
# from .TranslatorGeneralTags import TranslatorGeneralTags
|
|
57
|
+
# from .TranslatorOutputType import TranslatorOutputType
|
|
58
|
+
# from .TranslatorSimpleTags import TranslatorSimpleTags
|
|
59
|
+
# from .TranslatorStandardTags import TranslatorStandardTags
|
|
60
|
+
# from .TranslatorTags import TranslatorTags
|
|
61
|
+
# from .ValueEventArgs import ValueEventArgs
|
|
62
|
+
# from ._GXObjectFactory import _GXObjectFactory
|
|
63
|
+
# from .GXEnum import GXEnum
|
|
64
|
+
# from .GXInt8 import GXInt8
|
|
65
|
+
# from .GXInt16 import GXInt16
|
|
66
|
+
# from .GXInt32 import GXInt32
|
|
67
|
+
# from .GXInt64 import GXInt64
|
|
68
|
+
# from .GXUInt8 import GXUInt8
|
|
69
|
+
# from .GXUInt16 import GXUInt16
|
|
70
|
+
# from .GXUInt32 import GXUInt32
|
|
71
|
+
# from .GXUInt64 import GXUInt64
|
|
72
|
+
# from .GXFloat32 import GXFloat32
|
|
73
|
+
# from .GXFloat64 import GXFloat64
|
|
74
|
+
# from .GXIntEnum import GXIntEnum
|
|
75
|
+
# from .GXIntFlag import GXIntFlag
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
from enum import IntEnum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class Access(IntEnum):
|
|
5
|
-
"""
|
|
6
|
-
Access describes access errors.
|
|
7
|
-
"""
|
|
8
|
-
OTHER = 0
|
|
9
|
-
SCOPE_OF_ACCESS_VIOLATED = 1
|
|
10
|
-
OBJECT_ACCESS_INVALID = 2
|
|
11
|
-
HARDWARE_FAULT = 3
|
|
12
|
-
OBJECT_UNAVAILABLE = 4
|
|
1
|
+
from enum import IntEnum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Access(IntEnum):
|
|
5
|
+
"""
|
|
6
|
+
Access describes access errors.
|
|
7
|
+
"""
|
|
8
|
+
OTHER = 0
|
|
9
|
+
SCOPE_OF_ACCESS_VIOLATED = 1
|
|
10
|
+
OBJECT_ACCESS_INVALID = 2
|
|
11
|
+
HARDWARE_FAULT = 3
|
|
12
|
+
OBJECT_UNAVAILABLE = 4
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
from enum import IntEnum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class ApplicationReference(IntEnum):
|
|
5
|
-
"""
|
|
6
|
-
Application reference describes application errors.
|
|
7
|
-
"""
|
|
8
|
-
OTHER = 0
|
|
9
|
-
TIME_ELAPSED = 1
|
|
10
|
-
APPLICATION_UNREACHABLE = 2
|
|
11
|
-
APPLICATION_REFERENCE_INVALID = 3
|
|
12
|
-
APPLICATION_CONTEXT_UNSUPPORTED = 4
|
|
13
|
-
PROVIDER_COMMUNICATION_ERROR = 5
|
|
14
|
-
DECIPHERING_ERROR = 6
|
|
1
|
+
from enum import IntEnum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class ApplicationReference(IntEnum):
|
|
5
|
+
"""
|
|
6
|
+
Application reference describes application errors.
|
|
7
|
+
"""
|
|
8
|
+
OTHER = 0
|
|
9
|
+
TIME_ELAPSED = 1
|
|
10
|
+
APPLICATION_UNREACHABLE = 2
|
|
11
|
+
APPLICATION_REFERENCE_INVALID = 3
|
|
12
|
+
APPLICATION_CONTEXT_UNSUPPORTED = 4
|
|
13
|
+
PROVIDER_COMMUNICATION_ERROR = 5
|
|
14
|
+
DECIPHERING_ERROR = 6
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
from enum import IntEnum
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
class Authentication(IntEnum):
|
|
5
|
-
"""
|
|
6
|
-
Authentication enumerates the authentication levels.
|
|
7
|
-
"""
|
|
8
|
-
NONE = 0
|
|
9
|
-
LOW = 1
|
|
10
|
-
HIGH = 2
|
|
11
|
-
HIGH_MD5 = 3
|
|
12
|
-
HIGH_SHA1 = 4
|
|
13
|
-
HIGH_GMAC = 5
|
|
14
|
-
HIGH_SHA256 = 6
|
|
15
|
-
HIGH_ECDSA = 7
|
|
16
|
-
|
|
17
|
-
@classmethod
|
|
18
|
-
def valueofString(cls, value):
|
|
19
|
-
return Authentication[value.upper()]
|
|
20
|
-
|
|
21
|
-
@classmethod
|
|
22
|
-
def toString(cls, value):
|
|
23
|
-
if value == 0:
|
|
24
|
-
tmp = "None"
|
|
25
|
-
elif value == 1:
|
|
26
|
-
tmp = "Low"
|
|
27
|
-
elif value == 2:
|
|
28
|
-
tmp = "High"
|
|
29
|
-
elif value == 3:
|
|
30
|
-
tmp = "HighMd5"
|
|
31
|
-
elif value == 4:
|
|
32
|
-
tmp = "HighSha1"
|
|
33
|
-
elif value == 5:
|
|
34
|
-
tmp = "HighGmac"
|
|
35
|
-
elif value == 6:
|
|
36
|
-
tmp = "HighSha256"
|
|
37
|
-
elif value == 7:
|
|
38
|
-
tmp = "HighEcdsa"
|
|
39
|
-
else:
|
|
40
|
-
raise ValueError("Invalid Authentication value.")
|
|
41
|
-
return tmp
|
|
1
|
+
from enum import IntEnum
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Authentication(IntEnum):
|
|
5
|
+
"""
|
|
6
|
+
Authentication enumerates the authentication levels.
|
|
7
|
+
"""
|
|
8
|
+
NONE = 0
|
|
9
|
+
LOW = 1
|
|
10
|
+
HIGH = 2
|
|
11
|
+
HIGH_MD5 = 3
|
|
12
|
+
HIGH_SHA1 = 4
|
|
13
|
+
HIGH_GMAC = 5
|
|
14
|
+
HIGH_SHA256 = 6
|
|
15
|
+
HIGH_ECDSA = 7
|
|
16
|
+
|
|
17
|
+
@classmethod
|
|
18
|
+
def valueofString(cls, value):
|
|
19
|
+
return Authentication[value.upper()]
|
|
20
|
+
|
|
21
|
+
@classmethod
|
|
22
|
+
def toString(cls, value):
|
|
23
|
+
if value == 0:
|
|
24
|
+
tmp = "None"
|
|
25
|
+
elif value == 1:
|
|
26
|
+
tmp = "Low"
|
|
27
|
+
elif value == 2:
|
|
28
|
+
tmp = "High"
|
|
29
|
+
elif value == 3:
|
|
30
|
+
tmp = "HighMd5"
|
|
31
|
+
elif value == 4:
|
|
32
|
+
tmp = "HighSha1"
|
|
33
|
+
elif value == 5:
|
|
34
|
+
tmp = "HighGmac"
|
|
35
|
+
elif value == 6:
|
|
36
|
+
tmp = "HighSha256"
|
|
37
|
+
elif value == 7:
|
|
38
|
+
tmp = "HighEcdsa"
|
|
39
|
+
else:
|
|
40
|
+
raise ValueError("Invalid Authentication value.")
|
|
41
|
+
return tmp
|