solax-py-library 1.0.0.15__py3-none-any.whl → 1.0.0.17__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.
- solax_py_library/__init__.py +1 -1
- solax_py_library/{upload/errors/base.py → exception.py} +10 -10
- solax_py_library/snap_shot/__init__.py +3 -4
- solax_py_library/snap_shot/constant/__init__.py +5 -0
- solax_py_library/snap_shot/constant/crc_table.py +258 -0
- solax_py_library/snap_shot/core/__init__.py +7 -0
- solax_py_library/snap_shot/{base_modbus.py → core/base_modbus.py} +14 -14
- solax_py_library/snap_shot/{core.py → core/snap_shot.py} +249 -219
- solax_py_library/snap_shot/exceptions/__init__.py +3 -0
- solax_py_library/snap_shot/exceptions/snap_shot.py +9 -0
- solax_py_library/snap_shot/test/__init__.py +0 -0
- solax_py_library/snap_shot/types/__init__.py +15 -0
- solax_py_library/snap_shot/types/address.py +39 -0
- solax_py_library/upload/__init__.py +3 -3
- solax_py_library/upload/api/__init__.py +3 -3
- solax_py_library/upload/api/service.py +24 -24
- solax_py_library/upload/core/__init__.py +3 -3
- solax_py_library/upload/core/data_adapter/__init__.py +5 -5
- solax_py_library/upload/core/data_adapter/base.py +9 -9
- solax_py_library/upload/core/data_adapter/csv.py +26 -26
- solax_py_library/upload/core/upload_service/__init__.py +15 -15
- solax_py_library/upload/core/upload_service/base.py +43 -43
- solax_py_library/upload/core/upload_service/ftp.py +97 -86
- solax_py_library/upload/{errors → exceptions}/__init__.py +10 -10
- solax_py_library/upload/{errors → exceptions}/upload_error.py +21 -21
- solax_py_library/upload/test/test_ftp.py +81 -40
- solax_py_library/upload/types/__init__.py +11 -11
- solax_py_library/upload/types/client.py +19 -19
- solax_py_library/upload/types/ftp.py +37 -37
- solax_py_library/utils/__init__.py +0 -0
- solax_py_library/{snap_shot/untils.py → utils/common.py} +19 -17
- solax_py_library/{snap_shot → utils}/parser.py +225 -224
- {solax_py_library-1.0.0.15.dist-info → solax_py_library-1.0.0.17.dist-info}/METADATA +4 -4
- solax_py_library-1.0.0.17.dist-info/RECORD +36 -0
- {solax_py_library-1.0.0.15.dist-info → solax_py_library-1.0.0.17.dist-info}/WHEEL +1 -1
- solax_py_library/snap_shot/address.py +0 -67
- solax_py_library/snap_shot/exceptions.py +0 -4
- solax_py_library-1.0.0.15.dist-info/RECORD +0 -29
@@ -1,67 +0,0 @@
|
|
1
|
-
from enum import Enum
|
2
|
-
|
3
|
-
|
4
|
-
class SnapshotMCUSource(Enum):
|
5
|
-
MCU_SOURCE_MDSP = 0
|
6
|
-
MCU_SOURCE_SDSP = 1
|
7
|
-
|
8
|
-
|
9
|
-
class SnapshotExportDevice(Enum):
|
10
|
-
EXPORT_DEVICE_UART = 0
|
11
|
-
EXPORT_DEVICE_USB = 1
|
12
|
-
|
13
|
-
|
14
|
-
class SnapshotStartResult(Enum):
|
15
|
-
SNAPSHOT_START_START = 0xAAAA
|
16
|
-
SNAPSHOT_START_SUCCESS = 0xA5A5
|
17
|
-
SNAPSHOT_START_FAILED = 0x5A5A
|
18
|
-
SNAPSHOT_START_STOP = 0xBBBB
|
19
|
-
|
20
|
-
|
21
|
-
class SnapshotRegisterAddress(Enum):
|
22
|
-
SNAPSHOT_REGISTERADDRESS_MCUSOURCE = 0x4011
|
23
|
-
SNAPSHOT_REGISTERADDRESS_EXPORTDEVICE = 0x4012
|
24
|
-
SNAPSHOT_REGISTERADDRESS_START = 0x4013
|
25
|
-
SNAPSHOT_REGISTERADDRESS_TOTALNUMBER = 0x4070
|
26
|
-
SNAPSHOT_REGISTERADDRESS_SNAPSHOTINDEX = 0x4071
|
27
|
-
SNAPSHOT_REGISTERADDRESS_PACKDATASTATUS = 0x4072
|
28
|
-
SNAPSHOT_REGISTERADDRESS_DATASIZE = 0x4073
|
29
|
-
SNAPSHOT_REGISTERADDRESS_CHANNELNUMBER = 0x4074
|
30
|
-
SNAPSHOT_REGISTERADDRESS_CHANNELDATASIZE = 0x4075
|
31
|
-
SNAPSHOT_REGISTERADDRESS_PACKINDEX = 0x407F
|
32
|
-
SNAPSHOT_REGISTERADDRESS_PACKDATA = 0x4080
|
33
|
-
|
34
|
-
|
35
|
-
CRC_Table = [0x0000, 0x8005, 0x1800f, 0x1000a, 0x3801b, 0x3001e, 0x20014, 0x28011, 0x78033, 0x70036,
|
36
|
-
0x6003c, 0x68039, 0x40028, 0x4802d, 0x58027, 0x50022, 0xf8063, 0xf0066, 0xe006c, 0xe8069,
|
37
|
-
0xc0078, 0xc807d, 0xd8077, 0xd0072, 0x80050, 0x88055, 0x9805f, 0x9005a, 0xb804b, 0xb004e,
|
38
|
-
0xa0044, 0xa8041, 0x1f80c3, 0x1f00c6, 0x1e00cc, 0x1e80c9, 0x1c00d8, 0x1c80dd, 0x1d80d7, 0x1d00d2,
|
39
|
-
0x1800f0, 0x1880f5, 0x1980ff, 0x1900fa, 0x1b80eb, 0x1b00ee, 0x1a00e4, 0x1a80e1, 0x1000a0, 0x1080a5,
|
40
|
-
0x1180af, 0x1100aa, 0x1380bb, 0x1300be, 0x1200b4, 0x1280b1, 0x178093, 0x170096, 0x16009c, 0x168099,
|
41
|
-
0x140088, 0x14808d, 0x158087, 0x150082, 0x3f8183, 0x3f0186, 0x3e018c, 0x3e8189, 0x3c0198, 0x3c819d,
|
42
|
-
0x3d8197, 0x3d0192, 0x3801b0, 0x3881b5, 0x3981bf, 0x3901ba, 0x3b81ab, 0x3b01ae, 0x3a01a4, 0x3a81a1,
|
43
|
-
0x3001e0, 0x3081e5, 0x3181ef, 0x3101ea, 0x3381fb, 0x3301fe, 0x3201f4, 0x3281f1, 0x3781d3, 0x3701d6,
|
44
|
-
0x3601dc, 0x3681d9, 0x3401c8, 0x3481cd, 0x3581c7, 0x3501c2, 0x200140, 0x208145, 0x21814f, 0x21014a,
|
45
|
-
0x23815b, 0x23015e, 0x220154, 0x228151, 0x278173, 0x270176, 0x26017c, 0x268179, 0x240168, 0x24816d,
|
46
|
-
0x258167, 0x250162, 0x2f8123, 0x2f0126, 0x2e012c, 0x2e8129, 0x2c0138, 0x2c813d, 0x2d8137, 0x2d0132,
|
47
|
-
0x280110, 0x288115, 0x29811f, 0x29011a, 0x2b810b, 0x2b010e, 0x2a0104, 0x2a8101, 0x7f8303, 0x7f0306,
|
48
|
-
0x7e030c, 0x7e8309, 0x7c0318, 0x7c831d, 0x7d8317, 0x7d0312, 0x780330, 0x788335, 0x79833f, 0x79033a,
|
49
|
-
0x7b832b, 0x7b032e, 0x7a0324, 0x7a8321, 0x700360, 0x708365, 0x71836f, 0x71036a, 0x73837b, 0x73037e,
|
50
|
-
0x720374, 0x728371, 0x778353, 0x770356, 0x76035c, 0x768359, 0x740348, 0x74834d, 0x758347, 0x750342,
|
51
|
-
0x6003c0, 0x6083c5, 0x6183cf, 0x6103ca, 0x6383db, 0x6303de, 0x6203d4, 0x6283d1, 0x6783f3, 0x6703f6,
|
52
|
-
0x6603fc, 0x6683f9, 0x6403e8, 0x6483ed, 0x6583e7, 0x6503e2, 0x6f83a3, 0x6f03a6, 0x6e03ac, 0x6e83a9,
|
53
|
-
0x6c03b8, 0x6c83bd, 0x6d83b7, 0x6d03b2, 0x680390, 0x688395, 0x69839f, 0x69039a, 0x6b838b, 0x6b038e,
|
54
|
-
0x6a0384, 0x6a8381, 0x400280, 0x408285, 0x41828f, 0x41028a, 0x43829b, 0x43029e, 0x420294, 0x428291,
|
55
|
-
0x4782b3, 0x4702b6, 0x4602bc, 0x4682b9, 0x4402a8, 0x4482ad, 0x4582a7, 0x4502a2, 0x4f82e3, 0x4f02e6,
|
56
|
-
0x4e02ec, 0x4e82e9, 0x4c02f8, 0x4c82fd, 0x4d82f7, 0x4d02f2, 0x4802d0, 0x4882d5, 0x4982df, 0x4902da,
|
57
|
-
0x4b82cb, 0x4b02ce, 0x4a02c4, 0x4a82c1, 0x5f8243, 0x5f0246, 0x5e024c, 0x5e8249, 0x5c0258, 0x5c825d,
|
58
|
-
0x5d8257, 0x5d0252, 0x580270, 0x588275, 0x59827f, 0x59027a, 0x5b826b, 0x5b026e, 0x5a0264, 0x5a8261,
|
59
|
-
0x500220, 0x508225, 0x51822f, 0x51022a, 0x53823b, 0x53023e, 0x520234, 0x528231, 0x578213, 0x570216,
|
60
|
-
0x56021c, 0x568219, 0x540208, 0x54820d, 0x558207, 0x550202]
|
61
|
-
|
62
|
-
|
63
|
-
class CommandType(Enum):
|
64
|
-
ACK = 0x80 # 接收应答
|
65
|
-
TOTAL_PACKETS = 0x81 # 上报总包数
|
66
|
-
DATA_PACKET = 0x82 # 具体分包数据
|
67
|
-
ERROR = 0x83 # 报错应答
|
@@ -1,29 +0,0 @@
|
|
1
|
-
solax_py_library/__init__.py,sha256=zLUfOeLUGy1sFFu4tZI8cDlfuEATRZ3VcYywVhPLObE,35
|
2
|
-
solax_py_library/snap_shot/__init__.py,sha256=kcu0XnVuMAHv2YBCJ5W8XAphUTrR3aeIqoJLVrMxiGM,100
|
3
|
-
solax_py_library/snap_shot/address.py,sha256=T4za0U5My5K-0u42unze7g4Ue0qDsxgu-hy-4jZbXuU,4071
|
4
|
-
solax_py_library/snap_shot/base_modbus.py,sha256=xDEmIpr1dgZZw2SmFwDOdifz1NJNgxoBtfsZRQzNiOw,418
|
5
|
-
solax_py_library/snap_shot/core.py,sha256=D4jaSCo35AOfq5lZEtNXV0OoRFMBx3747_4QeKPC9Xg,9830
|
6
|
-
solax_py_library/snap_shot/exceptions.py,sha256=ky-i7TNy7fZVAJ2Z2sdGPTIYNQmxieYqKl_2bUnnwn0,95
|
7
|
-
solax_py_library/snap_shot/parser.py,sha256=OqSorkrCYI69E-m4eAU8zmbkRM1BO5pKv5I9kDpgLV8,7866
|
8
|
-
solax_py_library/snap_shot/untils.py,sha256=vVFq-3vcJeO4fShbl0BFZMXpXw_xCBQ2S2_xzdY9koU,628
|
9
|
-
solax_py_library/upload/__init__.py,sha256=Ilou-M__XAp9eNs68Eoc8_xtRAiNaEOmwxFzLEr-DVg,88
|
10
|
-
solax_py_library/upload/api/__init__.py,sha256=VHRXkLLQKsIeUi4T-osSsURmcJS6cM5rhhvUwF6aLG8,87
|
11
|
-
solax_py_library/upload/api/service.py,sha256=kEl6aa1f92frRdTfF37U1Mxd0lBRXAn5gZNulQV_Eno,798
|
12
|
-
solax_py_library/upload/core/__init__.py,sha256=LxE2LrHB9vfyGwb1YbxHfbeyfdOhlSZdXvDp2L2Jtvs,92
|
13
|
-
solax_py_library/upload/core/data_adapter/__init__.py,sha256=AAt7SndlSM3_0iE9q7Uevg51PraUWgoFOgYg9XBKktM,121
|
14
|
-
solax_py_library/upload/core/data_adapter/base.py,sha256=HoN9WVLzOjt-0lg7x0DR0H0Fflg7V97WJmtgBZeY37g,179
|
15
|
-
solax_py_library/upload/core/data_adapter/csv.py,sha256=QaTjHw_aGZyEPUkr2AfBh5ITgRDE9dWN2d8sXh1xlZc,887
|
16
|
-
solax_py_library/upload/core/upload_service/__init__.py,sha256=iVlmUxDNBroqA0yBGf4DnIt-3RMdBoUr2kxuP-z1Y_8,284
|
17
|
-
solax_py_library/upload/core/upload_service/base.py,sha256=U4wyynOtE1dYT11nstPgbCjnEgknqzsk6wQqxfM1MC4,955
|
18
|
-
solax_py_library/upload/core/upload_service/ftp.py,sha256=3ADAJlBLo8wLYmHn6pj_gw3S6vYnCdiSu3STEh4sfRg,2844
|
19
|
-
solax_py_library/upload/errors/__init__.py,sha256=xw_PXnYZ5RFaCFXCAEMY5iLxjlRYQbLXrwOZn2sU86I,253
|
20
|
-
solax_py_library/upload/errors/base.py,sha256=liM48E-yaHk-FseSP1Bc8BhV2gnIuO0_wfjTGL0Zxwo,268
|
21
|
-
solax_py_library/upload/errors/upload_error.py,sha256=moPtHq49engj1R9e3CFunbJLg1z6GEGPI2CenhIvtRc,430
|
22
|
-
solax_py_library/upload/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
23
|
-
solax_py_library/upload/test/test_ftp.py,sha256=ROM5tlWdRvyxiKUIx72FAEqMcvSlHcw_sn9ovja-Yaw,1460
|
24
|
-
solax_py_library/upload/types/__init__.py,sha256=mgfwypAgvWNfhLMOK-osoF6Nf5QSn-uB02MkaH4m5pY,255
|
25
|
-
solax_py_library/upload/types/client.py,sha256=KqrwTRniunJCV6HjaXkZAYzFryYxXirmIWmfh5V93qI,511
|
26
|
-
solax_py_library/upload/types/ftp.py,sha256=kgjB0DyUQCGLH2iZncMuuRWKrxhh1fBD_KTu_PeEPUE,716
|
27
|
-
solax_py_library-1.0.0.15.dist-info/METADATA,sha256=3HbJj9xBAv9-wP8dZ4CeZV3u_2DgeXSh3XPEIk0BqbU,1789
|
28
|
-
solax_py_library-1.0.0.15.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
29
|
-
solax_py_library-1.0.0.15.dist-info/RECORD,,
|