Packet.hh
1.37 KB
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
/*
* Packet.hh
*
* Created on: Jan 17, 2013
* Author: f.casimir
*/
#ifndef PACKET_HH_
#define PACKET_HH_
#include <boost/shared_ptr.hpp>
#include "DD.hh"
namespace AMDA {
namespace DDServerInterface {
namespace VI {
/**
* @class Packet
* @brief Container of one bloc of time and one block of data get from DDServer.
* @details When a call to GetData is done the the data retrieved are shared between listener.
* For this we use pointers boost::shared_ptr.
*/
class Packet {
public:
typedef boost::shared_ptr<DD_data_t> DDDataSPtr;
Packet() : time(), data(), nodata(true), startTime(0), stopTime(0) {}
/**
* @brief Constructor.
*/
Packet(Packet::DDDataSPtr pTime,Packet::DDDataSPtr pData) : time(pTime), data(pData), nodata(false), startTime(0), stopTime(0) {}
/**
* @brief Copy constructor.
*/
Packet(const Packet& pPacket) : time(pPacket.time), data(pPacket.data), nodata(false), startTime(0), stopTime(0) {}
/**
* @brief Destructor.
*/
virtual ~Packet() {}
DDDataSPtr time; /*!< Shared pointer on one block data of time */
DDDataSPtr data; /*!< Shared pointer on one block data of an unknown data type */
bool nodata;
double startTime;
double stopTime;
};
} /* namespace VI */
} /* namespace DDServerInterface */
} /* namespace AMDA */
#endif /* PACKET_HH_ */