diff --git a/.gitignore b/.gitignore
index 6367dbc..f2cae5c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,3 +10,4 @@ tdmripper
*.csv
*.log
*.txt
+tdmreaper
diff --git a/README.md b/README.md
index 23fd08b..e861e41 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
diff --git a/tdmreaper.svg b/assets/tdmreaper.svg
similarity index 100%
rename from tdmreaper.svg
rename to assets/tdmreaper.svg
diff --git a/tdmripper.svg b/assets/tdmripper.svg
similarity index 100%
rename from tdmripper.svg
rename to assets/tdmripper.svg
diff --git a/lib/makefile b/lib/makefile
deleted file mode 100644
index e88f127..0000000
--- a/lib/makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-CC = gcc -std=c++11 -stdlib=libc++
-CPPFLAGS = -O3 -Wall -Werror
-LIB = ../pugixml/
-
-libtdmripper.a : tdm_ripper.o
- ar rcs $@ $^
-
-tdm_ripper.o : tdm_ripper.cpp tdm_ripper.hpp
- $(CC) -c $(CPPFLAGS) -I $(LIB) $< -o $@
-
-clean :
- rm -f *.o *.a
diff --git a/lib/tdm_reaper.cpp b/lib/tdm_reaper.cpp
new file mode 100644
index 0000000..778b017
--- /dev/null
+++ b/lib/tdm_reaper.cpp
@@ -0,0 +1,29 @@
+// -------------------------------------------------------------------------- //
+
+#include "tdm_reaper.hpp"
+
+// -------------------------------------------------------------------------- //
+
+tdm_ripper::tdm_ripper(std::string tdmfile, std::string tdxfile,
+ bool suppress_status, bool neglect_empty_groups)
+{
+
+
+}
+
+void tdm_ripper::print_channel(int idx, char const* name, int width)
+{
+
+}
+
+void tdm_ripper::list_groups(std::ostream& out, int g, int c)
+{
+
+}
+
+void tdm_ripper::list_channels(std::ostream& out, int g, int c)
+{
+
+}
+
+// -------------------------------------------------------------------------- //
diff --git a/lib/tdm_ripper.hpp b/lib/tdm_reaper.hpp
similarity index 93%
rename from lib/tdm_ripper.hpp
rename to lib/tdm_reaper.hpp
index 4e27576..ea28070 100644
--- a/lib/tdm_ripper.hpp
+++ b/lib/tdm_reaper.hpp
@@ -1,3 +1,4 @@
+// ------------------------------------------------------------------------- //
#ifndef TDM_RIPPER
#define TDM_RIPPER
@@ -13,22 +14,39 @@
#include
#include
-#include "../pugixml/pugixml.hpp"
+#include "pugixml.hpp"
+
+// -------------------------------------------------------------------------- //
+// define datatypes
+
+struct datatype {
+ std::string name_;
+ std::string channel_datatype_;
+ int numeric_;
+ std::string value_sequence_;
+ int size_;
+ std::string description;
+};
+
+const std::map tdm_datatypes = {
+ {"eInt16Usi",{"eInt16Usi","DT_SHORT",2,"short_sequence",2,"signed 16 bit integer"}}
+};
+
+// -------------------------------------------------------------------------- //
class tdm_ripper
{
- // .tdm and .tdx filenames
+ // .tdm and .tdx paths/filenames
std::string tdmfile_;
std::string tdxfile_;
bool suppress_status_;
+ // set of .csv files
+ std::vector csvfile_;
+
// endianness (true = little, false = big)
bool endianness_, machine_endianness_;
- // evtl. neglect groups with no actual channels
- bool neglect_empty_groups_;
- int num_empty_groups_;
-
// number/names/ids of channels, channelgroups and channels's assignment to groups
int num_channels_, num_groups_;
std::vector channel_id_, inc_id_, units_, channel_name_;
@@ -38,6 +56,10 @@ class tdm_ripper
std::vector channels_group_;
std::vector channel_ext_;
+ // neglect empty groups
+ bool neglect_empty_groups_;
+ int num_empty_groups_;
+
// minimum/maximum value in particular channel (is provided in .tdm file as float)
std::vector> minmax_;
@@ -50,7 +72,7 @@ class tdm_ripper
std::vector type_;
std::vector external_id_;
- // mapping of NI datatype to size (in bytes) of type
+ // NI datatypes ( )
std::map datatypes_;
// xml parser
diff --git a/lib/tdm_ripper.cpp b/lib/tdm_ripper-rev.cpp
similarity index 100%
rename from lib/tdm_ripper.cpp
rename to lib/tdm_ripper-rev.cpp
diff --git a/makefile b/makefile
index 289e684..68a78c1 100644
--- a/makefile
+++ b/makefile
@@ -1,7 +1,10 @@
# --------------------------------------------------------------------------- #
# declare name of executable
-EXE = tdmripper
+EXE = tdmreaper
+
+# source name
+SRC := tdm_reaper
# compiler and C++ standard
CC = g++ -std=c++17
@@ -22,7 +25,7 @@ INST := /usr/local/bin
# --------------------------------------------------------------------------- #
# CLI tool
-$(EXE) : main.o tdm_ripper.o
+$(EXE) : main.o $(SRC).o
$(CC) $(OPT) $^ -o $@
install : $(EXE)
@@ -39,13 +42,7 @@ main.o : src/main.cpp
$(CC) -c $(OPT) -I $(LIB) -I lib/ $<.cpp -o $@
@rm $<.cpp
-tdm_ripper.o : lib/tdm_ripper.cpp lib/tdm_ripper.hpp
- $(CC) -c $(OPT) -I $(LIB) $< -o $@
-
-extall : extract_all.o tdm_ripper.o
- $(CC) $(OPT) $^ -o extract_all
-
-extract_all.o : extract_all.cpp
+$(SRC).o : lib/$(SRC).cpp lib/$(SRC).hpp
$(CC) -c $(OPT) -I $(LIB) $< -o $@
clean :
@@ -71,3 +68,6 @@ clean :
# rm -f -r build
# rm -f pytdm_ripper.cpp
# rm -f *.so
+
+
+# --------------------------------------------------------------------------- #
diff --git a/src/main.cpp b/src/main.cpp
index 3367e55..7622e6a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -1,6 +1,6 @@
// ------------------------------------------------------------------------- //
-#include "tdm_ripper.hpp"
+#include "tdm_reaper.hpp"
#include
#include
@@ -13,7 +13,7 @@ const std::string githash("HASHSTRING");
void show_usage()
{
std::cout<<"\n"
- <<"tdmripper ["<