bcast_xif.cc

来自「BCAST Implementation for NS2」· CC 代码 · 共 323 行

CC
323
字号
/* * Copyright (c) 2001-2003 International Computer Science Institute * See LICENSE file for licensing, conditions, and warranties on use. * * DO NOT EDIT THIS FILE - IT IS PROGRAMMATICALLY GENERATED * * Generated by 'clnt-gen'. */#ident "$XORP$"#include "bcast_xif.hh"boolXrlBcastV1p0Client::send_set_hello_interval(	const char*	the_tgt, 	const int32_t&	new_int, 	const SetHelloIntervalCB&	cb){    Xrl x(the_tgt, "bcast/1.0/set_hello_interval");    x.args().add("new_int", new_int);    return _sender->send(x, callback(this, &XrlBcastV1p0Client::unmarshall_set_hello_interval, cb));}/* Unmarshall set_hello_interval */voidXrlBcastV1p0Client::unmarshall_set_hello_interval(	const XrlError&	e, 	XrlArgs*	a, 	SetHelloIntervalCB		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);}boolXrlBcastV1p0Client::send_get_hello_interval(	const char*	the_tgt, 	const GetHelloIntervalCB&	cb){    Xrl x(the_tgt, "bcast/1.0/get_hello_interval");    return _sender->send(x, callback(this, &XrlBcastV1p0Client::unmarshall_get_hello_interval, cb));}/* Unmarshall get_hello_interval */voidXrlBcastV1p0Client::unmarshall_get_hello_interval(	const XrlError&	e, 	XrlArgs*	a, 	GetHelloIntervalCB		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;    }    int32_t old_int;    try {	a->get("old_int", old_int);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &old_int);}boolXrlBcastV1p0Client::send_set_buffer_size(	const char*	the_tgt, 	const int32_t&	new_buf, 	const SetBufferSizeCB&	cb){    Xrl x(the_tgt, "bcast/1.0/set_buffer_size");    x.args().add("new_buf", new_buf);    return _sender->send(x, callback(this, &XrlBcastV1p0Client::unmarshall_set_buffer_size, cb));}/* Unmarshall set_buffer_size */voidXrlBcastV1p0Client::unmarshall_set_buffer_size(	const XrlError&	e, 	XrlArgs*	a, 	SetBufferSizeCB		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);}boolXrlBcastV1p0Client::send_get_buffer_size(	const char*	the_tgt, 	const GetBufferSizeCB&	cb){    Xrl x(the_tgt, "bcast/1.0/get_buffer_size");    return _sender->send(x, callback(this, &XrlBcastV1p0Client::unmarshall_get_buffer_size, cb));}/* Unmarshall get_buffer_size */voidXrlBcastV1p0Client::unmarshall_get_buffer_size(	const XrlError&	e, 	XrlArgs*	a, 	GetBufferSizeCB		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;    }    int32_t old_buf;    try {	a->get("old_buf", old_buf);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &old_buf);}boolXrlBcastV1p0Client::send_set_reliability(	const char*	the_tgt, 	const bool&	reliability, 	const SetReliabilityCB&	cb){    Xrl x(the_tgt, "bcast/1.0/set_reliability");    x.args().add("reliability", reliability);    return _sender->send(x, callback(this, &XrlBcastV1p0Client::unmarshall_set_reliability, cb));}/* Unmarshall set_reliability */voidXrlBcastV1p0Client::unmarshall_set_reliability(	const XrlError&	e, 	XrlArgs*	a, 	SetReliabilityCB		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);}boolXrlBcastV1p0Client::send_get_reliability(	const char*	the_tgt, 	const GetReliabilityCB&	cb){    Xrl x(the_tgt, "bcast/1.0/get_reliability");    return _sender->send(x, callback(this, &XrlBcastV1p0Client::unmarshall_get_reliability, cb));}/* Unmarshall get_reliability */voidXrlBcastV1p0Client::unmarshall_get_reliability(	const XrlError&	e, 	XrlArgs*	a, 	GetReliabilityCB		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;    }    bool reliability;    try {	a->get("reliability", reliability);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &reliability);}boolXrlBcastV1p0Client::send_set_interface(	const char*	the_tgt, 	const string&	intf, 	const SetInterfaceCB&	cb){    Xrl x(the_tgt, "bcast/1.0/set_interface");    x.args().add("intf", intf);    return _sender->send(x, callback(this, &XrlBcastV1p0Client::unmarshall_set_interface, cb));}/* Unmarshall set_interface */voidXrlBcastV1p0Client::unmarshall_set_interface(	const XrlError&	e, 	XrlArgs*	a, 	SetInterfaceCB		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);}boolXrlBcastV1p0Client::send_get_interface(	const char*	the_tgt, 	const GetInterfaceCB&	cb){    Xrl x(the_tgt, "bcast/1.0/get_interface");    return _sender->send(x, callback(this, &XrlBcastV1p0Client::unmarshall_get_interface, cb));}/* Unmarshall get_interface */voidXrlBcastV1p0Client::unmarshall_get_interface(	const XrlError&	e, 	XrlArgs*	a, 	GetInterfaceCB		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;    }    string intf;    try {	a->get("intf", intf);    } catch (const XrlArgs::XrlAtomNotFound&) {	XLOG_ERROR("Atom not found");	cb->dispatch(XrlError::BAD_ARGS(), 0);	return;    }    cb->dispatch(e, &intf);}boolXrlBcastV1p0Client::send_activate_bcast(	const char*	the_tgt, 	const ActivateBcastCB&	cb){    Xrl x(the_tgt, "bcast/1.0/activate_bcast");    return _sender->send(x, callback(this, &XrlBcastV1p0Client::unmarshall_activate_bcast, cb));}/* Unmarshall activate_bcast */voidXrlBcastV1p0Client::unmarshall_activate_bcast(	const XrlError&	e, 	XrlArgs*	a, 	ActivateBcastCB		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 + -
显示快捷键?