Skip to content
Snippets Groups Projects
Commit 51db46d9 authored by Chris Broekema's avatar Chris Broekema
Browse files

BugID: 1011

Add support for UDP sockets to the inputsection. Also rename the SOCKET input method to TCP and introduce the UDP input method.
parent 7986676a
No related branches found
No related tags found
No related merge requests found
......@@ -133,9 +133,14 @@ namespace LOFAR {
// Connect splitters to mergers (transpose)
#ifndef HAVE_MPI
vector <int> stations;
for (int station = 0; station < nStations; station++) {
itsConnector.connectSteps(RSPSteps[station], cell, collectSteps.back(), station);
stations.push_back(station);
}
RSPSteps.back()->getOutDataManager(0).setOutRoundRobinPolicy(stations, nStations);
#else
#if MPICH_WORKING_ON_INFINI_BAND
for (int station = 0; station < nStations; station++) {
......
......@@ -65,7 +65,7 @@ namespace LOFAR {
}
} else if (transportType=="NULL") {
theTH = new TH_Null();
} else if (transportType=="SOCKET") {
} else if (transportType=="TCP") {
string service = ps.getString(key + ".port");
if (!isReceiver) {
theTH = new TH_Socket(service,
......@@ -80,6 +80,23 @@ namespace LOFAR {
true,
Socket::TCP,
false);
}
} else if (transportType == "UDP") {
string service = ps.getString(key+".port");
if (!isReceiver) {
theTH = new TH_Socket(service,
true,
Socket::UDP,
false);
} else {
string host = ps.getString(key+".host");
theTH = new TH_Socket(host,
service,
true,
Socket::UDP,
false);
}
} else {
ASSERTSTR(false, "TransportHolder " << transportType << " unknown to Connector");
......
......@@ -35,6 +35,8 @@
#include <CS1_Interface/RSPTimeStamp.h>
#include <CS1_InputSection/BeamletBuffer.h>
#include <CS1_InputSection/InputThread.h>
#include <tinyCEP/Sel_RoundRobin.h>
// for timer
#include <signal.h>
......@@ -80,10 +82,16 @@ namespace LOFAR {
getDataManager().addInDataHolder(0, new DH_Delay("DH_Delay", ps.getInt32("Input.NRSPBoards")));
// create a outgoing dataholder for each subband
for (int s=0; s < itsNoutputs; s++) {
vector<int> subbands;
for (int s=0; s < itsNoutputs; s++) {
snprintf(str, 32, "DH_RSP_out_%d", s);
getDataManager().addOutDataHolder(s, new DH_RSP(str, itsPS));
subbands.push_back(s);
}
// set round-robin output selector, but set start index as well
// to optimize P2P transpose
getDataManager().setOutputSelector(new Sel_RoundRobin(subbands,itsStationNr));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment