pyxcp 0.25.1__cp314-cp314-macosx_11_0_arm64.whl → 0.25.9__cp314-cp314-macosx_11_0_arm64.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.
Files changed (64) hide show
  1. pyxcp/__init__.py +2 -2
  2. pyxcp/cmdline.py +14 -29
  3. pyxcp/config/__init__.py +1257 -1257
  4. pyxcp/cpp_ext/aligned_buffer.hpp +1 -1
  5. pyxcp/cpp_ext/cpp_ext.cpython-310-darwin.so +0 -0
  6. pyxcp/cpp_ext/cpp_ext.cpython-311-darwin.so +0 -0
  7. pyxcp/cpp_ext/cpp_ext.cpython-312-darwin.so +0 -0
  8. pyxcp/cpp_ext/cpp_ext.cpython-313-darwin.so +0 -0
  9. pyxcp/cpp_ext/cpp_ext.cpython-314-darwin.so +0 -0
  10. pyxcp/cpp_ext/extension_wrapper.cpp +79 -2
  11. pyxcp/cpp_ext/framing.hpp +1 -1
  12. pyxcp/cpp_ext/helper.hpp +280 -280
  13. pyxcp/cpp_ext/sxi_framing.hpp +1 -1
  14. pyxcp/daq_stim/__init__.py +95 -32
  15. pyxcp/daq_stim/optimize/binpacking.py +2 -2
  16. pyxcp/daq_stim/scheduler.cpp +8 -8
  17. pyxcp/errormatrix.py +2 -2
  18. pyxcp/examples/xcp_read_benchmark.py +2 -2
  19. pyxcp/examples/xcp_skel.py +1 -2
  20. pyxcp/examples/xcp_unlock.py +10 -12
  21. pyxcp/examples/xcp_user_supplied_driver.py +1 -2
  22. pyxcp/examples/xcphello.py +2 -15
  23. pyxcp/examples/xcphello_recorder.py +2 -2
  24. pyxcp/master/__init__.py +1 -0
  25. pyxcp/master/master.py +14 -20
  26. pyxcp/recorder/.idea/misc.xml +1 -1
  27. pyxcp/recorder/.idea/modules.xml +1 -1
  28. pyxcp/recorder/.idea/recorder.iml +1 -1
  29. pyxcp/recorder/.idea/vcs.xml +1 -1
  30. pyxcp/recorder/converter/__init__.py +4 -10
  31. pyxcp/recorder/reader.hpp +138 -138
  32. pyxcp/recorder/reco.py +1 -0
  33. pyxcp/recorder/rekorder.hpp +274 -274
  34. pyxcp/recorder/wrap.cpp +184 -184
  35. pyxcp/recorder/writer.hpp +302 -302
  36. pyxcp/scripts/xcp_daq_recorder.py +54 -0
  37. pyxcp/scripts/xcp_fetch_a2l.py +2 -2
  38. pyxcp/scripts/xcp_id_scanner.py +1 -2
  39. pyxcp/scripts/xcp_info.py +66 -51
  40. pyxcp/scripts/xcp_profile.py +1 -2
  41. pyxcp/tests/test_binpacking.py +1 -0
  42. pyxcp/tests/test_daq.py +1 -1
  43. pyxcp/tests/test_framing.py +1 -1
  44. pyxcp/tests/test_master.py +104 -83
  45. pyxcp/tests/test_transport.py +0 -1
  46. pyxcp/timing.py +1 -1
  47. pyxcp/transport/base.py +1 -1
  48. pyxcp/transport/can.py +1 -1
  49. pyxcp/transport/eth.py +1 -1
  50. pyxcp/transport/hdf5_policy.py +167 -0
  51. pyxcp/transport/sxi.py +1 -1
  52. pyxcp/transport/transport_ext.cpython-310-darwin.so +0 -0
  53. pyxcp/transport/transport_ext.cpython-311-darwin.so +0 -0
  54. pyxcp/transport/transport_ext.cpython-312-darwin.so +0 -0
  55. pyxcp/transport/transport_ext.cpython-313-darwin.so +0 -0
  56. pyxcp/transport/transport_ext.cpython-314-darwin.so +0 -0
  57. pyxcp/transport/usb_transport.py +1 -1
  58. pyxcp/{utils.py → utils/__init__.py} +1 -2
  59. pyxcp/utils/cli.py +78 -0
  60. {pyxcp-0.25.1.dist-info → pyxcp-0.25.9.dist-info}/METADATA +1 -1
  61. {pyxcp-0.25.1.dist-info → pyxcp-0.25.9.dist-info}/RECORD +64 -56
  62. {pyxcp-0.25.1.dist-info → pyxcp-0.25.9.dist-info}/WHEEL +1 -1
  63. {pyxcp-0.25.1.dist-info → pyxcp-0.25.9.dist-info}/entry_points.txt +0 -0
  64. {pyxcp-0.25.1.dist-info → pyxcp-0.25.9.dist-info}/licenses/LICENSE +0 -0
@@ -165,4 +165,4 @@ private:
165
165
  };
166
166
 
167
167
 
168
- #endif // __ALIGNED_BUFFER_HPP
168
+ #endif // __ALIGNED_BUFFER_HPP
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -22,6 +22,21 @@ class PyTimestampInfo : public TimestampInfo {
22
22
  using TimestampInfo::TimestampInfo;
23
23
  };
24
24
 
25
+ py::dict mcobject_asdict(const McObject& self) {
26
+ py::dict d;
27
+ d["name"] = self.get_name();
28
+ d["address"] = self.get_address();
29
+ d["ext"] = self.get_ext();
30
+ d["length"] = self.get_length();
31
+ d["data_type"] = self.get_data_type();
32
+ py::list components_list;
33
+ for (const auto& component : self.get_components()) {
34
+ components_list.append(mcobject_asdict(component));
35
+ }
36
+ d["components"] = components_list;
37
+ return d;
38
+ }
39
+
25
40
 
26
41
  PYBIND11_MODULE(cpp_ext, m) {
27
42
  m.doc() = "C++ extensions for pyXCP.";
@@ -43,6 +58,7 @@ PYBIND11_MODULE(cpp_ext, m) {
43
58
  .def_property_readonly("components", &McObject::get_components)
44
59
 
45
60
  .def("add_component", &McObject::add_component, "component"_a)
61
+ .def("asdict", &mcobject_asdict)
46
62
  .def("__eq__", [](const McObject& self, const McObject& other) { return self == other; })
47
63
  .def("__repr__", [](const McObject& self) { return to_string(self); })
48
64
  .def("__hash__", [](const McObject& self) { return self.get_hash(); })
@@ -54,6 +70,17 @@ PYBIND11_MODULE(cpp_ext, m) {
54
70
  .def_property("residual_capacity", &Bin::get_residual_capacity, &Bin::set_residual_capacity)
55
71
  .def_property("entries", &Bin::get_entries, nullptr)
56
72
  .def("append", &Bin::append)
73
+ .def("asdict", [](const Bin& self) {
74
+ py::dict d;
75
+ d["size"] = self.get_size();
76
+ d["residual_capacity"] = self.get_residual_capacity();
77
+ py::list entries_list;
78
+ for (const auto& entry : self.get_entries()) {
79
+ entries_list.append(mcobject_asdict(entry));
80
+ }
81
+ d["entries"] = entries_list;
82
+ return d;
83
+ })
57
84
  .def("__repr__", [](const Bin& self) { return to_string(self); })
58
85
  .def("__eq__", [](const Bin& self, const Bin& other) { return self == other; })
59
86
  .def("__len__", [](const Bin& self) { return std::size(self.get_entries()); });
@@ -69,7 +96,22 @@ PYBIND11_MODULE(cpp_ext, m) {
69
96
  .def_property("headers", &DaqListBase::get_headers, nullptr)
70
97
  .def_property("odt_count", &DaqListBase::get_odt_count, nullptr)
71
98
  .def_property("total_entries", &DaqListBase::get_total_entries, nullptr)
72
- .def_property("total_length", &DaqListBase::get_total_length, nullptr);
99
+ .def_property("total_length", &DaqListBase::get_total_length, nullptr)
100
+ .def("asdict", [](const DaqListBase& self) {
101
+ py::dict d;
102
+ d["name"] = self.get_name();
103
+ d["event_num"] = self.get_event_num();
104
+ d["priority"] = self.get_priority();
105
+ d["prescaler"] = self.get_prescaler();
106
+ d["stim"] = self.get_stim();
107
+ d["enable_timestamps"] = self.get_enable_timestamps();
108
+ d["measurements_opt"] = self.get_measurements_opt();
109
+ d["headers"] = self.get_headers();
110
+ d["odt_count"] = self.get_odt_count();
111
+ d["total_entries"] = self.get_total_entries();
112
+ d["total_length"] = self.get_total_length();
113
+ return d;
114
+ });
73
115
 
74
116
  py::class_<DaqList, DaqListBase, std::shared_ptr<DaqList>>(m, "DaqList")
75
117
  .def(
@@ -78,7 +120,27 @@ PYBIND11_MODULE(cpp_ext, m) {
78
120
  "priority"_a=0, "prescaler"_a=1
79
121
  )
80
122
  .def("__repr__", [](const DaqList& self) { return self.to_string(); })
81
- .def_property("measurements", &DaqList::get_measurements, nullptr);
123
+ .def_property("measurements", &DaqList::get_measurements, nullptr)
124
+ .def("asdict", [](const DaqList& self) {
125
+ py::dict d;
126
+ d["name"] = self.get_name();
127
+ d["event_num"] = self.get_event_num();
128
+ d["priority"] = self.get_priority();
129
+ d["prescaler"] = self.get_prescaler();
130
+ d["stim"] = self.get_stim();
131
+ d["enable_timestamps"] = self.get_enable_timestamps();
132
+ d["measurements_opt"] = self.get_measurements_opt();
133
+ d["headers"] = self.get_headers();
134
+ d["odt_count"] = self.get_odt_count();
135
+ d["total_entries"] = self.get_total_entries();
136
+ d["total_length"] = self.get_total_length();
137
+ py::list measurements_list;
138
+ for (const auto& measurement : self.get_measurements()) {
139
+ measurements_list.append(mcobject_asdict(measurement));
140
+ }
141
+ d["measurements"] = measurements_list;
142
+ return d;
143
+ });
82
144
 
83
145
  py::class_<PredefinedDaqList, DaqListBase, std::shared_ptr<PredefinedDaqList>>(m, "PredefinedDaqList")
84
146
  .def(
@@ -94,6 +156,21 @@ PYBIND11_MODULE(cpp_ext, m) {
94
156
  } catch (...) {
95
157
  return std::string("PredefinedDaqList(<repr error: unknown>)");
96
158
  }
159
+ })
160
+ .def("asdict", [](const PredefinedDaqList& self) {
161
+ py::dict d;
162
+ d["name"] = self.get_name();
163
+ d["event_num"] = self.get_event_num();
164
+ d["priority"] = self.get_priority();
165
+ d["prescaler"] = self.get_prescaler();
166
+ d["stim"] = self.get_stim();
167
+ d["enable_timestamps"] = self.get_enable_timestamps();
168
+ d["measurements_opt"] = self.get_measurements_opt();
169
+ d["headers"] = self.get_headers();
170
+ d["odt_count"] = self.get_odt_count();
171
+ d["total_entries"] = self.get_total_entries();
172
+ d["total_length"] = self.get_total_length();
173
+ return d;
97
174
  })
98
175
  ;
99
176
 
pyxcp/cpp_ext/framing.hpp CHANGED
@@ -357,4 +357,4 @@ private:
357
357
  std::uint16_t m_send_buffer_offset = 0UL;
358
358
  };
359
359
 
360
- #endif // __FRAMING_HPP
360
+ #endif // __FRAMING_HPP