packet.h
Go to the documentation of this file.
1 
31 #ifndef CREATE_PACKET_H
32 #define CREATE_PACKET_H
33 
34 #include <boost/thread/mutex.hpp>
35 
36 namespace create {
37  class Packet {
38  private:
39  uint16_t data;
40  uint16_t tmpData;
41  mutable boost::mutex dataMutex;
42  mutable boost::mutex tmpDataMutex;
43 
44  protected:
45  // Thread safe
46  void setData(const uint16_t& d);
47 
48  public:
49  const uint8_t nbytes;
50  const std::string info;
51 
52  Packet(const uint8_t& nbytes, const std::string& info);
53  ~Packet();
54 
55  // Thread safe
56  void setDataToValidate(const uint16_t& td);
57  // Thread safe
58  void validate();
59  // Thread safe
60  uint16_t getData() const;
61  };
62 
63 } // namepsace create
64 
65 #endif // CREATE_PACKET_H
const uint8_t nbytes
Definition: packet.h:49
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
const std::string info
Definition: packet.h:50
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