OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DiagProto Class Reference

#include <diag_proto.h>

Inheritance diagram for DiagProto:
Collaboration diagram for DiagProto:

Classes

struct  DiagStats
 

Public Types

enum  DiagStatsType { REQUESTS_SENT, REQUESTS_RECEIVED, REPLIES_SENT, REPLIES_RECEIVED }
 
typedef std::map< uint32_t,
SegmentHealthCheckPkt * > 
SessionMap
 
typedef std::pair< uint32_t,
SegmentHealthCheckPkt * > 
SessionPair
 
typedef std::map< uint32_t,
DiagStats
DiagStatsMap
 
typedef std::pair< uint32_t,
DiagStats
DiagStatsPair
 
- Public Types inherited from Proto
typedef WorkQueue
< boost::shared_ptr< PktInfo > > 
ProtoWorkQueue
 

Public Member Functions

 DiagProto (Agent *agent, boost::asio::io_context &io)
 
virtual ~DiagProto ()
 
ProtoHandlerAllocProtoHandler (boost::shared_ptr< PktInfo > info, boost::asio::io_context &io)
 
bool SegmentHealthCheckProcess (HealthCheckTable::HealthCheckServiceAction action, HealthCheckInstanceService *service)
 
void IncrementDiagStats (uint32_t itf_id, DiagStatsType type)
 
const DiagStatsMapstats () const
 
void FillSandeshHealthCheckResponse (SegmentHealthCheckPktStatsResp *resp)
 
- Public Member Functions inherited from Proto
 Proto (Agent *agent, const char *task_name, PktHandler::PktModuleName mod, boost::asio::io_context &io)
 
virtual ~Proto ()
 
virtual bool Validate (PktInfo *msg)
 
virtual bool Enqueue (boost::shared_ptr< PktInfo > msg)
 
virtual void ProcessStats (PktStatsType::Type type)
 
void FreeBuffer (PktInfo *msg)
 
bool ProcessProto (boost::shared_ptr< PktInfo > msg_info)
 
bool RunProtoHandler (ProtoHandler *handler)
 
void set_trace (bool val)
 
void set_free_buffer (bool val)
 
boost::asio::io_context & get_io_service () const
 
Agentagent () const
 
const ProtoWorkQueuework_queue () const
 
virtual void TokenAvailable (TokenPool *pool)
 

Private Member Functions

 DISALLOW_COPY_AND_ASSIGN (DiagProto)
 

Private Attributes

SessionMap session_map_
 
tbb::mutex stats_mutex_
 
DiagStatsMap stats_
 

Additional Inherited Members

- Protected Attributes inherited from Proto
Agentagent_
 
PktHandler::PktModuleName module_
 
bool trace_
 
bool free_buffer_
 
boost::asio::io_context & io_
 
ProtoWorkQueue work_queue_
 

Detailed Description

Definition at line 16 of file diag_proto.h.

Member Typedef Documentation

typedef std::map<uint32_t, DiagStats> DiagProto::DiagStatsMap

Definition at line 40 of file diag_proto.h.

typedef std::pair<uint32_t, DiagStats> DiagProto::DiagStatsPair

Definition at line 41 of file diag_proto.h.

typedef std::map<uint32_t, SegmentHealthCheckPkt *> DiagProto::SessionMap

Definition at line 19 of file diag_proto.h.

typedef std::pair<uint32_t, SegmentHealthCheckPkt *> DiagProto::SessionPair

Definition at line 20 of file diag_proto.h.

Member Enumeration Documentation

Enumerator
REQUESTS_SENT 
REQUESTS_RECEIVED 
REPLIES_SENT 
REPLIES_RECEIVED 

Definition at line 22 of file diag_proto.h.

Constructor & Destructor Documentation

DiagProto::DiagProto ( Agent agent,
boost::asio::io_context &  io 
)

Definition at line 16 of file diag_proto.cc.

Here is the call graph for this function:

virtual DiagProto::~DiagProto ( )
inlinevirtual

Definition at line 44 of file diag_proto.h.

Member Function Documentation

ProtoHandler * DiagProto::AllocProtoHandler ( boost::shared_ptr< PktInfo info,
boost::asio::io_context &  io 
)
virtual

Implements Proto.

Definition at line 24 of file diag_proto.cc.

Here is the call graph for this function:

DiagProto::DISALLOW_COPY_AND_ASSIGN ( DiagProto  )
private
void DiagProto::FillSandeshHealthCheckResponse ( SegmentHealthCheckPktStatsResp *  resp)

Definition at line 118 of file diag_proto.cc.

void DiagProto::IncrementDiagStats ( uint32_t  itf_id,
DiagStatsType  type 
)

Definition at line 93 of file diag_proto.cc.

bool DiagProto::SegmentHealthCheckProcess ( HealthCheckTable::HealthCheckServiceAction  action,
HealthCheckInstanceService service 
)

Definition at line 29 of file diag_proto.cc.

Here is the call graph for this function:

const DiagStatsMap& DiagProto::stats ( ) const
inline

Definition at line 52 of file diag_proto.h.

Member Data Documentation

SessionMap DiagProto::session_map_
private

Definition at line 56 of file diag_proto.h.

DiagStatsMap DiagProto::stats_
private

Definition at line 65 of file diag_proto.h.

tbb::mutex DiagProto::stats_mutex_
private

Definition at line 64 of file diag_proto.h.


The documentation for this class was generated from the following files: