summaryrefslogtreecommitdiffstats
path: root/src/DetectorModule/DetectorModule.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2018-08-06 18:35:13 +0200
committerSuren A. Chilingaryan <csa@suren.me>2018-08-06 18:35:13 +0200
commit09b7e077f10fe324774f759086f3596947d69b19 (patch)
treed9d910844704459a5390382949d02648f3a3f5a9 /src/DetectorModule/DetectorModule.h
parent76affa8334acbd21f3a1186fdaace1efe93e2e31 (diff)
downloadods-09b7e077f10fe324774f759086f3596947d69b19.tar.gz
ods-09b7e077f10fe324774f759086f3596947d69b19.tar.bz2
ods-09b7e077f10fe324774f759086f3596947d69b19.tar.xz
ods-09b7e077f10fe324774f759086f3596947d69b19.zip
Send multiple packets in one system call
Diffstat (limited to 'src/DetectorModule/DetectorModule.h')
-rw-r--r--src/DetectorModule/DetectorModule.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/DetectorModule/DetectorModule.h b/src/DetectorModule/DetectorModule.h
index afe4d04..f959857 100644
--- a/src/DetectorModule/DetectorModule.h
+++ b/src/DetectorModule/DetectorModule.h
@@ -27,7 +27,7 @@ public:
private:
std::vector<unsigned short> buffer_;
- std::vector<char> sendBuffer_;
+ std::vector<std::vector<char>> sendBuffer_;
int detectorID_;
UDPClient client_;
@@ -40,12 +40,16 @@ private:
unsigned int numberOfFrames_;
std::string path_, fileName_, fileEnding_;
+ unsigned int max_packets_;
std::size_t index_;
+ std::size_t ips_;
+ std::size_t counter_;
+ std::chrono::high_resolution_clock::time_point ts_;
unsigned short partID_{0};
auto readConfig(const std::string& configFile) -> bool;
auto readInput() -> void;
- auto send() -> void;
+ auto send(int packets) -> void;
};