1 #ifndef _MADARA_TRANSPORT_CONTEXT_H_
2 #define _MADARA_TRANSPORT_CONTEXT_H_
4 #include "madara/MadaraExport.h"
25 SENDING_OPERATION = 1,
26 RECEIVING_OPERATION = 2,
27 REBROADCASTING_OPERATION = 3
34 uint64_t receive_bandwidth = 0, uint64_t send_bandwidth = 0,
59 void clear_records(
void);
66 int64_t get_operation(
void)
const;
72 void set_operation(int64_t operation);
78 uint64_t get_receive_bandwidth(
void)
const;
84 uint64_t get_send_bandwidth(
void)
const;
90 void set_receive_bandwidth(uint64_t bandwidth);
96 void set_send_bandwidth(uint64_t bandwidth);
105 uint64_t get_message_time(
void)
const;
111 uint64_t get_current_time(
void)
const;
120 void set_message_time(uint64_t message_time);
126 void set_current_time(uint64_t current_time);
165 void set_originator(
const std::string& originator);
This class encapsulates an entry in a KnowledgeBase.
Provides context about the transport.
std::string domain_
Networking domain.
int64_t operation_
Operation being performed.
uint64_t receive_bandwidth_
Bandwidth being utilized for receive operations.
uint64_t message_time_
Message timestamp.
std::string originator_
Originator of the current message.
knowledge::KnowledgeMap records_
Context specific records.
std::string endpoint_
Public endpoint of the current message.
uint64_t current_time_
Current timestamp.
uint64_t send_bandwidth_
Bandwidth being utilized for send operations.
::std::map< std::string, KnowledgeRecord > KnowledgeMap
int64_t get_time(void)
Returns a time of day in nanoseconds If simtime feature is enabled, this may be simulation time inste...
Copyright(c) 2020 Galois.