packet.cpp
Go to the documentation of this file.
1 #include "create/packet.h"
2 
3 namespace create {
4 
5  Packet::Packet(const uint8_t& numBytes, const std::string& comment) :
6  data(0),
7  tmpData(0),
8  nbytes(numBytes),
9  info(comment) { }
10 
12 
13  void Packet::setDataToValidate(const uint16_t& tmp) {
14  boost::mutex::scoped_lock lock(tmpDataMutex);
15  tmpData = tmp;
16  }
17 
19  boost::mutex::scoped_lock lock(tmpDataMutex);
21  }
22 
23  void Packet::setData(const uint16_t& d) {
24  boost::mutex::scoped_lock lock(dataMutex);
25  data = d;
26  }
27 
28  uint16_t Packet::getData() const {
29  boost::mutex::scoped_lock lock(dataMutex);
30  return data;
31  }
32 
33 } // namespace create
void setDataToValidate(const uint16_t &td)
Definition: packet.cpp:13
uint16_t tmpData
Definition: packet.h:40
uint16_t getData() const
Definition: packet.cpp:28
Packet(const uint8_t &nbytes, const std::string &info)
Definition: packet.cpp:5
boost::mutex dataMutex
Definition: packet.h:41
Definition: create.h:47
boost::mutex tmpDataMutex
Definition: packet.h:42
void setData(const uint16_t &d)
Definition: packet.cpp:23
uint16_t data
Definition: packet.h:39
void validate()
Definition: packet.cpp:18


libcreate
Author(s): Jacob Perron
autogenerated on Thu Dec 5 2019 04:03:13