⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 agentpp_test_mib.cpp

📁 JdonFramework need above jdk 1.4.0This version has passed under Tomcat 4.x/5.x JBoss 3.x/JBoss 4.0.0
💻 CPP
📖 第 1 页 / 共 2 页
字号:
 *  agentppTestRowCreation * * "This object can be set to the index of a new row * in the agentppTestSharedTable. If a row with the * set index already exists, this object will return zero, * otherwise it will return the last value set." */ agentppTestRowCreation::agentppTestRowCreation(const Oidx& id):    MibLeaf(id, READWRITE, new Gauge32(0), VMODE_DEFAULT){	//--AgentGen BEGIN=agentppTestRowCreation::agentppTestRowCreation	//--AgentGen END}agentppTestRowCreation::~agentppTestRowCreation(){	//--AgentGen BEGIN=agentppTestRowCreation::~agentppTestRowCreation	//--AgentGen END}MibEntryPtr agentppTestRowCreation::clone(){	MibEntryPtr other = new agentppTestRowCreation(oid);	((agentppTestRowCreation*)other)->replace_value(value->clone());	((agentppTestRowCreation*)other)->set_reference_to_table(my_table);	//--AgentGen BEGIN=agentppTestRowCreation::clone	//--AgentGen END	return other;}void agentppTestRowCreation::get_request(Request* req, int ind){	//--AgentGen BEGIN=agentppTestRowCreation::get_request	//--AgentGen END	MibLeaf::get_request(req, ind);}unsigned long agentppTestRowCreation::get_state(){	//--AgentGen BEGIN=agentppTestRowCreation::get_state	//--AgentGen END	return (unsigned long)*((Gauge32*)value);}void agentppTestRowCreation::set_state(unsigned long l){	//--AgentGen BEGIN=agentppTestRowCreation::set_state	//--AgentGen END	*((Gauge32*)value) = l;}int agentppTestRowCreation::set(const Vbx& vb){	//--AgentGen BEGIN=agentppTestRowCreation::set	unsigned long val;	vb.get_value(val);	Oidx rowIndex;	rowIndex += val;	int status = MibLeaf::set(vb);	MibTableRow* r = 	    agentppTestSharedEntry::instance->add_row(rowIndex);	if (!r)	    *((Gauge32*)value) = 0;	return status;	if (TRUE)	    return status;	else // disable the below generated statement:	//--AgentGen END	return MibLeaf::set(vb);}int agentppTestRowCreation::commit_set_request(Request* req, int ind){	//--AgentGen BEGIN=agentppTestRowCreation::commit_set_request	//--AgentGen END	return MibLeaf::commit_set_request(req, ind);}void agentppTestRowCreation::cleanup_set_request(Request* req, int& ind){	//--AgentGen BEGIN=agentppTestRowCreation::cleanup_set_request	//--AgentGen END	MibLeaf::cleanup_set_request(req, ind);}int agentppTestRowCreation::undo_set_request(Request* req, int& ind){	//--AgentGen BEGIN=agentppTestRowCreation::undo_set_request	//--AgentGen END	return MibLeaf::undo_set_request(req, ind);}boolean agentppTestRowCreation::value_ok(const Vbx& vb){	//--AgentGen BEGIN=agentppTestRowCreation::value_ok	//--AgentGen END	return TRUE;}int agentppTestRowCreation::prepare_set_request(Request* req, int& ind){	int status;	if ((status = MibLeaf::prepare_set_request(req, ind)) !=	    SNMP_ERROR_SUCCESS) return status;	//--AgentGen BEGIN=agentppTestRowCreation::prepare_set_request	//--AgentGen END	return SNMP_ERROR_SUCCESS;}//--AgentGen BEGIN=agentppTestRowCreation//--AgentGen END// Tables/** *  agentppTestSharedEntry * * "A row of a shared table. Each row is allocated and * registered in random intervals." */ agentppTestSharedEntry* agentppTestSharedEntry::instance = 0;const index_info indAgentppTestSharedEntry[1] = {	{ sNMP_SYNTAX_INT, FALSE, 1, 1 }};const Oidx indOidsAgentppTestSharedEntry[1] = {	"1.3.6.1.4.1.4976.6.3.1.3.1"};agentppTestSharedEntry::agentppTestSharedEntry(const OctetStr& context, SubAgentXMib* mib):   AgentXSharedTable(oidAgentppTestSharedEntry, indAgentppTestSharedEntry, 1, indOidsAgentppTestSharedEntry, mib, context){	// This table object is a singleton. In order to access it use	// the static pointer agentppTestSharedEntry::instance.	instance = this;	add_col(new DateAndTime(colAgentppTestSharedTableCreationTime, READONLY, VMODE_DEFAULT));	add_col(new agentppTestSharedTableDelay(colAgentppTestSharedTableDelay));	add_col(new MibLeaf(colAgentppTestSharedTableSession, READONLY, new Gauge32()));	add_col(new agentppTestSharedTableRowStatus(colAgentppTestSharedTableRowStatus));	//--AgentGen BEGIN=agentppTestSharedEntry::agentppTestSharedEntry	replace_col(nAgentppTestSharedTableSession,		    new MibLeaf(colAgentppTestSharedTableSession, 				READONLY, 				new Gauge32(mib->get_session()->get_id()),				VMODE_DEFAULT));	    	//--AgentGen END}agentppTestSharedEntry::~agentppTestSharedEntry(){	//--AgentGen BEGIN=agentppTestSharedEntry::~agentppTestSharedEntry	//--AgentGen END}void agentppTestSharedEntry::row_added(MibTableRow* row, const Oidx& index, MibTable* src){	// The row 'row' with 'index' has been added to the table.	//--AgentGen BEGIN=agentppTestSharedEntry::row_added	//--AgentGen END}void agentppTestSharedEntry::get_request(Request* req, int ind){	//--AgentGen BEGIN=agentppTestSharedEntry::get_request	//--AgentGen END	AgentXSharedTable::get_request(req, ind);}int agentppTestSharedEntry::commit_set_request(Request* req, int ind){	//--AgentGen BEGIN=agentppTestSharedEntry::commit_set_request	//--AgentGen END	return AgentXSharedTable::commit_set_request(req, ind);}int agentppTestSharedEntry::prepare_set_request(Request* req, int& ind){	//--AgentGen BEGIN=agentppTestSharedEntry::prepare_set_request	//--AgentGen END	return AgentXSharedTable::prepare_set_request(req, ind);}void agentppTestSharedEntry::cleanup_set_request(Request* req, int& ind){	//--AgentGen BEGIN=agentppTestSharedEntry::cleanup_set_request	//--AgentGen END	AgentXSharedTable::cleanup_set_request(req, ind);}int agentppTestSharedEntry::undo_set_request(Request* req, int& ind){	//--AgentGen BEGIN=agentppTestSharedEntry::undo_set_request	//--AgentGen END	return AgentXSharedTable::undo_set_request(req, ind);}void agentppTestSharedEntry::row_delete(MibTableRow* row, const Oidx& index, MibTable* src){	// The row 'row' with 'index' will be deleted.	//--AgentGen BEGIN=agentppTestSharedEntry::row_delete	//--AgentGen END}void agentppTestSharedEntry::row_init(MibTableRow* row, const Oidx& index, MibTable* src){	// The row 'row' with 'index' has been intialized.	//--AgentGen BEGIN=agentppTestSharedEntry::row_init	//--AgentGen END}void agentppTestSharedEntry::row_activated(MibTableRow* row, const Oidx& index, MibTable* src){	// The row 'row' with 'index' has been activated.	//--AgentGen BEGIN=agentppTestSharedEntry::row_activated	//--AgentGen END}void agentppTestSharedEntry::row_deactivated(MibTableRow* row, const Oidx& index, MibTable* src){	// The row 'row' with 'index' has been deactivated.	//--AgentGen BEGIN=agentppTestSharedEntry::row_deactivated	//--AgentGen END}//--AgentGen BEGIN=agentppTestSharedEntry//--AgentGen END/** *  agentppTestSessionsEntry * * "A row of this table is created by each subagent * session that implements the AGENTPP-TEST-MIB." */ agentppTestSessionsEntry* agentppTestSessionsEntry::instance = 0;const index_info indAgentppTestSessionsEntry[1] = {	{ sNMP_SYNTAX_INT, FALSE, 1, 1 }};const Oidx indOidsAgentppTestSessionsEntry[1] = {	"1.3.6.1.4.1.4976.6.3.1.4.1"};agentppTestSessionsEntry::agentppTestSessionsEntry(const OctetStr& context, SubAgentXMib* mib):   AgentXSharedTable(oidAgentppTestSessionsEntry, indAgentppTestSessionsEntry, 1, indOidsAgentppTestSessionsEntry, mib, context){	// This table object is a singleton. In order to access it use	// the static pointer agentppTestSessionsEntry::instance.	instance = this;	add_col(new agentppTestRowCreation(colAgentppTestRowCreation));	//--AgentGen BEGIN=agentppTestSessionsEntry::agentppTestSessionsEntry	//--AgentGen END}agentppTestSessionsEntry::~agentppTestSessionsEntry(){	//--AgentGen BEGIN=agentppTestSessionsEntry::~agentppTestSessionsEntry	//--AgentGen END}void agentppTestSessionsEntry::row_added(MibTableRow* row, const Oidx& index, MibTable* src){	// The row 'row' with 'index' has been added to the table.	//--AgentGen BEGIN=agentppTestSessionsEntry::row_added	//--AgentGen END}void agentppTestSessionsEntry::get_request(Request* req, int ind){	//--AgentGen BEGIN=agentppTestSessionsEntry::get_request	//--AgentGen END	AgentXSharedTable::get_request(req, ind);}int agentppTestSessionsEntry::commit_set_request(Request* req, int ind){	//--AgentGen BEGIN=agentppTestSessionsEntry::commit_set_request	//--AgentGen END	return AgentXSharedTable::commit_set_request(req, ind);}int agentppTestSessionsEntry::prepare_set_request(Request* req, int& ind){	//--AgentGen BEGIN=agentppTestSessionsEntry::prepare_set_request	//--AgentGen END	return AgentXSharedTable::prepare_set_request(req, ind);}void agentppTestSessionsEntry::cleanup_set_request(Request* req, int& ind){	//--AgentGen BEGIN=agentppTestSessionsEntry::cleanup_set_request	//--AgentGen END	AgentXSharedTable::cleanup_set_request(req, ind);}int agentppTestSessionsEntry::undo_set_request(Request* req, int& ind){	//--AgentGen BEGIN=agentppTestSessionsEntry::undo_set_request	//--AgentGen END	return AgentXSharedTable::undo_set_request(req, ind);}void agentppTestSessionsEntry::row_delete(MibTableRow* row, const Oidx& index, MibTable* src){	// The row 'row' with 'index' will be deleted.	//--AgentGen BEGIN=agentppTestSessionsEntry::row_delete	//--AgentGen END}void agentppTestSessionsEntry::row_init(MibTableRow* row, const Oidx& index, MibTable* src){	// The row 'row' with 'index' has been intialized.	//--AgentGen BEGIN=agentppTestSessionsEntry::row_init	//--AgentGen END}void agentppTestSessionsEntry::row_activated(MibTableRow* row, const Oidx& index, MibTable* src){	// The row 'row' with 'index' has been activated.	//--AgentGen BEGIN=agentppTestSessionsEntry::row_activated	//--AgentGen END}void agentppTestSessionsEntry::row_deactivated(MibTableRow* row, const Oidx& index, MibTable* src){	// The row 'row' with 'index' has been deactivated.	//--AgentGen BEGIN=agentppTestSessionsEntry::row_deactivated	//--AgentGen END}//--AgentGen BEGIN=agentppTestSessionsEntry//--AgentGen END// Notifications// Groupagentpp_test_mib::agentpp_test_mib(const OctetStr& context, SubAgentXMib* mib):   MibGroup("1.3.6.1.4.1.4976.6.3", "agentpp_test_mib"){	//--AgentGen BEGIN=agentpp_test_mib::agentpp_test_mib	//--AgentGen END	add(new agentppTestTimeout());	add(new agentppTestSharedEntry(context, mib));	add(new agentppTestSessionsEntry(context, mib));	//--AgentGen BEGIN=agentpp_test_mib::agentpp_test_mib:post	Oidx sessionIndex;	sessionIndex += mib->get_session()->get_id();	agentppTestSessionsEntry::instance->add_row(sessionIndex);	    	//--AgentGen END}//--AgentGen BEGIN=agentpp_test_mib//--AgentGen END#ifdef AGENTPP_NAMESPACE}#endif//--AgentGen BEGIN=_END//--AgentGen END#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -