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

#include <sandesh.h>

Inheritance diagram for SandeshBuffer:
Collaboration diagram for SandeshBuffer:

Public Member Functions

virtual void Process (SandeshContext *context)=0
 
SandeshBufferoperator= (const SandeshBuffer &r)
 
- Public Member Functions inherited from Sandesh
virtual size_t GetSize () const =0
 
virtual void Release ()
 
virtual void Log () const =0
 
virtual void ForcedLog () const =0
 
virtual std::string ToString () const =0
 
virtual std::string ModuleName () const =0
 
virtual int32_t Read (boost::shared_ptr< contrail::sandesh::protocol::TProtocol > iprot)=0
 
virtual int32_t Write (boost::shared_ptr< contrail::sandesh::protocol::TProtocol > oprot) const =0
 
virtual const uint32_t seqnum ()
 
virtual const int32_t versionsig () const =0
 
virtual const char * Name () const
 
bool Enqueue (SandeshQueue *queue)
 
virtual int32_t WriteBinary (u_int8_t *buf, u_int32_t buf_len, int *error)
 
virtual int32_t ReadBinary (u_int8_t *buf, u_int32_t buf_len, int *error)
 
virtual int32_t WriteBinaryToFile (const std::string &path, int *error)
 
virtual int32_t ReadBinaryFromFile (const std::string &path, int *error)
 
bool IsLoggingAllowed () const
 
time_t timestamp () const
 
void set_context (std::string context)
 
std::string context () const
 
void set_scope (std::string scope)
 
std::string scope () const
 
SandeshType::type type () const
 
void set_hints (int32_t hints)
 
int32_t hints () const
 
void set_level (SandeshLevel::type level)
 
SandeshLevel::type level () const
 
void set_category (std::string category)
 
std::string category () const
 

Protected Member Functions

 SandeshBuffer (const std::string &name, uint32_t seqno)
 
- Protected Member Functions inherited from Sandesh
void set_timestamp (time_t timestamp)
 
void set_type (SandeshType::type type)
 
void set_name (const char *name)
 
 Sandesh (SandeshType::type type, const std::string &name, uint32_t seqno)
 
 Sandesh (SandeshType::type type, const std::string &name, uint32_t seqno, bool no_time_stamp)
 
virtual ~Sandesh ()
 
virtual bool Dispatch (SandeshConnection *sconn=NULL)
 
virtual bool SendEnqueue ()
 

Additional Inherited Members

- Public Types inherited from Sandesh
typedef WorkQueue
< SandeshRequest * > 
SandeshRxQueue
 
typedef WorkQueue< SandeshElementSandeshQueue
 
typedef WorkQueue
< boost::shared_ptr
< contrail::sandesh::transport::TMemoryBuffer > > 
SandeshBufferQueue
 
typedef
boost::asio::ip::tcp::endpoint 
Endpoint
 
typedef boost::function< void(Sandesh *)> SandeshCallback
 
typedef boost::tuple< size_t,
SandeshLevel::type, bool, bool > 
QueueWaterMarkInfo
 
typedef std::map< std::string,
std::map< std::string,
std::string > > 
DerivedStats
 
- Static Public Member Functions inherited from Sandesh
static bool InitGenerator (const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, unsigned short http_port, const std::vector< std::string > &collectors, SandeshContext *client_context=NULL, DerivedStats ds=DerivedStats(), const SandeshConfig &config=SandeshConfig())
 
static bool InitGenerator (const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, unsigned short http_port, SandeshContext *client_context=NULL, DerivedStats ds=DerivedStats(), const SandeshConfig &config=SandeshConfig())
 
static void RecordPort (const std::string &name, const std::string &module, unsigned short port)
 
static bool InitCollector (const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, const std::string &collector_ip, int collector_port, unsigned short http_port, SandeshContext *client_context=NULL, const SandeshConfig &config=SandeshConfig())
 
static bool InitGeneratorTest (const std::string &module, const std::string &source, const std::string &node_type, const std::string &instance_id, EventManager *evm, unsigned short http_port, SandeshContext *client_context=NULL, const SandeshConfig &config=SandeshConfig())
 
static bool ConnectToCollector (const std::string &collector_ip, int collector_port, bool periodicuve=false)
 
static void ReConfigCollectors (const std::vector< std::string > &collector_list)
 
static void Uninit ()
 
static void SetDscpValue (uint8_t value)
 
static void DisableFlowCollection (bool disable)
 
static bool IsFlowCollectionDisabled ()
 
static void DisableSendingAllMessages (bool disable)
 
static bool IsSendingAllMessagesDisabled ()
 
static void DisableSendingObjectLogs (bool disable)
 
static bool IsSendingObjectLogsDisabled ()
 
static bool IsSendingSystemLogsDisabled ()
 
static void DisableSendingFlows (bool disable)
 
static bool IsSendingFlowsDisabled ()
 
static void set_send_rate_limit (int rate_limit)
 
static uint32_t get_send_rate_limit ()
 
static void SetLoggingParams (bool enable_local_log, std::string category, std::string level, bool enable_trace_print=false, bool enable_flow_log=false, bool enable_session_syslog=false)
 
static void SetLoggingParams (bool enable_local_log, std::string category, SandeshLevel::type level, bool enable_trace_print=false, bool enable_flow_log=false)
 
static void SetLoggingLevel (std::string level)
 
static void SetLoggingLevel (SandeshLevel::type level)
 
static SandeshLevel::type LoggingLevel ()
 
static SandeshLevel::type LoggingUtLevel ()
 
static bool IsLocalLoggingEnabled ()
 
static void SetLocalLogging (bool enable)
 
static bool IsFlowLoggingEnabled ()
 
static bool IsSloSyslogEnabled ()
 
static void SetFlowLogging (bool enable)
 
static void SetSessionSyslogging (bool enable_session_syslog)
 
static bool IsTracePrintEnabled ()
 
static void SetTracePrint (bool enable)
 
static void SetLoggingCategory (std::string category)
 
static std::string LoggingCategory ()
 
static void SetSendQueue (bool enable)
 
static bool IsSendQueueEnabled ()
 
static bool IsConnectToCollectorEnabled ()
 
static SandeshLevel::type SendingLevel ()
 
static int32_t ReceiveBinaryMsgOne (u_int8_t *buf, u_int32_t buf_len, int *error, SandeshContext *client_context)
 
static int32_t ReceiveBinaryMsg (u_int8_t *buf, u_int32_t buf_len, int *error, SandeshContext *client_context)
 
static bool SendReady (SandeshConnection *sconn=NULL)
 
static void UpdateRxMsgStats (const std::string &msg_name, uint64_t bytes)
 
static void UpdateRxMsgFailStats (const std::string &msg_name, uint64_t bytes, SandeshRxDropReason::type dreason)
 
static void UpdateTxMsgStats (const std::string &msg_name, uint64_t bytes)
 
static void UpdateTxMsgFailStats (const std::string &msg_name, uint64_t bytes, SandeshTxDropReason::type dreason)
 
static void GetMsgStats (std::vector< SandeshMessageTypeStats > *mtype_stats, SandeshMessageStats *magg_stats)
 
static void GetMsgStats (boost::ptr_map< std::string, SandeshMessageTypeStats > *mtype_stats, SandeshMessageStats *magg_stats)
 
static const char * SandeshRoleToString (SandeshRole::type role)
 
static bool IsLoggingDroppedAllowed (SandeshType::type)
 
static void set_source (std::string &source)
 
static std::string source ()
 
static void set_module (std::string &module)
 
static std::string module ()
 
static void set_instance_id (std::string &instance_id)
 
static std::string instance_id ()
 
static void set_node_type (std::string &node_type)
 
static std::string node_type ()
 
static SandeshRole::type role ()
 
static int http_port ()
 
static SandeshRxQueuerecv_queue ()
 
static SandeshContextclient_context ()
 
static void set_client_context (SandeshContext *context)
 
static SandeshContextmodule_context (const std::string &module_name)
 
static void set_module_context (const std::string &module_name, SandeshContext *context)
 
static void set_response_callback (SandeshCallback response_cb)
 
static SandeshCallback response_callback ()
 
static SandeshClientclient ()
 
static SandeshConfigconfig ()
 
static const char * LevelToString (SandeshLevel::type level)
 
static SandeshLevel::type StringToLevel (std::string level)
 
static log4cplus::Logger & logger ()
 
static log4cplus::Logger & slo_logger ()
 
static log4cplus::Logger & sampled_logger ()
 
static void set_logger_appender (const std::string &file_name, long max_file_size, int max_backup_index, const std::string &syslog_facility, const std::vector< std::string > &destn, const std::string &ident, bool is_sampled_logger)
 
static void set_send_to_collector_flags (const std::vector< std::string > &sampled_destination, const std::vector< std::string > &slo_destination)
 
static bool is_send_slo_to_collector_enabled ()
 
static bool is_send_sampled_to_collector_enabled ()
 
static bool is_send_slo_to_logger_enabled ()
 
static bool is_send_sampled_to_logger_enabled ()
 
- Static Protected Member Functions inherited from Sandesh
static bool HandleTest (SandeshLevel::type level, const std::string &category)
 
static bool IsUnitTest ()
 
static bool IsLevelUT (SandeshLevel::type level)
 
static bool IsLevelCategoryLoggingAllowed (SandeshType::type type, SandeshLevel::type level, const std::string &category)
 
- Static Protected Attributes inherited from Sandesh
static SandeshCallback response_callback_ = 0
 
static SandeshClientclient_ = NULL
 

Detailed Description

Definition at line 509 of file p/sandesh.h.

Constructor & Destructor Documentation

SandeshBuffer::SandeshBuffer ( const std::string &  name,
uint32_t  seqno 
)
inlineprotected

Definition at line 524 of file p/sandesh.h.

Member Function Documentation

SandeshBuffer& SandeshBuffer::operator= ( const SandeshBuffer r)
inline

Definition at line 512 of file p/sandesh.h.

Here is the call graph for this function:

virtual void SandeshBuffer::Process ( SandeshContext context)
pure virtual

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