lib.hh 1.24 KB
Newer Older
1
2
3
4
5
6
// lib.hh

#ifndef LIB_HH_DELAY_AGENT_1
#define LIB_HH_DELAY_AGENT_1

#include <cassert>
7
#include <cmath>
8
9
10
11
12
13
14

#include <string>
#include <map>
#include <list>
#include <vector>
#include <iostream>
#include <sstream>
15
16
17
#include <fstream>

#include "event.h"
18
#include "log.h"
19
20
21
22
23
24
25
26
27
28
29

#define TBDB_OBJECTTYPE_LINK    "LINK"
#define TBDB_EVENTTYPE_UP       "UP"
#define TBDB_EVENTTYPE_DOWN     "DOWN"
#define TBDB_EVENTTYPE_MODIFY   "MODIFY"
#define TBDB_EVENTTYPE_RESET    "RESET"
#define TBDB_EVENTTYPE_COMPLETE "COMPLETE"

enum { EVENT_BUFFER_SIZE = 50 };

int stringToInt(std::string const & val);
30
double stringToDouble(std::string const & val);
31
int hexStringToInt(std::string const & val);
32
33
34
35
36
37
38
39
std::string intToString(int val);

void resetCallback(event_handle_t handle,
                   event_notification_t notification, void *data);
void linkCallback(event_handle_t handle,
                  event_notification_t notification, void *data);

#include "Parameter.hh"
40
41
42
43

namespace g
{
  extern std::string experimentName;
44
45
46
47
48
49
50
51
52
53
54
  extern bool debug;

  extern std::map<Parameter::ParameterType, Parameter> defaultParameters;
}

#include "PipeInfo.hh"

namespace g
{
  extern std::multimap<std::string, std::list<PipeInfo>::iterator> pipes;
  extern std::list<PipeInfo> pipeVault;
55
56
57
}

#endif