BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnDataReceiver.h
Go to the documentation of this file.
1/*
2 * To change this license header, choose License Headers in Project Properties.
3 * To change this template file, choose Tools | Templates
4 * and open the template in the editor.
5 */
6
7/*
8 * File: BmnDataReceiver.h
9 * Author: ilnur
10 *
11 * Created on October 18, 2016, 5:22 PM
12 */
13
14#ifndef BMNDATARECEIVER_H
15#define BMNDATARECEIVER_H 1
16#include <BmnMath.h>
17#include <TNamed.h>
18#include <deque>
19#include <stdlib.h>
20
21#define PNP_DISCOVER_PORT 33304
22#define PNP_DISCOVER_IP_ADDR "239.192.1.2"
23#define INPUT_IFACE "eno1"
24#define MAX_BUF_LEN 128 * 1024 * 1024
25#define MAX_ADDR_LEN 255
26#define MAX_PORT_LEN 7
27#define MSG_TIMEOUT 400000
28#define CONN_TIMEOUT 3000000
29
30using namespace std;
31
32class BmnDataReceiver : public TNamed
33{
34 public:
36 virtual ~BmnDataReceiver();
37
39 Int_t Connect();
42 void FreeRecvStream();
45
46 void SetDataQueue(deque<UInt_t> v) { this->data_queue = v; }
47
48 deque<UInt_t>* GetDataQueue() { return &data_queue; }
49
50 // void *GetQueMutex(){ return _deque_mutex;}
51 // void SetQueMutex(void *v){_deque_mutex = v;}
52
53 private:
54 // zmq::context_t _ctx;
55 // zmq::socket_t _socket_mcast;
72
73 deque<UInt_t> data_queue;
74 void* _ctx;
79 struct addrinfo* dataAddrInfo;
82 // void *_deque_mutex; // actually std::mutex
83 // static void HandleSignal(int signal);
84 void InitSocks();
85 void DeinitSocks();
86 static Int_t ParsePNPMsg(char* msgStr, serverInfo* sInfo);
87
89};
90
91#endif /* BMNDATARECEIVER_H */
__m128 v
Definition P4_F32vec4.h:1
bool Bool_t
unsigned short UShort_t
int Int_t
char Char_t
constexpr Bool_t kFALSE
#define ClassDef(name, id)
virtual ~BmnDataReceiver()
struct serverInfo _dataServer
void SetDataQueue(deque< UInt_t > v)
deque< UInt_t > * GetDataQueue()
struct addrinfo * dataAddrInfo
deque< UInt_t > data_queue
static Int_t ParsePNPMsg(char *msgStr, serverInfo *sInfo)
#define MAX_ADDR_LEN
Definition json.hpp:4446
Char_t type[MAX_ADDR_LEN]
Char_t index[MAX_ADDR_LEN]
Char_t hostName[MAX_ADDR_LEN]
vector< serverIface > interfaces
Char_t name[MAX_ADDR_LEN]
Char_t type[MAX_ADDR_LEN]