summaryrefslogtreecommitdiff
path: root/src/dataframe.h
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2014-06-18 15:45:45 +0200
committerOlivier Gayot <duskcoder@gmail.com>2014-06-18 15:49:38 +0200
commit0e03940802cebefdf6b0597a154bd9395e1af4d2 (patch)
tree409a58499128227dd57943515d003074190551f5 /src/dataframe.h
Add the vanilla version of the project
This version can still be found here: http://www.roland-riegel.de/nload/index.html
Diffstat (limited to 'src/dataframe.h')
-rw-r--r--src/dataframe.h88
1 files changed, 88 insertions, 0 deletions
diff --git a/src/dataframe.h b/src/dataframe.h
new file mode 100644
index 0000000..3311292
--- /dev/null
+++ b/src/dataframe.h
@@ -0,0 +1,88 @@
+/***************************************************************************
+ dataframe.h
+ -------------------
+ begin : Fri Nov 16 2007
+ copyright : (C) 2007 - 2012 by Roland Riegel
+ email : feedback@roland-riegel.de
+ ***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef DATAFRAME_H
+#define DATAFRAME_H
+
+#include <string>
+
+class DataFrame
+{
+ public:
+ DataFrame()
+ : m_totalDataIn(0), m_totalDataOut(0), m_totalPacketsIn(0), m_totalPacketsOut(0),
+ m_totalErrorsIn(0), m_totalErrorsOut(0), m_totalDropsIn(0), m_totalDropsOut(0),
+ m_timeStampSeconds(0), m_timeStampMicroseconds(0), m_valid(false) {}
+ ~DataFrame() {}
+
+ bool isValid() const { return m_valid; }
+ void setValid(bool valid) { m_valid = valid; }
+
+ const std::string& getDeviceName() const { return m_deviceName; }
+ void setDeviceName(const std::string& deviceName) { m_deviceName = deviceName; }
+
+ const std::string& getIpV4() const { return m_ipv4; }
+ void setIpV4(const std::string& ipv4) { m_ipv4 = ipv4; }
+
+ unsigned long long getTotalDataIn() const { return m_totalDataIn; }
+ void setTotalDataIn(unsigned long long totalDataIn) { m_totalDataIn = totalDataIn; }
+
+ unsigned long long getTotalDataOut() const { return m_totalDataOut; }
+ void setTotalDataOut(unsigned long long totalDataOut) { m_totalDataOut = totalDataOut; }
+
+ unsigned long long getTotalPacketsIn() const { return m_totalPacketsIn; }
+ void setTotalPacketsIn(unsigned long long totalPacketsIn) { m_totalPacketsIn = totalPacketsIn; }
+
+ unsigned long long getTotalPacketsOut() const { return m_totalPacketsOut; }
+ void setTotalPacketsOut(unsigned long long totalPacketsOut) { m_totalPacketsOut = totalPacketsOut; }
+
+ unsigned long long getTotalErrorsIn() const { return m_totalErrorsIn; }
+ void setTotalErrorsIn(unsigned long long totalErrorsIn) { m_totalErrorsIn = totalErrorsIn; }
+
+ unsigned long long getTotalErrorsOut() const { return m_totalErrorsOut; }
+ void setTotalErrorsOut(unsigned long long totalErrorsOut) { m_totalErrorsOut = totalErrorsOut; }
+
+ unsigned long long getTotalDropsIn() const { return m_totalDropsIn; }
+ void setTotalDropsIn(unsigned long long totalDropsIn) { m_totalDropsIn = totalDropsIn; }
+
+ unsigned long long getTotalDropsOut() const { return m_totalDropsOut; }
+ void setTotalDropsOut(unsigned long long totalDropsOut) { m_totalDropsOut = totalDropsOut; }
+
+ unsigned long getTimeStampSeconds() const { return m_timeStampSeconds; }
+ void setTimeStampSeconds(unsigned long seconds) { m_timeStampSeconds = seconds; }
+
+ unsigned long getTimeStampMicroseconds() const { return m_timeStampMicroseconds; }
+ void setTimeStampMicroseconds(unsigned long microseconds) { m_timeStampMicroseconds = microseconds; }
+
+ private:
+ std::string m_deviceName;
+ std::string m_ipv4;
+ unsigned long long m_totalDataIn;
+ unsigned long long m_totalDataOut;
+ unsigned long long m_totalPacketsIn;
+ unsigned long long m_totalPacketsOut;
+ unsigned long long m_totalErrorsIn;
+ unsigned long long m_totalErrorsOut;
+ unsigned long long m_totalDropsIn;
+ unsigned long long m_totalDropsOut;
+ unsigned long m_timeStampSeconds;
+ unsigned long m_timeStampMicroseconds;
+ bool m_valid;
+};
+
+#endif
+