Skip to content

Commit 9a88fde

Browse files
committed
Made support for Python 3.6 interpreter
1 parent 0a496b8 commit 9a88fde

File tree

7 files changed

+60
-59
lines changed

7 files changed

+60
-59
lines changed

modbus

src/client/win_resource.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
IDI_ICON1 ICON DISCARDABLE "gui\\icons\\client.ico"
44

55
VS_VERSION_INFO VERSIONINFO
6-
FILEVERSION 0,4,4,0
7-
PRODUCTVERSION 0,4,4,0
6+
FILEVERSION 0,4,5,0
7+
PRODUCTVERSION 0,4,5,0
88
FILEFLAGSMASK 0x3fL
99
#ifdef _DEBUG
1010
FILEFLAGS VS_FF_DEBUG
@@ -21,11 +21,11 @@ VS_VERSION_INFO VERSIONINFO
2121
BEGIN
2222
VALUE "CompanyName", "\0"
2323
VALUE "FileDescription", "\0"
24-
VALUE "FileVersion", "0.4.4.0\0"
24+
VALUE "FileVersion", "0.4.5.0\0"
2525
VALUE "LegalCopyright", "\0"
2626
VALUE "OriginalFilename", "client.exe\0"
2727
VALUE "ProductName", "client\0"
28-
VALUE "ProductVersion", "0.4.4.0\0"
28+
VALUE "ProductVersion", "0.4.5.0\0"
2929
END
3030
END
3131
BLOCK "VarFileInfo"

src/core/sdk/mbcore_config.h

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
#ifndef MBCORE_CONFIG_H
2-
#define MBCORE_CONFIG_H
3-
4-
/*
5-
Major part of mbtools version
6-
*/
7-
#define MBTOOLS_VERSION_MAJOR 0
8-
9-
/*
10-
Minor part of mbtools version
11-
*/
12-
#define MBTOOLS_VERSION_MINOR 4
13-
14-
/*
15-
Patch part of mbtools version
16-
*/
17-
#define MBTOOLS_VERSION_PATCH 5
18-
19-
#endif // MBCORE_CONFIG_H
1+
#ifndef MBCORE_CONFIG_H
2+
#define MBCORE_CONFIG_H
3+
4+
/*
5+
Major part of mbtools version
6+
*/
7+
#define MBTOOLS_VERSION_MAJOR 0
8+
9+
/*
10+
Minor part of mbtools version
11+
*/
12+
#define MBTOOLS_VERSION_MINOR 4
13+
14+
/*
15+
Patch part of mbtools version
16+
*/
17+
#define MBTOOLS_VERSION_PATCH 5
18+
19+
#endif // MBCORE_CONFIG_H

src/core/win_resource.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44

55
VS_VERSION_INFO VERSIONINFO
6-
FILEVERSION 0,4,4,0
7-
PRODUCTVERSION 0,4,4,0
6+
FILEVERSION 0,4,5,0
7+
PRODUCTVERSION 0,4,5,0
88
FILEFLAGSMASK 0x3fL
99
#ifdef _DEBUG
1010
FILEFLAGS VS_FF_DEBUG
@@ -21,11 +21,11 @@ VS_VERSION_INFO VERSIONINFO
2121
BEGIN
2222
VALUE "CompanyName", "\0"
2323
VALUE "FileDescription", "\0"
24-
VALUE "FileVersion", "0.4.4.0\0"
24+
VALUE "FileVersion", "0.4.5.0\0"
2525
VALUE "LegalCopyright", "\0"
2626
VALUE "OriginalFilename", "core.dll\0"
2727
VALUE "ProductName", "core\0"
28-
VALUE "ProductVersion", "0.4.4.0\0"
28+
VALUE "ProductVersion", "0.4.5.0\0"
2929
END
3030
END
3131
BLOCK "VarFileInfo"

src/server/python/mbconfig.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
# -----------------------------------------------------------------------------
2-
# mbconfig.py
3-
#
4-
# DO NOT EDIT THIS FILE! It is autogenerated.
5-
#
6-
# This is Python module for ModbusTools server configuration.
7-
# It is intended to be converted into a usable Python module
8-
# containing configuration parameters and logic for the Modbus server.
9-
# -----------------------------------------------------------------------------
10-
11-
# Major part of mbtools version
12-
MBTOOLS_VERSION_MAJOR = 0
13-
14-
# Minor part of mbtools version
15-
MBTOOLS_VERSION_MINOR = 4
16-
17-
# Patch part of mbtools version
18-
MBTOOLS_VERSION_PATCH = 5
19-
20-
# Integer representation of mbtools version
21-
MBTOOLS_VERSION_INT = (0 << 16) | (4 << 8) | 5
22-
23-
# String representation of mbtools version
24-
MBTOOLS_VERSION_STR = "0.4.5"
1+
# -----------------------------------------------------------------------------
2+
# mbconfig.py
3+
#
4+
# DO NOT EDIT THIS FILE! It is autogenerated.
5+
#
6+
# This is Python module for ModbusTools server configuration.
7+
# It is intended to be converted into a usable Python module
8+
# containing configuration parameters and logic for the Modbus server.
9+
# -----------------------------------------------------------------------------
10+
11+
# Major part of mbtools version
12+
MBTOOLS_VERSION_MAJOR = 0
13+
14+
# Minor part of mbtools version
15+
MBTOOLS_VERSION_MINOR = 4
16+
17+
# Patch part of mbtools version
18+
MBTOOLS_VERSION_PATCH = 5
19+
20+
# Integer representation of mbtools version
21+
MBTOOLS_VERSION_INT = (0 << 16) | (4 << 8) | 5
22+
23+
# String representation of mbtools version
24+
MBTOOLS_VERSION_STR = "0.4.5"

src/server/python/mbserver.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from ctypes import *
1111
import struct
1212

13+
from typing import Union
1314
from PyQt5.QtCore import QSharedMemory
1415

1516
from mbconfig import *
@@ -127,7 +128,7 @@ def _recalcheader(self, byteoffset:int, bytecount:int):
127128
self._head.changeByteCount = rightedge - self._head.changeByteOffset
128129
self._head.changeCounter += 1
129130

130-
def _getbytes(self, byteoffset:int, count:int, bytestype=bytes)->bytes:
131+
def _getbytes(self, byteoffset: int, count: int, bytestype=bytes) -> Union[bytes, bytearray]:
131132
if 0 <= byteoffset < self._countbytes:
132133
if byteoffset+count > self._countbytes:
133134
c = self._countbytes - byteoffset
@@ -233,7 +234,7 @@ def getbytearray(self, byteoffset:int, bytecount:int)->bytearray:
233234
"""
234235
return self._getbytes(byteoffset, bytecount, bytearray)
235236

236-
def setbytes(self, byteoffset:int, value:type[bytes|bytearray]):
237+
def setbytes(self, byteoffset: int, value: Union[bytes, bytearray]):
237238
"""
238239
@details
239240
Function set `value` (`bytes` or `bytearray`) array object into device memory
@@ -311,7 +312,7 @@ def getbitbytes(self, bitoffset:int, bitcount:int)->bytes:
311312
"""
312313
return bytes(self.getbitbytearray(bitoffset, bitcount))
313314

314-
def setbitbytes(self, bitoffset:int, bitcount:int, value:type[bytes|bytearray]):
315+
def setbitbytes(self, bitoffset: int, bitcount: int, value: Union[bytes, bytearray]):
315316
"""
316317
@details
317318
Function set `value` (`bytes` or `bytearray`) array object into device memory

src/server/win_resource.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
IDI_ICON1 ICON DISCARDABLE "gui\\icons\\server.ico"
44

55
VS_VERSION_INFO VERSIONINFO
6-
FILEVERSION 0,4,4,0
7-
PRODUCTVERSION 0,4,4,0
6+
FILEVERSION 0,4,5,0
7+
PRODUCTVERSION 0,4,5,0
88
FILEFLAGSMASK 0x3fL
99
#ifdef _DEBUG
1010
FILEFLAGS VS_FF_DEBUG
@@ -21,11 +21,11 @@ VS_VERSION_INFO VERSIONINFO
2121
BEGIN
2222
VALUE "CompanyName", "\0"
2323
VALUE "FileDescription", "\0"
24-
VALUE "FileVersion", "0.4.4.0\0"
24+
VALUE "FileVersion", "0.4.5.0\0"
2525
VALUE "LegalCopyright", "\0"
2626
VALUE "OriginalFilename", "server.exe\0"
2727
VALUE "ProductName", "server\0"
28-
VALUE "ProductVersion", "0.4.4.0\0"
28+
VALUE "ProductVersion", "0.4.5.0\0"
2929
END
3030
END
3131
BLOCK "VarFileInfo"

0 commit comments

Comments
 (0)