1 #ifndef _MADARA_TRANSPORT_CONTEXT_H_ 2 #define _MADARA_TRANSPORT_CONTEXT_H_ 4 #include "madara/MADARA_export.h" 25 SENDING_OPERATION = 1,
26 RECEIVING_OPERATION = 2,
27 REBROADCASTING_OPERATION = 3
34 uint64_t receive_bandwidth = 0, uint64_t send_bandwidth = 0,
35 uint64_t message_time = 0, uint64_t current_time = time (NULL),
60 void clear_records (
void);
67 int64_t get_operation (
void)
const;
73 void set_operation (int64_t operation);
79 uint64_t get_receive_bandwidth (
void)
const;
85 uint64_t get_send_bandwidth (
void)
const;
92 void set_receive_bandwidth (uint64_t bandwidth);
98 void set_send_bandwidth (uint64_t bandwidth);
107 uint64_t get_message_time (
void)
const;
113 uint64_t get_current_time (
void)
const;
122 void set_message_time (uint64_t message_time);
128 void set_current_time (uint64_t current_time);
167 void set_originator (
const std::string & originator);
250 #endif // _MADARA_TRANSPORT_CONTEXT_H_ This class encapsulates an entry in a KnowledgeBase.
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.
std::string endpoint_
Public endpoint of the current message.
::std::map< std::string, KnowledgeRecord > KnowledgeMap
uint64_t receive_bandwidth_
Bandwidth being utilized for receive operations.
uint64_t current_time_
Current timestamp.
std::string domain_
Networking domain.
Copyright (c) 2015 Carnegie Mellon University.
uint64_t message_time_
Message timestamp.