Belle II Software  release-08-01-10
NSMCallback Class Reference
Inheritance diagram for NSMCallback:
Collaboration diagram for NSMCallback:

Public Member Functions

 NSMCallback (int timeout=5)
 
virtual void init (NSMCommunicator &)
 
virtual void term ()
 
virtual void timeout (NSMCommunicator &)
 
bool perform (NSMCommunicator &com) override
 
virtual void ok (const char *, const char *)
 
virtual void fatal (const char *, const char *)
 
virtual void error (const char *, const char *)
 
virtual void logset (const DAQLogMessage &)
 
virtual void vget (const std::string &nodename, const std::string &vname)
 
virtual void vset (NSMCommunicator &com, const NSMVar &var)
 
virtual void vlistget (NSMCommunicator &com)
 
virtual void vlistset (NSMCommunicator &com)
 
virtual void vreply (NSMCommunicator &, const std::string &, bool)
 
void reply (const NSMMessage &msg)
 
void log (LogFile::Priority pri, const char *format,...)
 
void log (LogFile::Priority pri, const std::string &msg)
 
int reset ()
 
NSMDataMap & getDataMap ()
 
NSMDatagetData (const std::string &name)
 
NSMDatagetData ()
 
void openData (const std::string &name, const std::string &format, int revision=-1)
 
void allocData (const std::string &name, const std::string &format, int revision)
 
const std::string & getCategory () const
 
void setCategory (const std::string &category)
 
int addDB (const DBObject &obj)
 
bool get (const NSMNode &node, const std::string &name, int &val, int timeout=5)
 
bool get (const NSMNode &node, const std::string &name, float &val, int timeout=5)
 
bool get (const NSMNode &node, const std::string &name, std::string &val, int timeout=5)
 
bool get (const NSMNode &node, const std::string &name, std::vector< int > &val, int timeout=5)
 
bool get (const NSMNode &node, const std::string &name, std::vector< float > &val, int timeout=5)
 
bool get (const NSMNode &node, NSMVHandler *handler, int timeout=5)
 
bool get (const DBObject &obj)
 
bool get (const std::string &name, int &val)
 
bool get (const std::string &name, float &val)
 
bool get (const std::string &name, std::string &val)
 
bool get (const std::string &name, std::vector< int > &val)
 
bool get (const std::string &name, std::vector< float > &val)
 
bool get (const std::string &node, const std::string &name, int &val)
 
bool get (const std::string &node, const std::string &name, float &val)
 
bool get (const std::string &node, const std::string &name, std::string &val)
 
bool get (const std::string &node, const std::string &name, std::vector< int > &val)
 
bool get (const std::string &node, const std::string &name, std::vector< float > &val)
 
bool get (const NSMNode &node, NSMVar &var, int timeout=5)
 
bool set (const NSMNode &node, const std::string &name, int val, int timeout=5)
 
bool set (const NSMNode &node, const std::string &name, float val, int timeout=5)
 
bool set (const NSMNode &node, const std::string &name, const std::string &val, int timeout=5)
 
bool set (const NSMNode &node, const std::string &name, const std::vector< int > &val, int timeout=5)
 
bool set (const NSMNode &node, const std::string &name, const std::vector< float > &val, int timeout=5)
 
bool set (const std::string &name, int val)
 
bool set (const std::string &name, float val)
 
bool set (const std::string &name, const std::string &val)
 
bool set (const std::string &name, const std::vector< int > &val)
 
bool set (const std::string &name, const std::vector< float > &val)
 
bool set (const std::string &node, const std::string &name, int val)
 
bool set (const std::string &node, const std::string &name, float val)
 
bool set (const std::string &node, const std::string &name, const std::string &val)
 
bool set (const std::string &node, const std::string &name, const std::vector< int > &val)
 
bool set (const std::string &node, const std::string &name, const std::vector< float > &val)
 
bool set (const NSMNode &node, const NSMVar &var, int timeout=5)
 
int wait (double timeout=5)
 
NSMCommunicatorwait (const NSMNode &node, const NSMCommand &cmd, double timeout=5)
 
bool try_wait ()
 
NSMNodegetNode ()
 
const NSMNodegetNode () const
 
void setNode (const NSMNode &node)
 
int getTimeout () const
 
void setTimeout (int timeout)
 
int add (NSMVHandler *handler, bool overwrite=true, bool isdump=true)
 
void remove (const std::string &node, const std::string &name)
 
void remove (const std::string &name)
 
void remove (const DBObject &obj)
 
StringList & getHandlerNames ()
 
NSMVHandlerList & getHandlers ()
 
NSMVHandlergetHandler (const std::string &name)
 
NSMVHandlergetHandler (const std::string &node, const std::string &name)
 
void setUseGet (const std::string &name, bool use)
 
void setUseSet (const std::string &name, bool use)
 
void setRevision (int revision)
 
int getRevision () const
 

Protected Member Functions

void notify (const NSMVar &var) override
 
void reg (const NSMCommand &cmd)
 
void addNode (const NSMNode &node)
 
const NSMNodeMap & getNodes ()
 
void setLogNode (const NSMNode &node)
 
const NSMNodegetLogNode ()
 
void readVar (const NSMMessage &msg, NSMVar &var)
 

Private Types

typedef std::vector< NSMCommandNSMCommandList
 

Private Member Functions

int addDefaultHandlers ()
 
NSMCommandList & getCommandList ()
 
void alloc_open (NSMCommunicator &com)
 
template<typename T >
bool get_t (const NSMNode &node, const std::string &name, T &val, int timeout, NSMVar::Type type=NSMVar::NONE, int len=0)
 
template<typename T >
bool get_t (const std::string &node, const std::string &name, T &val)
 
template<typename T >
bool set_t (const std::string &node, const std::string &name, const T &val)
 
NSMVHandlergetHandler_p (const std::string &node, const std::string &name)
 

Private Attributes

NSMCommandList m_cmd_v
 
NSMNodeMap m_nodes
 
NSMData m_data
 
NSMDataMap m_datas
 
NSMNode m_lognode
 
std::string m_category
 
NSMNode m_node
 
int m_timeout
 
NSMNodeMapMap m_node_v_m
 
int m_revision
 
NSMVHandlerList m_handler
 
StringList m_hnames
 

Friends

class NSMCommunicator
 
class NSMNodeDaemon
 

Detailed Description

Definition at line 31 of file NSMCallback.h.


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