MADARA  3.2.3
TransportContext.cpp
Go to the documentation of this file.
1 #include "TransportContext.h"
3 
4 
6  uint64_t receive_bandwidth, uint64_t send_bandwidth,
7  uint64_t message_time, uint64_t current_time,
8  const std::string & domain,
9  const std::string & originator,
10  const std::string & endpoint)
11  : operation_ (operation),
12  receive_bandwidth_ (receive_bandwidth),
13  send_bandwidth_ (send_bandwidth),
14  message_time_ (message_time),
15  current_time_ (current_time),
16  domain_ (domain),
17  originator_ (originator),
18  endpoint_ (endpoint)
19 {
20 }
21 
23  const TransportContext & rhs)
24  : operation_ (rhs.operation_),
29  domain_ (rhs.domain_),
31  endpoint_ (rhs.endpoint_),
32  records_ (rhs.records_)
33 {
34 }
35 
37 {
38 }
39 
40 void
42  const TransportContext & rhs)
43 {
44  if (this != &rhs)
45  {
46  operation_ = rhs.operation_;
51  domain_ = rhs.domain_;
53  endpoint_ = rhs.endpoint_;
54  records_ = rhs.records_;
55  }
56 }
uint64_t send_bandwidth_
Bandwidth being utilized for send operations.
knowledge::KnowledgeMap records_
Context specific records.
std::string originator_
Originator of the current message.
Provides context about the transport.
int64_t operation_
Operation being performed.
static struct madara::knowledge::tags::string_t string
std::string endpoint_
Public endpoint of the current message.
uint64_t receive_bandwidth_
Bandwidth being utilized for receive operations.
void operator=(const TransportContext &rhs)
Assignment operator.
uint64_t current_time_
Current timestamp.
std::string domain_
Networking domain.
TransportContext(int64_t operation=IDLE_OPERATION, uint64_t receive_bandwidth=0, uint64_t send_bandwidth=0, uint64_t message_time=0, uint64_t current_time=utility::get_time(), const std::string &domain="", const std::string &originator="", const std::string &endpoint="")
Constructor.
uint64_t message_time_
Message timestamp.