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

#include <flow_kstate.h>

Inheritance diagram for FlowKState:
Collaboration diagram for FlowKState:

Public Member Functions

 FlowKState (Agent *agent, const std::string &resp_ctx, int idx)
 
 FlowKState (Agent *agent, const std::string &resp_ctx, const std::string &iter_idx)
 
virtual void SendResponse (KFlowResp *resp) const
 
virtual bool Run ()
 Code to execute. Returns true if task is completed. Return false to reschedule the task. More...
 
std::string Description () const
 
void SetFlowData (std::vector< KFlowInfo > &list, const vr_flow_entry *k_flow, int index) const
 
void set_evicted_flag (bool show_evicted)
 
- Public Member Functions inherited from Task
 Task (int task_id, int task_instance)
 
 Task (int task_id)
 
virtual ~Task ()
 
virtual void OnTaskCancel ()
 Called on task exit, if it is marked for cancellation. If the user wants to do any cleanup on task cancellation, then he/she can overload this function. More...
 
State GetState () const
 
int GetTaskId () const
 
int GetTaskInstance () const
 
uint64_t GetSeqno () const
 
bool task_cancelled () const
 
uint64_t enqueue_time () const
 
uint64_t schedule_time () const
 
uint32_t execute_delay () const
 
uint32_t schedule_delay () const
 

Protected Attributes

std::string response_context_
 
int flow_idx_
 
bool evicted_
 
uint32_t flow_iteration_key_
 

Private Member Functions

void UpdateFlagStr (std::string &str, bool &set, bool tcp, unsigned sflag, unsigned cflag) const
 
const std::string FlagToStr (unsigned int flag) const
 
const std::string TcpFlagToStr (unsigned int flag) const
 
const std::string DropCodeToStr (uint8_t drop_code) const
 
void SetFlowHandle (KFlowResp *resp, const uint32_t idx) const
 

Private Attributes

Agentagent_
 

Additional Inherited Members

- Public Types inherited from Task
enum  State { INIT, WAIT, RUN }
 Task states. More...
 
enum  TbbState { TBB_INIT, TBB_ENQUEUED, TBB_EXEC, TBB_DONE }
 
- Static Public Member Functions inherited from Task
static TaskRunning ()
 Returns a pointer to the current task the code is executing under. More...
 
- Static Public Attributes inherited from Task
static const int kTaskInstanceAny = -1
 

Detailed Description

Definition at line 8 of file flow_kstate.h.

Constructor & Destructor Documentation

FlowKState::FlowKState ( Agent agent,
const std::string &  resp_ctx,
int  idx 
)
FlowKState::FlowKState ( Agent agent,
const std::string &  resp_ctx,
const std::string &  iter_idx 
)

Member Function Documentation

std::string FlowKState::Description ( ) const
inlinevirtual

Implements Task.

Definition at line 16 of file flow_kstate.h.

const std::string FlowKState::DropCodeToStr ( uint8_t  drop_code) const
private

Definition at line 117 of file flow_kstate.cc.

const string FlowKState::FlagToStr ( unsigned int  flag) const
private

Definition at line 41 of file flow_kstate.cc.

bool FlowKState::Run ( )
virtual

Code to execute. Returns true if task is completed. Return false to reschedule the task.

Implements Task.

Definition at line 293 of file flow_kstate.cc.

Here is the call graph for this function:

void FlowKState::SendResponse ( KFlowResp *  resp) const
virtual

Definition at line 36 of file flow_kstate.cc.

void FlowKState::set_evicted_flag ( bool  show_evicted)
inline

Definition at line 19 of file flow_kstate.h.

void FlowKState::SetFlowData ( std::vector< KFlowInfo > &  list,
const vr_flow_entry *  k_flow,
int  index 
) const

Definition at line 180 of file flow_kstate.cc.

Here is the call graph for this function:

void FlowKState::SetFlowHandle ( KFlowResp *  resp,
const uint32_t  idx 
) const
private

Definition at line 172 of file flow_kstate.cc.

Here is the call graph for this function:

const string FlowKState::TcpFlagToStr ( unsigned int  flag) const
private

Definition at line 74 of file flow_kstate.cc.

void FlowKState::UpdateFlagStr ( std::string &  str,
bool &  set,
bool  tcp,
unsigned  sflag,
unsigned  cflag 
) const
private

Definition at line 99 of file flow_kstate.cc.

Here is the call graph for this function:

Member Data Documentation

Agent* FlowKState::agent_
private

Definition at line 26 of file flow_kstate.h.

bool FlowKState::evicted_
protected

Definition at line 23 of file flow_kstate.h.

int FlowKState::flow_idx_
protected

Definition at line 22 of file flow_kstate.h.

uint32_t FlowKState::flow_iteration_key_
protected

Definition at line 24 of file flow_kstate.h.

std::string FlowKState::response_context_
protected

Definition at line 21 of file flow_kstate.h.


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