diff --git a/etc/scdaq/scdaq.conf b/etc/scdaq/scdaq.conf index 578ac784d90007d748fe1f0af7b3fb05d2676936..eb1575666ffbc3b5a6d9289b276ac23246f37390 100644 --- a/etc/scdaq/scdaq.conf +++ b/etc/scdaq/scdaq.conf @@ -9,7 +9,8 @@ # "dma" for XILINX DMA driver # "filedma" for reading from file and simulating DMA # "micronDMA" for PICO driver - +# "tcpip" for TCP/IP input receving + input:wzdma ## Settings for DMA input @@ -26,8 +27,8 @@ dma_number_of_packet_buffers:1000 # Print report each N packets, use 0 to disable packets_per_report:200000 -# number of orbits per DMA packet, in decimal -NOrbitsPerDMAPacket:20 +# number of orbits per packet, in decimal +nOrbitsPerPacket:20 # prescale factor, used for *calo* data only prescale_factor:1 @@ -37,6 +38,9 @@ prescale_factor:1 #input_file:/dev/shm/testdata.bin input_file:testdata.bin +## Extra settings for "tcpip" input +tcpDestPort:10000 + ################################################################################ ## @@ -94,6 +98,9 @@ quality_cut:12 ## ################################################################################ +# enable development functionalities (e.g. TCP input filter) +dev_TCPAutoReconnectOnFailure:false + ## Logging, supported LOG severities: # TRACE # DEBUG diff --git a/src/Makefile b/src/Makefile index 05ac363d629ad981348befbf41a467f11f2fe903..d6557b1c9d80c94acda45cf09d13ea4fe32548e3 100644 --- a/src/Makefile +++ b/src/Makefile @@ -12,7 +12,7 @@ TARGET = scdaq # source files -SOURCES = config.cc DmaInputFilter.cc elastico.cc FileDmaInputFilter.cc InputFilter.cc OutputFileHandler.cc OutputBySize.cc OutputByOrbit.cc processor.cc scdaq.cc session.cc slice.cc tools.cc WZDmaInputFilter.cc MicronDmaInputFilter.cc +SOURCES = config.cc DmaInputFilter.cc elastico.cc FileDmaInputFilter.cc InputFilter.cc MicronDmaInputFilter.cc OutputByOrbit.cc OutputBySize.cc OutputFileHandler.cc processor.cc scdaq.cc session.cc slice.cc TcpInputFilter.cc tools.cc WZDmaInputFilter.cc C_SOURCES = wz_dma.c # work out names of object files from sources @@ -70,6 +70,7 @@ processor.o: processor.h slice.h format.h log.h bril_histo.h FRDEventHeader_V6.h session.o: session.h log.h slice.o: slice.h WZDmaInputFilter.o: WZDmaInputFilter.h InputFilter.h tools.h log.h +TcpInputFilter.o: TcpInputFilter.h InputFilter.h tools.h log.h wz_dma.o: wz_dma.h MicronDmaInputFilter.o: MicronDmaInputFilter.h tools.o: tools.h log.h diff --git a/src/OutputByOrbit.cc b/src/OutputByOrbit.cc index be31356daf39752b0df9dfba83c49b93a676dcc0..d39429e7d6e89b179c8fc7215984801b30c63b80 100644 --- a/src/OutputByOrbit.cc +++ b/src/OutputByOrbit.cc @@ -41,7 +41,7 @@ void OutputByOrbitStream::OutputFixedOrbits(Slice &out) { n = fwrite(out.begin(), 1, out.size(), output_file_handler_.getFile(control.run_number, index).getFilePtr()); output_file_handler_.upFileSize(n); - output_file_handler_.upNOrbits(conf.getNOrbitsPerDMAPacket()); + output_file_handler_.upNOrbits(conf.getNOrbitsPerPacket()); } else if (output_file_handler_.hasFile()) { // the run has been stopped so drop but first check if there is a last // file to close diff --git a/src/TcpInputFilter.cc b/src/TcpInputFilter.cc new file mode 100644 index 0000000000000000000000000000000000000000..6c24a5ebf19dd32b2bb31ad04659a80231d0ae8f --- /dev/null +++ b/src/TcpInputFilter.cc @@ -0,0 +1,195 @@ +#include "TcpInputFilter.h" + +#include <fcntl.h> +#include <sys/socket.h> +#include <sys/stat.h> +#include <sys/types.h> + +#include <cassert> +#include <cerrno> +#include <cstdio> +#include <iostream> +#include <sstream> +#include <system_error> + +#include "log.h" +#include "tools.h" + +TcpInputFilter::TcpInputFilter(int destPort, size_t packetBufferSize, size_t nbPacketBuffers, + const uint32_t nOrbitsPerPacket, ctrl &control, config &conf) + : InputFilter(packetBufferSize, nbPacketBuffers, control), + nOrbitsPerPacket_{nOrbitsPerPacket}, + destPort_{destPort} { + // open socket + if ((sock_ = socket(AF_INET, SOCK_STREAM, 0)) < 0) { + throw std::system_error(errno, std::system_category(), "Error opening socket."); + } + + // set SO_REUSEADDR on a socket to bypass TIME_WAIT state + const int enable = 1; + if (setsockopt(sock_, SOL_SOCKET, SO_REUSEADDR, &enable, sizeof(int)) == -1) { + throw std::system_error(errno, std::system_category(), + "Cannot set socket option to bypass TIME_WAIT state."); + } + + // server socket address + server_addr_.sin_family = AF_INET; + server_addr_.sin_addr.s_addr = INADDR_ANY; + server_addr_.sin_port = htons(destPort_); + bzero(&(server_addr_.sin_zero), 8); + + // bind socket to address + if (bind(sock_, (struct sockaddr *)&server_addr_, sizeof(struct sockaddr)) == -1) { + throw std::system_error(errno, std::system_category(), "Unable to bind."); + } + + // check if listen is possible + if (listen(sock_, 1) == -1) { + throw std::system_error(errno, std::system_category(), "Unable to listen."); + } + + LOG(TRACE) << "Created TCP input filter"; +} + +TcpInputFilter::~TcpInputFilter() { + close(connected_); + LOG(TRACE) << "Destroyed TCP input filter"; +} + +static inline ssize_t read_tcp_socket_to_buffer(int sock, char *buffer, uint64_t size) { + ssize_t rc; + uint64_t bytesRecvd = 0; + + // get data from socket until requested size is reached + while (bytesRecvd < size) { + rc = recv(sock, buffer + bytesRecvd, size - bytesRecvd, 0); + + // if connection is closed, recv return value is negative + // return the negative result to signal it + if (rc < 0) { + return rc; + } else if (rc == 0) { + throw std::runtime_error("ERROR: TCP connection was unexpectedly closed by peer."); + } + + bytesRecvd += rc; + } + + return bytesRecvd; +} + +// open connection +void TcpInputFilter::openConnection() { + LOG(TRACE) << "Waiting for connection to be opened"; + sin_size_ = sizeof(struct sockaddr_in); + connected_ = accept(sock_, (struct sockaddr *)&client_addr_, &sin_size_); + + if (connected_ < 0) { + connection_open_ = false; + throw std::system_error(errno, std::system_category(), + "Error during opening of the connection."); + } + + LOG(TRACE) << "Connection opened"; + connection_open_ = true; + return; +} + +// close connection +void TcpInputFilter::closeConnection() { + if (connection_open_) { + close(connected_); + LOG(TRACE) << "Connection closed"; + } + + connection_open_ = false; + return; +} + +// read packet from TCP socket expecting header frame +// + header frame has to be the first one received +// + extract the payload size encoded in the header frame +// + the logic receives until the given size is reached +ssize_t TcpInputFilter::readPacketFromTcp(char **buffer, size_t bufferSize) { + // start to read header block size + // then update read size from header content + ssize_t blockSize = 32; + ssize_t bytesRecvd = 0; + ssize_t rc; + int skip = 0; + + // header frame + packet_header *header; + + // if connection is still closed, open it + if (!connection_open_) { + openConnection(); + } + + bool firstRead = true; + while (true) { + // receive requested size from TCP connected socket + rc = read_tcp_socket_to_buffer(connected_, *buffer + bytesRecvd, blockSize); + + // if recv gave negative results, restart connection + if (rc < 0) { + closeConnection(); + openConnection(); + // avoid the case where: + // + header is received and blockSize decoded + // + connection is closed and HBM pointers have been reset on FPGA board + // + receive invalid blockSize + // thus, be ready to received a new header + payload + blockSize = 32; + bytesRecvd = 0; + firstRead = true; + continue; + } + + // update bytes received counter + bytesRecvd += rc; + + // check if we are at the first read (header) or not + if (firstRead) { + // interpret header + header = reinterpret_cast<packet_header *>(*buffer); + + // check if header marker is in the frame + // if not, try again N times + if (header->feedbeef != 0xfeedbeeffeedbeef) { + printf("Frame 0x%16llx_%16llx_%16llx_%16llx\n", header->feedbeef, + header->frames_in_packet, header->orbit_dropped_counter, header->orbit_seen_counter); + stats.nbHeaderDesync++; + throw std::runtime_error("FATAL: Header not found."); + } + + // header found, disable firstRead flag and get packet size + firstRead = false; + blockSize = (header->frames_in_packet + nOrbitsPerPacket_ + 1) * 32; + + if (blockSize > (ssize_t)bufferSize) { + stats.nbOversizedPackets++; + } + } else { + // packet has been read, return bytes in packet + return bytesRecvd; + } + } +} + +/************************************************************************** + * Entry points are here + * Overriding virtual functions + */ + +// Print some additional info +void TcpInputFilter::print(std::ostream &out) const { + out << ", oversized " << stats.nbOversizedPackets << ", scouting packet header desync " + << stats.nbHeaderDesync; +} + +// Read a packet from TCP socket +ssize_t TcpInputFilter::readInput(char **buffer, size_t bufferSize) { + // call function with header read and blocks breaker + return readPacketFromTcp(buffer, bufferSize); +} diff --git a/src/TcpInputFilter.h b/src/TcpInputFilter.h new file mode 100644 index 0000000000000000000000000000000000000000..91fc937eedebdf197ecc91671ae11a3f716bc857 --- /dev/null +++ b/src/TcpInputFilter.h @@ -0,0 +1,55 @@ +#ifndef TCP_INPUT_H +#define TCP_INPUT_H + +#include <arpa/inet.h> +#include <netinet/in.h> + +#include <memory> +#include <string> + +#include "InputFilter.h" +#include "config.h" +#include "tbb/pipeline.h" +#include "tbb/tick_count.h" + +class TcpInputFilter : public InputFilter { + public: + TcpInputFilter(int port, size_t packetBufferSize, size_t nbPacketBuffers, + uint32_t nOrbitsPerPacket, ctrl &control, config &conf); + ~TcpInputFilter(); + + protected: + ssize_t readInput(char **buffer, size_t bufferSize); // Override + void print(std::ostream &out) const; // Override + + private: + void openConnection(); + void closeConnection(); + ssize_t readPacketFromTcp(char **buffer, size_t bufferSize); + + struct Statistics { + uint64_t nbOversizedPackets = 0; + uint64_t nbHeaderDesync = 0; + } stats; + + struct packet_header { + uint64_t feedbeef; + uint64_t frames_in_packet; + uint64_t orbit_dropped_counter; + uint64_t orbit_seen_counter; + }; + + const uint32_t nOrbitsPerPacket_; + + sockaddr_in server_addr_; + sockaddr_in client_addr_; + int destPort_; + int sock_; + unsigned int sin_size_; + int connected_; + bool connection_open_ = false; +}; + +typedef std::shared_ptr<TcpInputFilter> TcpInputFilterPtr; + +#endif diff --git a/src/config.h b/src/config.h index 2de83aa905a63e0711e23d4a888ed6c95724977f..3fb49da6817dfc982860e4383b4775550deff388 100644 --- a/src/config.h +++ b/src/config.h @@ -13,7 +13,7 @@ class config { public: - enum class InputType { WZDMA, DMA, FILEDMA, MICRONDMA, FILE }; + enum class InputType { WZDMA, DMA, FILEDMA, TCPIP, MICRONDMA, FILE }; config(std::string filename); @@ -30,6 +30,9 @@ class config { if (input == "filedma") { return InputType::FILEDMA; } + if (input == "tcpip") { + return InputType::TCPIP; + } if (input == "micronDMA") { return InputType::MICRONDMA; } @@ -39,6 +42,10 @@ class config { throw std::invalid_argument("Configuration error: Wrong input type '" + input + "'"); } + bool getDev_TCPAutoReconnectOnFailure() const { + return (vmap.at("dev_TCPAutoReconnectOnFailure") == "true"); + } + LOG_LEVEL getLogMinSeverity() const { const std::string &input = vmap.at("log_min_severity"); if (input == "TRACE") { @@ -64,6 +71,11 @@ class config { const std::string &getDmaDevice() const { return vmap.at("dma_dev"); } + uint64_t getTcpDestPort() const { + std::string v = vmap.at("tcpDestPort"); + return boost::lexical_cast<uint32_t>(v.c_str()); + } + uint64_t getDmaPacketBufferSize() const { std::string v = vmap.at("dma_packet_buffer_size"); return boost::lexical_cast<uint64_t>(v.c_str()); @@ -123,8 +135,8 @@ class config { bool getOutputForceWrite() const { return (vmap.at("output_force_write") == "yes"); } - uint32_t getNOrbitsPerDMAPacket() const { - std::string v = vmap.at("NOrbitsPerDMAPacket"); + uint32_t getNOrbitsPerPacket() const { + std::string v = vmap.at("nOrbitsPerPacket"); return boost::lexical_cast<uint32_t>(v.c_str()); } diff --git a/src/controls.h b/src/controls.h index 121e6d0b8d4f04f6de0d216def54856285d1d6f1..9da5e079fda4617f000befd92fe2d88352086940 100644 --- a/src/controls.h +++ b/src/controls.h @@ -13,6 +13,6 @@ struct ctrl { bool verbosity; uint64_t max_file_size; int packets_per_report; - int n_orbits_per_dma_packet; + int n_orbits_per_packet; }; #endif diff --git a/src/format.h b/src/format.h index 97384e21555db3f8c558acaf246659e18e932c67..fb3667397cb668eb89248eff27253ec710732ed8 100644 --- a/src/format.h +++ b/src/format.h @@ -241,7 +241,7 @@ struct constants { static constexpr uint32_t orbit_header_size = 32; static constexpr uint32_t dma_trailer_size = 32; // Note: total number of bytes of overhead per packet is: - // (orbit_trailer_size+orbit_header_size)*NOrbitsPerDMAPacket + + // (orbit_trailer_size+orbit_header_size)*nOrbitsPerPacket + // dma_trailer_size static constexpr uint32_t intermediate = 0x00000001; static constexpr uint32_t final = 0x00000001; diff --git a/src/processor.cc b/src/processor.cc index bd619e9b15a3e0833e19912263a536b0707b47c4..c4810fcaabcd050d05577b025121217f9abf0196 100644 --- a/src/processor.cc +++ b/src/processor.cc @@ -14,15 +14,14 @@ StreamProcessor::Statistics StreamProcessor::stats; StreamProcessor::StreamProcessor(size_t max_size_, const bool doZS_, ProcessorType processorType_, - const uint32_t nOrbitsPerDMAPacket_, - const uint32_t prescaleFactor_, const bool cmsswHeaders_, - const uint16_t sourceID_, ctrl &control_) + const uint32_t nOrbitsPerPacket_, const uint32_t prescaleFactor_, + const bool cmsswHeaders_, const uint16_t sourceID_, ctrl &control_) : tbb::filter(parallel), max_size(max_size_), nbPackets(0), doZS(doZS_), processorType(processorType_), - nOrbitsPerDMAPacket(nOrbitsPerDMAPacket_), + nOrbitsPerPacket(nOrbitsPerPacket_), prescaleFactor(prescaleFactor_), cmsswHeaders(cmsswHeaders_), sourceID(sourceID_), @@ -39,8 +38,7 @@ StreamProcessor::~StreamProcessor() {} // minus the header/trailers bool StreamProcessor::CheckFrameMultBlock(size_t inputSize) { int bsize = sizeof(blockMuon); - if ((inputSize - nOrbitsPerDMAPacket * constants::orbit_trailer_size - 32 * nOrbitsPerDMAPacket - - 32) % + if ((inputSize - nOrbitsPerPacket * constants::orbit_trailer_size - 32 * nOrbitsPerPacket - 32) % bsize != 0) { stats.n_consistent_sized_packets = 0; @@ -442,7 +440,7 @@ void StreamProcessor::process(Slice &input, Slice &out) { meta = FillOrbitMuon(trailer, rd_ptr, wr_ptr, rd_end_ptr, wr_end_ptr); orbitCount = meta.counts; ++orbit_per_packet_count; - if (orbit_per_packet_count > nOrbitsPerDMAPacket) { + if (orbit_per_packet_count > nOrbitsPerPacket) { stats.excess_orbits_per_packet_count++; return; } @@ -494,11 +492,11 @@ void StreamProcessor::process(Slice &input, Slice &out) { return; } - if (orbit_per_packet_count > nOrbitsPerDMAPacket) { + if (orbit_per_packet_count > nOrbitsPerPacket) { if (control.verbosity) { LOG(WARNING) << "expected DMA trailer word deadbeef, found " << std::hex << *dma_trailer_word << ". Orbits per packet count " - << orbit_per_packet_count << ", > expected, (" << nOrbitsPerDMAPacket + << orbit_per_packet_count << ", > expected, (" << nOrbitsPerPacket << ") skipping packet."; } if (stats.excess_orbits_per_packet_count % 10000 == 0) { diff --git a/src/processor.h b/src/processor.h index ab8fb0cb83dbc32e13bf74e9ccfeb14cd0241257..43fa69b9ca70e0234cbf4efa1d6c5ca28722d064 100644 --- a/src/processor.h +++ b/src/processor.h @@ -25,7 +25,7 @@ class StreamProcessor : public tbb::filter { enum class ProcessorType { PASS_THROUGH, GMT, CALO, BRIL }; StreamProcessor(size_t max_size_, bool doZS_, ProcessorType processorType_, - const uint32_t nOrbitsPerDMAPacket_, const uint32_t prescaleFactor_, + const uint32_t nOrbitsPerPacket_, const uint32_t prescaleFactor_, const bool cmsswHeaders_, const uint16_t sourceID, ctrl &control); void *operator()(void *item) /*override*/; ~StreamProcessor(); @@ -49,7 +49,7 @@ class StreamProcessor : public tbb::filter { uint64_t nbPackets; const bool doZS; const ProcessorType processorType; - const uint32_t nOrbitsPerDMAPacket; + const uint32_t nOrbitsPerPacket; const uint32_t prescaleFactor; const bool cmsswHeaders; const uint16_t sourceID; diff --git a/src/scdaq.cc b/src/scdaq.cc index cd9253075010de7f58f690af15c1d599f70ae17f..625f55c2bfa5ede2b5b5f707fb0f3a83eebba341 100644 --- a/src/scdaq.cc +++ b/src/scdaq.cc @@ -16,6 +16,7 @@ #include "MicronDmaInputFilter.h" #include "OutputByOrbit.h" #include "OutputBySize.h" +#include "TcpInputFilter.h" #include "WZDmaInputFilter.h" #include "config.h" #include "controls.h" @@ -40,6 +41,8 @@ int run_pipeline(int nbThreads, ctrl &control, config &conf) { size_t packetBufferSize = conf.getDmaPacketBufferSize(); size_t nbPacketBuffers = conf.getNumberOfDmaPacketBuffers(); uint32_t prescaleFactor = conf.getPrescaleFactor(); + uint32_t tcpDestPort = conf.getTcpDestPort(); + // Create empty input reader, will assign later when we know what is the data // source std::shared_ptr<InputFilter> input_filter; @@ -67,6 +70,18 @@ int run_pipeline(int nbThreads, ctrl &control, config &conf) { // create MicronDmaInputFilter reader input_filter = std::make_shared<MicronDmaInputFilter>(packetBufferSize, nbPacketBuffers, control, conf); + + } else if (input == config::InputType::TCPIP) { + // create TcpInputFilter reader + if (conf.getDev_TCPAutoReconnectOnFailure()) { + input_filter = + std::make_shared<TcpInputFilter>(tcpDestPort, packetBufferSize, nbPacketBuffers, + conf.getNOrbitsPerPacket(), control, conf); + } else { + throw std::invalid_argument( + "Configuration error: enable developmentMode to use TCP input filter"); + } + } else { throw std::invalid_argument("Configuration error: Unknown input type was specified"); } @@ -77,7 +92,7 @@ int run_pipeline(int nbThreads, ctrl &control, config &conf) { // Create reformatter and add it to the pipeline // TODO: Created here so we are not subject of scoping, fix later... StreamProcessor stream_processor(packetBufferSize, conf.getDoZS(), conf.getProcessorType(), - conf.getNOrbitsPerDMAPacket(), prescaleFactor, + conf.getNOrbitsPerPacket(), prescaleFactor, conf.getCMSSWHeaders(), conf.getSourceID(), control); if (conf.getEnableStreamProcessor()) { pipeline.add_filter(stream_processor); @@ -158,7 +173,7 @@ int main(int argc, char *argv[]) { control.packets_per_report = conf.getPacketsPerReport(); control.output_force_write = conf.getOutputForceWrite(); control.verbosity = conf.getVerbosity(); - control.n_orbits_per_dma_packet = conf.getNOrbitsPerDMAPacket(); + control.n_orbits_per_packet = conf.getNOrbitsPerPacket(); // Firmware needs at least 1MB buffer for DMA if (conf.getDmaPacketBufferSize() < 1024 * 1024) { diff --git a/test/config/scdaq-calo-cmssw.conf b/test/config/scdaq-calo-cmssw.conf index 4c22f1235419d8b9ecfd4c1f7df0642952aeb7ea..5340f23c8a4ededcffd4f706e486ec794d064d20 100644 --- a/test/config/scdaq-calo-cmssw.conf +++ b/test/config/scdaq-calo-cmssw.conf @@ -9,6 +9,7 @@ # "dma" for XILINX DMA driver # "filedma" for reading from file and simulating DMA # "micronDMA" for PICO driver +# "tcpip" for TCP/IP input receving # input:filedma @@ -27,7 +28,7 @@ dma_number_of_packet_buffers:1000 packets_per_report:2000 # number of orbits per DMA packet, in decimal -NOrbitsPerDMAPacket:1 +nOrbitsPerPacket:1 # prescale that will be used for *calo* data only prescale_factor:1 @@ -37,6 +38,9 @@ prescale_factor:1 #input_file:/dev/shm/testdata.bin input_file:test/data/calo_testfile.dat +## Extra settings for "tcpip" input +tcpDestPort:10000 + ################################################################################ ## diff --git a/test/config/scdaq-calo.conf b/test/config/scdaq-calo.conf index d4ec10005ea95e9ccf950de042c9b59358a9b90e..236b38d96b4cb088a4dc6f9b6386f6cb15a49df4 100644 --- a/test/config/scdaq-calo.conf +++ b/test/config/scdaq-calo.conf @@ -9,6 +9,7 @@ # "dma" for XILINX DMA driver # "filedma" for reading from file and simulating DMA # "micronDMA" for PICO driver +# "tcpip" for TCP/IP input receving # input:filedma @@ -27,7 +28,7 @@ dma_number_of_packet_buffers:1000 packets_per_report:2000 # number of orbits per DMA packet, in decimal -NOrbitsPerDMAPacket:1 +nOrbitsPerPacket:1 # prescale that will be used for *calo* data only prescale_factor:1 @@ -37,6 +38,9 @@ prescale_factor:1 #input_file:/dev/shm/testdata.bin input_file:test/data/calo_testfile.dat +## Extra settings for "tcpip" input +tcpDestPort:10000 + ################################################################################ ## diff --git a/test/config/scdaq-gmt-cmssw.conf b/test/config/scdaq-gmt-cmssw.conf index 84161df1d4500e82b2b2ce234c52f203b4084f1a..9b93e25489c5092961a8bc2a0407ebe66a9b5128 100644 --- a/test/config/scdaq-gmt-cmssw.conf +++ b/test/config/scdaq-gmt-cmssw.conf @@ -9,6 +9,7 @@ # "dma" for XILINX DMA driver # "filedma" for reading from file and simulating DMA # "micronDMA" for PICO driver +# "tcpip" for TCP/IP input receving # input:filedma @@ -27,7 +28,7 @@ dma_number_of_packet_buffers:1000 packets_per_report:2000 # number of orbits per DMA packet, in decimal -NOrbitsPerDMAPacket:5 +nOrbitsPerPacket:5 # prescale factor applied to *calo* data only prescale_factor:1 @@ -37,6 +38,9 @@ prescale_factor:1 #input_file:/dev/shm/testdata.bin input_file:test/data/gmt_testfile.dat +## Extra settings for "tcpip" input +tcpDestPort:10000 + ################################################################################ ## ## Stream processor settings diff --git a/test/config/scdaq-gmt.conf b/test/config/scdaq-gmt.conf index 1d582dd6c73c6ad38f7293d160a775053c42b21e..2a4253fabf8ce1ba10a2aea60dad7c4b2b67af60 100644 --- a/test/config/scdaq-gmt.conf +++ b/test/config/scdaq-gmt.conf @@ -9,6 +9,7 @@ # "dma" for XILINX DMA driver # "filedma" for reading from file and simulating DMA # "micronDMA" for PICO driver +# "tcpip" for TCP/IP input receving # input:filedma @@ -27,7 +28,7 @@ dma_number_of_packet_buffers:1000 packets_per_report:2000 # number of orbits per DMA packet, in decimal -NOrbitsPerDMAPacket:5 +nOrbitsPerPacket:5 # prescale factor applied to *calo* data only prescale_factor:1 @@ -37,6 +38,9 @@ prescale_factor:1 #input_file:/dev/shm/testdata.bin input_file:test/data/gmt_testfile.dat +## Extra settings for "tcpip" input +tcpDestPort:10000 + ################################################################################ ## ## Stream processor settings diff --git a/test/config/scdaq-micron-bril.conf b/test/config/scdaq-micron-bril.conf index 2573bf53fbb8cbfa4c454e5b29ff1abd86c41ea0..d60a8eb7a4be6492e48650b4ce5189dc763aa4d7 100644 --- a/test/config/scdaq-micron-bril.conf +++ b/test/config/scdaq-micron-bril.conf @@ -9,6 +9,7 @@ # "dma" for XILINX DMA driver # "filedma" for reading from file and simulating DMA # "micronDMA" for PICO driver +# "tcpip" for TCP/IP input receving # input:micronDMA @@ -27,7 +28,7 @@ dma_number_of_packet_buffers:1000 packets_per_report:1 # number of orbits per DMA packet, in decimal -NOrbitsPerDMAPacket:20 +nOrbitsPerPacket:20 # prescale factor applied to *calo* data only prescale_factor:20 @@ -37,6 +38,9 @@ prescale_factor:20 #input_file:/dev/shm/testdata.bin input_file:test/data/gmt_testfile.dat +## Extra settings for "tcpip" input +tcpDestPort:10000 + ################################################################################ ## ## Stream processor settings