Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# API to ingest data into a data transfer unit
#ifndef DATAINGEST_H
#define DATAINGEST_H
#define version "0.0.1"
#include <zmq.hpp>
#include <string>
//import logging
//import cPickle
//import traceback
//typedef std::map<std::string, int> Dict;
class DataIngest
{
std::string signalHost = "zitpcx19282";
std::string signalPort = "50050";
// has to be the same port as configured in dataManager.conf as eventPort
std::string eventPort = "50003";
std::string dataPort = "50010";
zmq::context_t context (1);
zmq::socket_t signalSocket (context, ZMQ_REQ);
zmq::socket_t eventSocket (context, ZMQ_PUSH);
zmq::socket_t dataSocket (context, ZMQ_PUSH);
// Initialize poll set
zmq::pollitem_t items [];
std::string self.filename;
bool openFile;
int filePart;
int responseTimeout = 1000;
DataIngest ();
createFile (std::string filename);
write(data);
closeFile();
stop();
~DataIngest();
};
#endif