pyxcp 0.22.23__cp312-cp312-win_amd64.whl → 0.22.25__cp312-cp312-win_amd64.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.
Potentially problematic release.
This version of pyxcp might be problematic. Click here for more details.
- pyxcp/__init__.py +1 -1
- pyxcp/cpp_ext/cpp_ext.cp310-win_amd64.pyd +0 -0
- pyxcp/cpp_ext/cpp_ext.cp311-win_amd64.pyd +0 -0
- pyxcp/cpp_ext/cpp_ext.cp312-win_amd64.pyd +0 -0
- pyxcp/cpp_ext/cpp_ext.cp38-win_amd64.pyd +0 -0
- pyxcp/cpp_ext/cpp_ext.cp39-win_amd64.pyd +0 -0
- pyxcp/cpp_ext/daqlist.hpp +12 -6
- pyxcp/cpp_ext/extension_wrapper.cpp +5 -2
- pyxcp/daq_stim/__init__.py +6 -2
- pyxcp/daq_stim/stim.cp310-win_amd64.pyd +0 -0
- pyxcp/daq_stim/stim.cp311-win_amd64.pyd +0 -0
- pyxcp/daq_stim/stim.cp312-win_amd64.pyd +0 -0
- pyxcp/daq_stim/stim.cp38-win_amd64.pyd +0 -0
- pyxcp/daq_stim/stim.cp39-win_amd64.pyd +0 -0
- pyxcp/daq_stim/stim_wrapper.cpp +3 -1
- pyxcp/examples/run_daq.py +36 -26
- pyxcp/master/master.py +204 -187
- pyxcp/recorder/rekorder.cp310-win_amd64.pyd +0 -0
- pyxcp/recorder/rekorder.cp311-win_amd64.pyd +0 -0
- pyxcp/recorder/rekorder.cp312-win_amd64.pyd +0 -0
- pyxcp/recorder/rekorder.cp38-win_amd64.pyd +0 -0
- pyxcp/recorder/rekorder.cp39-win_amd64.pyd +0 -0
- pyxcp/types.py +2 -1
- {pyxcp-0.22.23.dist-info → pyxcp-0.22.25.dist-info}/METADATA +1 -1
- {pyxcp-0.22.23.dist-info → pyxcp-0.22.25.dist-info}/RECORD +28 -28
- {pyxcp-0.22.23.dist-info → pyxcp-0.22.25.dist-info}/LICENSE +0 -0
- {pyxcp-0.22.23.dist-info → pyxcp-0.22.25.dist-info}/WHEEL +0 -0
- {pyxcp-0.22.23.dist-info → pyxcp-0.22.25.dist-info}/entry_points.txt +0 -0
pyxcp/__init__.py
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
pyxcp/cpp_ext/daqlist.hpp
CHANGED
|
@@ -15,10 +15,9 @@ class DaqList {
|
|
|
15
15
|
|
|
16
16
|
DaqList(
|
|
17
17
|
std::string_view meas_name, std::uint16_t event_num, bool stim, bool enable_timestamps,
|
|
18
|
-
const std::vector<daq_list_initialzer_t>& measurements
|
|
18
|
+
const std::vector<daq_list_initialzer_t>& measurements, std::uint8_t priority=0x00, std::uint8_t prescaler=0x01
|
|
19
19
|
) :
|
|
20
|
-
m_name(meas_name), m_event_num(event_num), m_stim(stim), m_enable_timestamps(enable_timestamps) {
|
|
21
|
-
// std::cout << "DAQ-List: " << meas_name << " " << event_num << " " << stim << " " << enable_timestamps << std::endl;
|
|
20
|
+
m_name(meas_name), m_event_num(event_num), m_priority(priority), m_prescaler(prescaler), m_stim(stim), m_enable_timestamps(enable_timestamps) {
|
|
22
21
|
for (const auto& measurement : measurements) {
|
|
23
22
|
auto const& [name, address, ext, dt_name] = measurement;
|
|
24
23
|
m_measurements.emplace_back(McObject(name, address, static_cast<std::uint8_t>(ext), 0, dt_name));
|
|
@@ -37,6 +36,14 @@ class DaqList {
|
|
|
37
36
|
return m_event_num;
|
|
38
37
|
}
|
|
39
38
|
|
|
39
|
+
std::uint8_t get_priority() const {
|
|
40
|
+
return m_priority;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
std::uint8_t get_prescaler() const {
|
|
44
|
+
return m_prescaler;
|
|
45
|
+
}
|
|
46
|
+
|
|
40
47
|
void set_event_num(std::uint16_t event_num) {
|
|
41
48
|
m_event_num = event_num;
|
|
42
49
|
}
|
|
@@ -171,9 +178,6 @@ class DaqList {
|
|
|
171
178
|
ss << "\"" << header << "\",";
|
|
172
179
|
}
|
|
173
180
|
ss << "\n]";
|
|
174
|
-
|
|
175
|
-
// using flatten_odts_t = std::vector<std::vector<std::tuple<std::string, std::uint32_t, std::uint8_t, std::uint16_t,
|
|
176
|
-
// std::int16_t>>>;
|
|
177
181
|
ss << ")";
|
|
178
182
|
return ss.str();
|
|
179
183
|
}
|
|
@@ -185,6 +189,8 @@ class DaqList {
|
|
|
185
189
|
|
|
186
190
|
std::string m_name;
|
|
187
191
|
std::uint16_t m_event_num;
|
|
192
|
+
std::uint8_t m_priority;
|
|
193
|
+
std::uint8_t m_prescaler;
|
|
188
194
|
bool m_stim;
|
|
189
195
|
bool m_enable_timestamps;
|
|
190
196
|
std::vector<McObject> m_measurements;
|
|
@@ -59,12 +59,15 @@ PYBIND11_MODULE(cpp_ext, m) {
|
|
|
59
59
|
|
|
60
60
|
py::class_<DaqList>(m, "DaqList")
|
|
61
61
|
.def(
|
|
62
|
-
py::init<std::string_view, std::uint16_t, bool, bool, const std::vector<DaqList::daq_list_initialzer_t
|
|
63
|
-
"event_num"_a, "stim"_a, "enable_timestamps"_a, "measurements"_a
|
|
62
|
+
py::init<std::string_view, std::uint16_t, bool, bool, const std::vector<DaqList::daq_list_initialzer_t>&,
|
|
63
|
+
std::uint8_t, std::uint8_t>(), "name"_a, "event_num"_a, "stim"_a, "enable_timestamps"_a, "measurements"_a,
|
|
64
|
+
"priority"_a=0, "prescaler"_a=1
|
|
64
65
|
)
|
|
65
66
|
.def("__repr__", [](const DaqList& self) { return self.to_string(); })
|
|
66
67
|
.def_property("name", &DaqList::get_name, nullptr)
|
|
67
68
|
.def_property("event_num", &DaqList::get_event_num, &DaqList::set_event_num)
|
|
69
|
+
.def_property("priority", &DaqList::get_priority, nullptr)
|
|
70
|
+
.def_property("prescaler", &DaqList::get_prescaler, nullptr)
|
|
68
71
|
.def_property("stim", &DaqList::get_stim, nullptr)
|
|
69
72
|
.def_property("enable_timestamps", &DaqList::get_enable_timestamps, nullptr)
|
|
70
73
|
.def_property("measurements", &DaqList::get_measurements, nullptr)
|
pyxcp/daq_stim/__init__.py
CHANGED
|
@@ -38,7 +38,7 @@ class DaqProcessor:
|
|
|
38
38
|
def setup(self, start_datetime: Optional[CurrentDatetime] = None, write_multiple: bool = True):
|
|
39
39
|
if not self.xcp_master.slaveProperties.supportsDaq:
|
|
40
40
|
raise RuntimeError("DAQ functionality is not supported.")
|
|
41
|
-
self.daq_info = self.xcp_master.getDaqInfo()
|
|
41
|
+
self.daq_info = self.xcp_master.getDaqInfo(include_event_lists=False)
|
|
42
42
|
if start_datetime is None:
|
|
43
43
|
start_datetime = CurrentDatetime(time_ns())
|
|
44
44
|
self.start_datetime = start_datetime
|
|
@@ -134,7 +134,11 @@ class DaqProcessor:
|
|
|
134
134
|
## mode |= 0x20
|
|
135
135
|
###
|
|
136
136
|
self.xcp_master.setDaqListMode(
|
|
137
|
-
|
|
137
|
+
daq_list_number=i,
|
|
138
|
+
mode=mode,
|
|
139
|
+
event_channel_number=daq_list.event_num,
|
|
140
|
+
prescaler=daq_list.prescaler,
|
|
141
|
+
priority=daq_list.priority,
|
|
138
142
|
)
|
|
139
143
|
res = self.xcp_master.startStopDaqList(0x02, i)
|
|
140
144
|
self._first_pids.append(res.firstPid)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
pyxcp/daq_stim/stim_wrapper.cpp
CHANGED
|
@@ -15,7 +15,9 @@ using namespace py::literals;
|
|
|
15
15
|
|
|
16
16
|
PYBIND11_MODULE(stim, m) {
|
|
17
17
|
py::class_<DaqEventInfo>(m, "DaqEventInfo")
|
|
18
|
-
.def(py::init<const std::string&, std::int8_t, std::size_t, std::size_t, std::size_t, std::string_view, bool, bool, bool>()
|
|
18
|
+
.def(py::init<const std::string&, std::int8_t, std::size_t, std::size_t, std::size_t, std::string_view, bool, bool, bool>(),
|
|
19
|
+
"name"_a, "type_code"_a, "cycle"_a, "max_daq_lists"_a, "priority"_a, "consistency"_a, "daq_supported"_a,
|
|
20
|
+
"stim_supported"_a, "packed_supported"_a
|
|
19
21
|
);
|
|
20
22
|
|
|
21
23
|
py::class_<Stim>(m, "Stim")
|
pyxcp/examples/run_daq.py
CHANGED
|
@@ -8,7 +8,7 @@ from pyxcp.daq_stim import DaqList, DaqRecorder, DaqToCsv # noqa: F401
|
|
|
8
8
|
|
|
9
9
|
ap = ArgumentParser(description="DAQ test")
|
|
10
10
|
|
|
11
|
-
XCP_LITE =
|
|
11
|
+
XCP_LITE = False
|
|
12
12
|
|
|
13
13
|
#
|
|
14
14
|
# NOTE: UPDATE TO CORRECT ADDRESSES BEFORE RUNNING!!!
|
|
@@ -17,40 +17,44 @@ if XCP_LITE:
|
|
|
17
17
|
# Vectorgrp XCPlite.
|
|
18
18
|
DAQ_LISTS = [
|
|
19
19
|
DaqList(
|
|
20
|
-
"part_1",
|
|
21
|
-
0,
|
|
22
|
-
False,
|
|
23
|
-
False,
|
|
24
|
-
[
|
|
20
|
+
name="part_1",
|
|
21
|
+
event_num=0,
|
|
22
|
+
stim=False,
|
|
23
|
+
enable_timestamps=False,
|
|
24
|
+
measurements=[
|
|
25
25
|
("byteCounter", 0x00023648, 0, "U8"),
|
|
26
26
|
("wordCounter", 0x0002364C, 0, "U16"),
|
|
27
27
|
("dwordCounter", 0x00023650, 0, "U32"),
|
|
28
28
|
("sbyteCounter", 0x00023649, 0, "I8"),
|
|
29
29
|
],
|
|
30
|
+
priority=0,
|
|
31
|
+
prescaler=1,
|
|
30
32
|
),
|
|
31
33
|
DaqList(
|
|
32
|
-
"part_2",
|
|
33
|
-
7,
|
|
34
|
-
False,
|
|
35
|
-
False,
|
|
36
|
-
[
|
|
34
|
+
name="part_2",
|
|
35
|
+
event_num=7,
|
|
36
|
+
stim=False,
|
|
37
|
+
enable_timestamps=False,
|
|
38
|
+
measurements=[
|
|
37
39
|
("swordCounter", 0x00023654, 0, "I16"),
|
|
38
40
|
("sdwordCounter", 0x00023658, 0, "I32"),
|
|
39
41
|
("channel1", 0x00023630, 0, "F64"),
|
|
40
42
|
("channel2", 0x00023638, 0, "F64"),
|
|
41
43
|
("channel3", 0x00023640, 0, "F64"),
|
|
42
44
|
],
|
|
45
|
+
priority=0,
|
|
46
|
+
prescaler=1,
|
|
43
47
|
),
|
|
44
48
|
]
|
|
45
49
|
else:
|
|
46
50
|
# XCPsim from CANape.
|
|
47
51
|
DAQ_LISTS = [
|
|
48
52
|
DaqList(
|
|
49
|
-
"pwm_stuff",
|
|
50
|
-
2,
|
|
51
|
-
False,
|
|
52
|
-
True,
|
|
53
|
-
[
|
|
53
|
+
name="pwm_stuff",
|
|
54
|
+
event_num=2,
|
|
55
|
+
stim=False,
|
|
56
|
+
enable_timestamps=True,
|
|
57
|
+
measurements=[
|
|
54
58
|
("channel1", 0x1BD004, 0, "F32"),
|
|
55
59
|
("period", 0x001C0028, 0, "F32"),
|
|
56
60
|
("channel2", 0x1BD008, 0, "F32"),
|
|
@@ -58,13 +62,15 @@ else:
|
|
|
58
62
|
("PWM", 0x1BDDDF, 0, "U8"),
|
|
59
63
|
("Triangle", 0x1BDDDE, 0, "I8"),
|
|
60
64
|
],
|
|
65
|
+
priority=0,
|
|
66
|
+
prescaler=1,
|
|
61
67
|
),
|
|
62
68
|
DaqList(
|
|
63
|
-
"bytes",
|
|
64
|
-
1,
|
|
65
|
-
False,
|
|
66
|
-
True,
|
|
67
|
-
[
|
|
69
|
+
name="bytes",
|
|
70
|
+
event_num=1,
|
|
71
|
+
stim=False,
|
|
72
|
+
enable_timestamps=True,
|
|
73
|
+
measurements=[
|
|
68
74
|
("TestByte_000", 0x1BE11C, 0, "U8"),
|
|
69
75
|
("TestByte_015", 0x1BE158, 0, "U8"),
|
|
70
76
|
("TestByte_016", 0x1BE15C, 0, "U8"),
|
|
@@ -97,13 +103,15 @@ else:
|
|
|
97
103
|
("TestByte_344", 0x1BE67C, 0, "U8"),
|
|
98
104
|
("TestByte_346", 0x1BE684, 0, "U8"),
|
|
99
105
|
],
|
|
106
|
+
priority=0,
|
|
107
|
+
prescaler=1,
|
|
100
108
|
),
|
|
101
109
|
DaqList(
|
|
102
|
-
"words",
|
|
103
|
-
3,
|
|
104
|
-
False,
|
|
105
|
-
True,
|
|
106
|
-
[
|
|
110
|
+
name="words",
|
|
111
|
+
event_num=3,
|
|
112
|
+
stim=False,
|
|
113
|
+
enable_timestamps=True,
|
|
114
|
+
measurements=[
|
|
107
115
|
("TestWord_001", 0x1BE120, 0, "U16"),
|
|
108
116
|
("TestWord_003", 0x1BE128, 0, "U16"),
|
|
109
117
|
("TestWord_004", 0x1BE12C, 0, "U16"),
|
|
@@ -114,6 +122,8 @@ else:
|
|
|
114
122
|
("TestWord_009", 0x1BE140, 0, "U16"),
|
|
115
123
|
("TestWord_011", 0x1BE148, 0, "U16"),
|
|
116
124
|
],
|
|
125
|
+
priority=0,
|
|
126
|
+
prescaler=1,
|
|
117
127
|
),
|
|
118
128
|
]
|
|
119
129
|
|