Add a new CTFLogVisitor mock implementation for Nexus to CTF conversion
[babeltrace.git] / converter / nexus / Application.cpp
index ced3fc08ef20673ae733d3ff573fcdded6265076..a1a157790710eba25c9050939491e99bce88e69c 100644 (file)
@@ -23,6 +23,7 @@
 #include "Application.h"
 #include "NxMessageDecoder.h"
 #include "NxMessage.h"
+#include "CTFLogVisitor.h"
 #include "FManDebugLogVisitor.h"
 #include "FullAddressVisitor.h"
 #include "SizedAddress.h"
@@ -66,6 +67,13 @@ void Application::enableFmanLog()
        visitors_.push_back(v);
 }
 
+// Enable the Common Trace Format (CTF) converter for the Application
+void Application::enableCTFLog(const string &outdir)
+{
+       NxMessageVisitor* v = new CTFLogVisitor(outdir);
+       visitors_.push_back(v);
+}
+
 // Main application entry
 bool Application::process(const string & fn)
 {
@@ -150,6 +158,8 @@ bool Application::processBinFile_(const string &fn)
        while (!infile.eof()) {
                infile.read((char*) &byte, sizeof(uint32_t));
                // Nexus binary files are Big Endian data
+               // FIXME: This assumes that the binary file will be read on
+               //        a Little Endian machine.
                data = byte[0] << 24;
                data |= byte[1] << 16;
                data |= byte[2] << 8;
This page took 0.02449 seconds and 4 git commands to generate.