mfea_xif.cc
来自「BCAST Implementation for NS2」· CC 代码 · 共 1,933 行 · 第 1/4 页
CC
1,933 行
if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}boolXrlMfeaV0p1Client::send_disable_mfea( const char* the_tgt, const DisableMfeaCB& cb){ Xrl x(the_tgt, "mfea/0.1/disable_mfea"); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_disable_mfea, cb));}/* Unmarshall disable_mfea */voidXrlMfeaV0p1Client::unmarshall_disable_mfea( const XrlError& e, XrlArgs* a, DisableMfeaCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}boolXrlMfeaV0p1Client::send_enable_cli( const char* the_tgt, const EnableCliCB& cb){ Xrl x(the_tgt, "mfea/0.1/enable_cli"); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_enable_cli, cb));}/* Unmarshall enable_cli */voidXrlMfeaV0p1Client::unmarshall_enable_cli( const XrlError& e, XrlArgs* a, EnableCliCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}boolXrlMfeaV0p1Client::send_disable_cli( const char* the_tgt, const DisableCliCB& cb){ Xrl x(the_tgt, "mfea/0.1/disable_cli"); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_disable_cli, cb));}/* Unmarshall disable_cli */voidXrlMfeaV0p1Client::unmarshall_disable_cli( const XrlError& e, XrlArgs* a, DisableCliCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}boolXrlMfeaV0p1Client::send_start_mfea( const char* the_tgt, const StartMfeaCB& cb){ Xrl x(the_tgt, "mfea/0.1/start_mfea"); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_start_mfea, cb));}/* Unmarshall start_mfea */voidXrlMfeaV0p1Client::unmarshall_start_mfea( const XrlError& e, XrlArgs* a, StartMfeaCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}boolXrlMfeaV0p1Client::send_stop_mfea( const char* the_tgt, const StopMfeaCB& cb){ Xrl x(the_tgt, "mfea/0.1/stop_mfea"); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_stop_mfea, cb));}/* Unmarshall stop_mfea */voidXrlMfeaV0p1Client::unmarshall_stop_mfea( const XrlError& e, XrlArgs* a, StopMfeaCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}boolXrlMfeaV0p1Client::send_start_cli( const char* the_tgt, const StartCliCB& cb){ Xrl x(the_tgt, "mfea/0.1/start_cli"); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_start_cli, cb));}/* Unmarshall start_cli */voidXrlMfeaV0p1Client::unmarshall_start_cli( const XrlError& e, XrlArgs* a, StartCliCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}boolXrlMfeaV0p1Client::send_stop_cli( const char* the_tgt, const StopCliCB& cb){ Xrl x(the_tgt, "mfea/0.1/stop_cli"); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_stop_cli, cb));}/* Unmarshall stop_cli */voidXrlMfeaV0p1Client::unmarshall_stop_cli( const XrlError& e, XrlArgs* a, StopCliCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}boolXrlMfeaV0p1Client::send_enable_log_trace( const char* the_tgt, const EnableLogTraceCB& cb){ Xrl x(the_tgt, "mfea/0.1/enable_log_trace"); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_enable_log_trace, cb));}/* Unmarshall enable_log_trace */voidXrlMfeaV0p1Client::unmarshall_enable_log_trace( const XrlError& e, XrlArgs* a, EnableLogTraceCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}boolXrlMfeaV0p1Client::send_disable_log_trace( const char* the_tgt, const DisableLogTraceCB& cb){ Xrl x(the_tgt, "mfea/0.1/disable_log_trace"); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_disable_log_trace, cb));}/* Unmarshall disable_log_trace */voidXrlMfeaV0p1Client::unmarshall_disable_log_trace( const XrlError& e, XrlArgs* a, DisableLogTraceCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}boolXrlMfeaV0p1Client::send_get_mrib_table_default_metric_preference( const char* the_tgt, const GetMribTableDefaultMetricPreferenceCB& cb){ Xrl x(the_tgt, "mfea/0.1/get_mrib_table_default_metric_preference"); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_get_mrib_table_default_metric_preference, cb));}/* Unmarshall get_mrib_table_default_metric_preference */voidXrlMfeaV0p1Client::unmarshall_get_mrib_table_default_metric_preference( const XrlError& e, XrlArgs* a, GetMribTableDefaultMetricPreferenceCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e, 0); return; } else if (a && a->size() != 1) { XLOG_ERROR("Wrong number of arguments (%u != 1)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS(), 0); return; } uint32_t metric_preference; try { a->get("metric_preference", metric_preference); } catch (const XrlArgs::XrlAtomNotFound&) { XLOG_ERROR("Atom not found"); cb->dispatch(XrlError::BAD_ARGS(), 0); return; } cb->dispatch(e, &metric_preference);}boolXrlMfeaV0p1Client::send_set_mrib_table_default_metric_preference( const char* the_tgt, const uint32_t& metric_preference, const SetMribTableDefaultMetricPreferenceCB& cb){ Xrl x(the_tgt, "mfea/0.1/set_mrib_table_default_metric_preference"); x.args().add("metric_preference", metric_preference); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_set_mrib_table_default_metric_preference, cb));}/* Unmarshall set_mrib_table_default_metric_preference */voidXrlMfeaV0p1Client::unmarshall_set_mrib_table_default_metric_preference( const XrlError& e, XrlArgs* a, SetMribTableDefaultMetricPreferenceCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}boolXrlMfeaV0p1Client::send_reset_mrib_table_default_metric_preference( const char* the_tgt, const ResetMribTableDefaultMetricPreferenceCB& cb){ Xrl x(the_tgt, "mfea/0.1/reset_mrib_table_default_metric_preference"); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_reset_mrib_table_default_metric_preference, cb));}/* Unmarshall reset_mrib_table_default_metric_preference */voidXrlMfeaV0p1Client::unmarshall_reset_mrib_table_default_metric_preference( const XrlError& e, XrlArgs* a, ResetMribTableDefaultMetricPreferenceCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}boolXrlMfeaV0p1Client::send_get_mrib_table_default_metric( const char* the_tgt, const GetMribTableDefaultMetricCB& cb){ Xrl x(the_tgt, "mfea/0.1/get_mrib_table_default_metric"); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_get_mrib_table_default_metric, cb));}/* Unmarshall get_mrib_table_default_metric */voidXrlMfeaV0p1Client::unmarshall_get_mrib_table_default_metric( const XrlError& e, XrlArgs* a, GetMribTableDefaultMetricCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e, 0); return; } else if (a && a->size() != 1) { XLOG_ERROR("Wrong number of arguments (%u != 1)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS(), 0); return; } uint32_t metric; try { a->get("metric", metric); } catch (const XrlArgs::XrlAtomNotFound&) { XLOG_ERROR("Atom not found"); cb->dispatch(XrlError::BAD_ARGS(), 0); return; } cb->dispatch(e, &metric);}boolXrlMfeaV0p1Client::send_set_mrib_table_default_metric( const char* the_tgt, const uint32_t& metric, const SetMribTableDefaultMetricCB& cb){ Xrl x(the_tgt, "mfea/0.1/set_mrib_table_default_metric"); x.args().add("metric", metric); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_set_mrib_table_default_metric, cb));}/* Unmarshall set_mrib_table_default_metric */voidXrlMfeaV0p1Client::unmarshall_set_mrib_table_default_metric( const XrlError& e, XrlArgs* a, SetMribTableDefaultMetricCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}boolXrlMfeaV0p1Client::send_reset_mrib_table_default_metric( const char* the_tgt, const ResetMribTableDefaultMetricCB& cb){ Xrl x(the_tgt, "mfea/0.1/reset_mrib_table_default_metric"); return _sender->send(x, callback(this, &XrlMfeaV0p1Client::unmarshall_reset_mrib_table_default_metric, cb));}/* Unmarshall reset_mrib_table_default_metric */voidXrlMfeaV0p1Client::unmarshall_reset_mrib_table_default_metric( const XrlError& e, XrlArgs* a, ResetMribTableDefaultMetricCB cb){ if (e != XrlError::OKAY()) { cb->dispatch(e); return; } else if (a && a->size() != 0) { XLOG_ERROR("Wrong number of arguments (%u != 0)", (uint32_t)a->size()); cb->dispatch(XrlError::BAD_ARGS()); return; } cb->dispatch(e);}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?