File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ struct CanDiagnostics {
4747
4848 std::optional<float >
4949 temperature; // /< Optional temperature reading for Anagate devices.
50- std::optional<uint32_t > uptime; // /< Optional uptime for Anagate devices .
50+ std::optional<uint32_t > uptime; // /< Optional uptime in seconds .
5151
5252 std::optional<uint32_t > tcp_rx; // /< Optional TCP Received counter for
5353 // /< both SocketCAN and Anagate devices.
Original file line number Diff line number Diff line change 11#include " CanVendorSystec.h"
22
33#include < time.h>
4- #include < vector>
54#include < LogIt.h>
65#include < iomanip>
7- #include < string>
86
97std::mutex CanVendorSystec::m_handles_lock;
108std::unordered_map<int , tUcanHandle> CanVendorSystec::m_handle_map;
@@ -210,8 +208,9 @@ CanDiagnostics CanVendorSystec::vendor_diagnostics() noexcept {
210208 case kUcanModeTxEcho : diagnostics.mode = " LOOPBACK" ; break ;
211209 }
212210
213- // DWORD module_time;
214- // UcanGetModuleTime(m_UcanHandle, &module_time);
211+ DWORD module_time; // in ms
212+ UcanGetModuleTime (m_UcanHandle, &module_time);
213+ diagnostics.uptime = (uint32_t ) module_time / 1000 ;
215214
216215 return diagnostics;
217216};
You can’t perform that action at this time.
0 commit comments