python-can-hirain 0.1.0__tar.gz → 0.2.0__tar.gz
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.
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/PKG-INFO +3 -1
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/README.md +2 -0
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/pyproject.toml +1 -1
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/src/can_hirain/BasicStructure.py +54 -0
- python_can_hirain-0.2.0/src/can_hirain/TestBaseVCI.py +1019 -0
- python_can_hirain-0.2.0/src/can_hirain/hrcan.py +607 -0
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/src/demo/Test_Canfd.py +2 -2
- python_can_hirain-0.2.0/src/demo/Test_HRCan.py +1101 -0
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/src/demo/Test_can.py +1 -1
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/src/demo/Test_diag.py +2 -1
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/src/python_can_hirain.egg-info/PKG-INFO +3 -1
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/src/python_can_hirain.egg-info/SOURCES.txt +1 -1
- python_can_hirain-0.1.0/src/can_hirain/TestBaseVCI.py +0 -386
- python_can_hirain-0.1.0/src/can_hirain/config.py +0 -52
- python_can_hirain-0.1.0/src/can_hirain/hrcan.py +0 -581
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/LICENSE +0 -0
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/setup.cfg +0 -0
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/src/can_hirain/__init__.py +0 -0
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/src/demo/Test_env.py +0 -0
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/src/python_can_hirain.egg-info/dependency_links.txt +0 -0
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/src/python_can_hirain.egg-info/entry_points.txt +0 -0
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/src/python_can_hirain.egg-info/requires.txt +0 -0
- {python_can_hirain-0.1.0 → python_can_hirain-0.2.0}/src/python_can_hirain.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-can-hirain
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.2.0
|
|
4
4
|
Summary: python-can interface plugin for Hirain
|
|
5
5
|
Author-email: Jingwei Hirain <fei.guo@hirain.com>
|
|
6
6
|
License: MIT
|
|
@@ -43,6 +43,7 @@ with can.Bus(interface="hrcan", channel=0, # 激活通道0为CANFD通道
|
|
|
43
43
|
'listenFlag' : 0, # 0-正常状态,1-通道为仅监听状态,不给ACK响应
|
|
44
44
|
'baudrate': 500_000,
|
|
45
45
|
'samplePoint': TestBaseVCI_SAMPLEPOINT.SAMPLE_75}]) as bus:
|
|
46
|
+
pass
|
|
46
47
|
# 初始化 CANFD 通道
|
|
47
48
|
with can.Bus(interface="hrcan", channel=0, # 激活通道0为CANFD通道
|
|
48
49
|
configs = [{
|
|
@@ -53,6 +54,7 @@ with can.Bus(interface="hrcan", channel=0, # 激活通道0为CANFD通道
|
|
|
53
54
|
'dbrBaudrate': 2000_000,
|
|
54
55
|
'abrSamplePoint': TestBaseVCI_SAMPLEPOINT.SAMPLE_80,
|
|
55
56
|
'dbrSamplePoint': TestBaseVCI_SAMPLEPOINT.SAMPLE_80,}]) as bus:
|
|
57
|
+
pass
|
|
56
58
|
```
|
|
57
59
|
|
|
58
60
|
|
|
@@ -28,6 +28,7 @@ with can.Bus(interface="hrcan", channel=0, # 激活通道0为CANFD通道
|
|
|
28
28
|
'listenFlag' : 0, # 0-正常状态,1-通道为仅监听状态,不给ACK响应
|
|
29
29
|
'baudrate': 500_000,
|
|
30
30
|
'samplePoint': TestBaseVCI_SAMPLEPOINT.SAMPLE_75}]) as bus:
|
|
31
|
+
pass
|
|
31
32
|
# 初始化 CANFD 通道
|
|
32
33
|
with can.Bus(interface="hrcan", channel=0, # 激活通道0为CANFD通道
|
|
33
34
|
configs = [{
|
|
@@ -38,6 +39,7 @@ with can.Bus(interface="hrcan", channel=0, # 激活通道0为CANFD通道
|
|
|
38
39
|
'dbrBaudrate': 2000_000,
|
|
39
40
|
'abrSamplePoint': TestBaseVCI_SAMPLEPOINT.SAMPLE_80,
|
|
40
41
|
'dbrSamplePoint': TestBaseVCI_SAMPLEPOINT.SAMPLE_80,}]) as bus:
|
|
42
|
+
pass
|
|
41
43
|
```
|
|
42
44
|
|
|
43
45
|
|
|
@@ -1605,3 +1605,57 @@ class ReplayPack(ctypes.Structure):
|
|
|
1605
1605
|
_fields_ = [("ucChannelIndex", ctypes.c_ubyte),
|
|
1606
1606
|
("unDeltaTime", ctypes.c_uint),
|
|
1607
1607
|
("canMsg", GET_CAN_TRACE)]
|
|
1608
|
+
|
|
1609
|
+
|
|
1610
|
+
class TestBaseVCI_ChlMode:
|
|
1611
|
+
CAN = 0
|
|
1612
|
+
CANFD = 1
|
|
1613
|
+
|
|
1614
|
+
|
|
1615
|
+
class TestBaseVCI_SAMPLEPOINT:
|
|
1616
|
+
SAMPLE_75 = 0
|
|
1617
|
+
SAMPLE_50 = 1
|
|
1618
|
+
SAMPLE_52_5 = 2
|
|
1619
|
+
SAMPLE_55 = 3
|
|
1620
|
+
SAMPLE_57_5 = 4
|
|
1621
|
+
SAMPLE_60 = 5
|
|
1622
|
+
SAMPLE_61_25 = 6
|
|
1623
|
+
SAMPLE_62_5 = 7
|
|
1624
|
+
SAMPLE_63_75 = 8
|
|
1625
|
+
SAMPLE_65 = 9
|
|
1626
|
+
SAMPLE_66_25 = 10
|
|
1627
|
+
SAMPLE_67_5 = 11
|
|
1628
|
+
SAMPLE_68 = 12
|
|
1629
|
+
SAMPLE_68_75 = 13
|
|
1630
|
+
SAMPLE_70 = 14
|
|
1631
|
+
SAMPLE_71_25 = 15
|
|
1632
|
+
SAMPLE_72_5 = 16
|
|
1633
|
+
SAMPLE_73_75 = 17
|
|
1634
|
+
SAMPLE_76_25 = 18
|
|
1635
|
+
SAMPLE_77_5 = 19
|
|
1636
|
+
SAMPLE_78_75 = 20
|
|
1637
|
+
SAMPLE_80 = 21
|
|
1638
|
+
SAMPLE_81_25 = 22
|
|
1639
|
+
SAMPLE_82_5 = 23
|
|
1640
|
+
SAMPLE_85 = 24
|
|
1641
|
+
SAMPLE_87_5 = 25
|
|
1642
|
+
SAMPLE_90 = 26
|
|
1643
|
+
SAMPLE_92_5 = 27
|
|
1644
|
+
SAMPLE_95 = 28
|
|
1645
|
+
|
|
1646
|
+
class CAN_LISTEN_MODE:
|
|
1647
|
+
NORMAL_TRANSMIT = 0
|
|
1648
|
+
BUS_LISTEN = 1
|
|
1649
|
+
|
|
1650
|
+
|
|
1651
|
+
class N_Parameter:
|
|
1652
|
+
N_STmin = 0x01
|
|
1653
|
+
N_BS = 0x02
|
|
1654
|
+
N_Cs = 0x03
|
|
1655
|
+
N_Bs = 0x04
|
|
1656
|
+
N_Cr = 0x05
|
|
1657
|
+
N_Opt = 0x06
|
|
1658
|
+
|
|
1659
|
+
class CANMType:
|
|
1660
|
+
MTYPE_LOCAL = 0x01
|
|
1661
|
+
MTYPE_REMOTE = 0x02
|