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

#include <agent_profile.h>

Collaboration diagram for AgentProfile:

Public Types

typedef boost::function< void(ProfileData
*data)> 
PktFlowStatsCb
 
typedef boost::function< void(ProfileData
*data)> 
KSyncStatsCb
 
typedef boost::function< void(ProfileData
*data)> 
ProfileCb
 

Public Member Functions

 AgentProfile (Agent *agent, bool enable)
 
 ~AgentProfile ()
 
bool Init ()
 
void Shutdown ()
 
void InitDone ()
 
bool TimerRun ()
 
void Log ()
 
void RegisterPktFlowStatsCb (ProfileCb cb)
 
void RegisterKSyncStatsCb (ProfileCb cb)
 
void RegisterFlowStatsCb (ProfileCb cb)
 
void AddProfileData (ProfileData *data)
 
ProfileDataGetProfileData (uint16_t index)
 
uint16_t seconds_history_index () const
 

Static Public Attributes

static const uint32_t kProfileTimeout = 1000
 
static const uint16_t kSecondsHistoryCount = 300
 
static const uint16_t kMinutesHistoryCount = 60
 
static const uint16_t kHoursHistoryCount = 24
 

Private Member Functions

ProfileDataGetLastProfileData ()
 
 DISALLOW_COPY_AND_ASSIGN (AgentProfile)
 

Private Attributes

Agentagent_
 
Timertimer_
 
time_t start_time_
 
bool enable_
 
ProfileData one_min_data_
 
ProfileData five_min_data_
 
ProfileData fifteen_min_data_
 
ProfileData thirty_min_data_
 
ProfileData one_hr_data_
 
ProfileData four_hr_data_
 
ProfileData eight_hr_data_
 
ProfileData sixteen_hr_data_
 
ProfileData twentyfour_hr_data_
 
uint16_t seconds_history_index_
 
ProfileData seconds_history_data_ [kSecondsHistoryCount]
 
uint16_t minutes_history_index_
 
ProfileData minutes_history_data_ [kMinutesHistoryCount]
 
uint16_t hours_history_index_
 
ProfileData hours_history_data_ [kHoursHistoryCount]
 
ProfileCb pkt_flow_stats_cb_
 
ProfileCb ksync_stats_cb_
 
ProfileCb flow_stats_cb_
 

Detailed Description

Definition at line 122 of file agent_profile.h.

Member Typedef Documentation

typedef boost::function<void(ProfileData *data)> AgentProfile::KSyncStatsCb

Definition at line 129 of file agent_profile.h.

typedef boost::function<void(ProfileData *data)> AgentProfile::PktFlowStatsCb

Definition at line 128 of file agent_profile.h.

typedef boost::function<void(ProfileData *data)> AgentProfile::ProfileCb

Definition at line 130 of file agent_profile.h.

Constructor & Destructor Documentation

AgentProfile::AgentProfile ( Agent agent,
bool  enable 
)

Definition at line 28 of file agent_profile.cc.

Here is the call graph for this function:

AgentProfile::~AgentProfile ( )

Definition at line 38 of file agent_profile.cc.

Here is the call graph for this function:

Member Function Documentation

void AgentProfile::AddProfileData ( ProfileData data)
AgentProfile::DISALLOW_COPY_AND_ASSIGN ( AgentProfile  )
private
ProfileData * AgentProfile::GetLastProfileData ( )
private

Definition at line 82 of file agent_profile.cc.

ProfileData * AgentProfile::GetProfileData ( uint16_t  index)

Definition at line 88 of file agent_profile.cc.

bool AgentProfile::Init ( )
void AgentProfile::InitDone ( )

Definition at line 46 of file agent_profile.cc.

Here is the call graph for this function:

void AgentProfile::Log ( )

Definition at line 79 of file agent_profile.cc.

void AgentProfile::RegisterFlowStatsCb ( ProfileCb  cb)
inline

Definition at line 143 of file agent_profile.h.

void AgentProfile::RegisterKSyncStatsCb ( ProfileCb  cb)
inline

Definition at line 142 of file agent_profile.h.

void AgentProfile::RegisterPktFlowStatsCb ( ProfileCb  cb)
inline

Definition at line 141 of file agent_profile.h.

uint16_t AgentProfile::seconds_history_index ( ) const
inline

Definition at line 146 of file agent_profile.h.

void AgentProfile::Shutdown ( )

Definition at line 42 of file agent_profile.cc.

Here is the call graph for this function:

bool AgentProfile::TimerRun ( )

Definition at line 53 of file agent_profile.cc.

Here is the call graph for this function:

Member Data Documentation

Agent* AgentProfile::agent_
private

Definition at line 150 of file agent_profile.h.

ProfileData AgentProfile::eight_hr_data_
private

Definition at line 161 of file agent_profile.h.

bool AgentProfile::enable_
private

Definition at line 153 of file agent_profile.h.

ProfileData AgentProfile::fifteen_min_data_
private

Definition at line 157 of file agent_profile.h.

ProfileData AgentProfile::five_min_data_
private

Definition at line 156 of file agent_profile.h.

ProfileCb AgentProfile::flow_stats_cb_
private

Definition at line 174 of file agent_profile.h.

ProfileData AgentProfile::four_hr_data_
private

Definition at line 160 of file agent_profile.h.

ProfileData AgentProfile::hours_history_data_[kHoursHistoryCount]
private

Definition at line 170 of file agent_profile.h.

uint16_t AgentProfile::hours_history_index_
private

Definition at line 169 of file agent_profile.h.

const uint16_t AgentProfile::kHoursHistoryCount = 24
static

Definition at line 127 of file agent_profile.h.

const uint16_t AgentProfile::kMinutesHistoryCount = 60
static

Definition at line 126 of file agent_profile.h.

const uint32_t AgentProfile::kProfileTimeout = 1000
static

Definition at line 124 of file agent_profile.h.

const uint16_t AgentProfile::kSecondsHistoryCount = 300
static

Definition at line 125 of file agent_profile.h.

ProfileCb AgentProfile::ksync_stats_cb_
private

Definition at line 173 of file agent_profile.h.

ProfileData AgentProfile::minutes_history_data_[kMinutesHistoryCount]
private

Definition at line 168 of file agent_profile.h.

uint16_t AgentProfile::minutes_history_index_
private

Definition at line 167 of file agent_profile.h.

ProfileData AgentProfile::one_hr_data_
private

Definition at line 159 of file agent_profile.h.

ProfileData AgentProfile::one_min_data_
private

Definition at line 155 of file agent_profile.h.

ProfileCb AgentProfile::pkt_flow_stats_cb_
private

Definition at line 172 of file agent_profile.h.

ProfileData AgentProfile::seconds_history_data_[kSecondsHistoryCount]
private

Definition at line 166 of file agent_profile.h.

uint16_t AgentProfile::seconds_history_index_
private

Definition at line 165 of file agent_profile.h.

ProfileData AgentProfile::sixteen_hr_data_
private

Definition at line 162 of file agent_profile.h.

time_t AgentProfile::start_time_
private

Definition at line 152 of file agent_profile.h.

ProfileData AgentProfile::thirty_min_data_
private

Definition at line 158 of file agent_profile.h.

Timer* AgentProfile::timer_
private

Definition at line 151 of file agent_profile.h.

ProfileData AgentProfile::twentyfour_hr_data_
private

Definition at line 163 of file agent_profile.h.


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