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

#include <sandesh_client_sm.h>

Inheritance diagram for SandeshClientSM:
Collaboration diagram for SandeshClientSM:

Classes

class  Mgr
 

Public Types

enum  State {
  IDLE = 0, DISCONNECT = 1, CONNECT = 2, CLIENT_INIT = 3,
  ESTABLISHED = 4
}
 

Public Member Functions

State state () const
 
virtual const std::string & StateName () const =0
 
SandeshSessionsession ()
 
TcpServer::Endpoint server ()
 
virtual void SetAdminState (bool down)=0
 
virtual void SetCollectors (const std::vector< TcpServer::Endpoint > &collectors)=0
 
virtual bool SendSandeshUVE (Sandesh *snh)=0
 
virtual bool SendSandesh (Sandesh *snh)=0
 
virtual ~SandeshClientSM ()
 

Static Public Member Functions

static SandeshClientSMCreateClientSM (EventManager *evm, Mgr *mgr, int sm_task_instance, int sm_task_id, bool periodicuve)
 

Static Public Attributes

static const int kTickInterval = 30000
 

Protected Member Functions

 SandeshClientSM (Mgr *mgr)
 
virtual void EnqueDelSession (SandeshSession *session)=0
 
void set_session (SandeshSession *session, bool enq)
 
bool send_session (Sandesh *snh)
 
void set_server (TcpServer::Endpoint e)
 

Protected Attributes

Mgr *const mgr_
 
tbb::atomic< Statestate_
 

Private Attributes

tbb::mutex mtex_
 
tbb::atomic< SandeshSession * > session_
 
TcpServer::Endpoint server_
 

Friends

class SandeshClientStateMachineTest
 

Detailed Description

Definition at line 33 of file sandesh_client_sm.h.

Member Enumeration Documentation

Enumerator
IDLE 
DISCONNECT 
CONNECT 
CLIENT_INIT 
ESTABLISHED 

Definition at line 56 of file sandesh_client_sm.h.

Constructor & Destructor Documentation

virtual SandeshClientSM::~SandeshClientSM ( )
inlinevirtual

Definition at line 87 of file sandesh_client_sm.h.

SandeshClientSM::SandeshClientSM ( Mgr mgr)
inlineprotected

Definition at line 90 of file sandesh_client_sm.h.

Member Function Documentation

SandeshClientSM * SandeshClientSM::CreateClientSM ( EventManager evm,
Mgr mgr,
int  sm_task_instance,
int  sm_task_id,
bool  periodicuve 
)
static

Definition at line 1059 of file sandesh_client_sm.cc.

virtual void SandeshClientSM::EnqueDelSession ( SandeshSession session)
protectedpure virtual

Implemented in SandeshClientSMImpl.

bool SandeshClientSM::send_session ( Sandesh snh)
inlineprotected

Definition at line 105 of file sandesh_client_sm.h.

Here is the call graph for this function:

virtual bool SandeshClientSM::SendSandesh ( Sandesh snh)
pure virtual

Implemented in SandeshClientSMImpl.

virtual bool SandeshClientSM::SendSandeshUVE ( Sandesh snh)
pure virtual

Implemented in SandeshClientSMImpl.

TcpServer::Endpoint SandeshClientSM::server ( )
inline

Definition at line 71 of file sandesh_client_sm.h.

SandeshSession* SandeshClientSM::session ( )
inline

Definition at line 68 of file sandesh_client_sm.h.

void SandeshClientSM::set_server ( TcpServer::Endpoint  e)
inlineprotected

Definition at line 109 of file sandesh_client_sm.h.

void SandeshClientSM::set_session ( SandeshSession session,
bool  enq 
)
inlineprotected

Definition at line 94 of file sandesh_client_sm.h.

Here is the call graph for this function:

virtual void SandeshClientSM::SetAdminState ( bool  down)
pure virtual

Implemented in SandeshClientSMImpl.

virtual void SandeshClientSM::SetCollectors ( const std::vector< TcpServer::Endpoint > &  collectors)
pure virtual

Implemented in SandeshClientSMImpl.

State SandeshClientSM::state ( ) const
inline

Definition at line 66 of file sandesh_client_sm.h.

virtual const std::string& SandeshClientSM::StateName ( ) const
pure virtual

Implemented in SandeshClientSMImpl.

Friends And Related Function Documentation

friend class SandeshClientStateMachineTest
friend

Definition at line 121 of file sandesh_client_sm.h.

Member Data Documentation

const int SandeshClientSM::kTickInterval = 30000
static

Definition at line 63 of file sandesh_client_sm.h.

Mgr* const SandeshClientSM::mgr_
protected

Definition at line 113 of file sandesh_client_sm.h.

tbb::mutex SandeshClientSM::mtex_
private

Definition at line 117 of file sandesh_client_sm.h.

TcpServer::Endpoint SandeshClientSM::server_
private

Definition at line 119 of file sandesh_client_sm.h.

tbb::atomic<SandeshSession *> SandeshClientSM::session_
private

Definition at line 118 of file sandesh_client_sm.h.

tbb::atomic<State> SandeshClientSM::state_
protected

Definition at line 114 of file sandesh_client_sm.h.


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