summaryrefslogtreecommitdiffstats
path: root/Master/Real-Time Systems/RTS_P6/A1/src/CanAnalyzer.cpp
diff options
context:
space:
mode:
authorSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
committerSven Eisenhauer <sven@sven-eisenhauer.net>2023-11-10 15:11:48 +0100
commit33613a85afc4b1481367fbe92a17ee59c240250b (patch)
tree670b842326116b376b505ec2263878912fca97e2 /Master/Real-Time Systems/RTS_P6/A1/src/CanAnalyzer.cpp
downloadStudium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.gz
Studium-33613a85afc4b1481367fbe92a17ee59c240250b.tar.bz2
add new repoHEADmaster
Diffstat (limited to 'Master/Real-Time Systems/RTS_P6/A1/src/CanAnalyzer.cpp')
-rw-r--r--Master/Real-Time Systems/RTS_P6/A1/src/CanAnalyzer.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/Master/Real-Time Systems/RTS_P6/A1/src/CanAnalyzer.cpp b/Master/Real-Time Systems/RTS_P6/A1/src/CanAnalyzer.cpp
new file mode 100644
index 0000000..7bfcd99
--- /dev/null
+++ b/Master/Real-Time Systems/RTS_P6/A1/src/CanAnalyzer.cpp
@@ -0,0 +1,24 @@
+/*
+ * CanAnalyzer.cpp
+ *
+ * Created on: 18.01.2011
+ * Author: istsveise
+ */
+
+#include "CanAnalyzer.h"
+#include <math.h>
+
+CanAnalyzer::CanAnalyzer() {
+ // TODO Auto-generated constructor stub
+
+}
+
+CanAnalyzer::~CanAnalyzer() {
+ // TODO Auto-generated destructor stub
+}
+int CanAnalyzer::getMaxTransmissionTimeUsec(CanMessage& m)
+{
+ int tau = 1; // 1 mircosecond bit time
+ int transTimeUsec = (floor((34+8*m.byteCount)/5)+47+8*m.byteCount)*tau;
+ return transTimeUsec;
+}