本文整理汇总了C++中xmlrpc_c::paramList::getInt方法的典型用法代码示例。如果您正苦于以下问题:C++ paramList::getInt方法的具体用法?C++ paramList::getInt怎么用?C++ paramList::getInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类xmlrpc_c::paramList
的用法示例。
在下文中一共展示了paramList::getInt方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addend
void
execute(xmlrpc_c::paramList const& paramList,
value * const retvalP) {
int const addend(paramList.getInt(0));
int const adder(paramList.getInt(1));
paramList.verifyEnd(2);
*retvalP = value_int(addend + adder);
}
示例2: addend
void
execute(xmlrpc_c::paramList const& paramList,
xmlrpc_c::value * const retvalP) {
int const addend(paramList.getInt(0));
int const adder(paramList.getInt(1));
paramList.verifyEnd(2);
*retvalP = xmlrpc_c::value_int(addend + adder);
// Sometimes, make it look hard (so client can see what it's like
// to do an RPC that takes a while).
if (adder == 1)
SLEEP(2);
}
示例3: Exception
void devTcp4Client_Interface::client_create(xmlrpc_c::paramList const& paramList,
xmlrpc_c::value* retvalP) {
ACE_TRACE("devTcp4Client_Interface::create");
std::string devname = static_cast<std::string>(paramList.getString(0));
if (devices::instance()->exists(devname)) {
throw Exception("Device with that name already exists.");
}
std::string address = IPv4Addr::IPv4_Any;
int port = 0;
devTcp4Client* tcp4_dev = new devTcp4Client(devname, this);
devices::instance()->add(tcp4_dev);
if (paramList.size() > 1) {
address = static_cast<std::string>(paramList.getString(2));
tcp4_dev->setAddress(address);
}
if (paramList.size() > 2) {
port = static_cast<int>(paramList.getInt(3));
tcp4_dev->setPort(port);
if (port > 0) tcp4_dev->openConnection();
}
*retvalP = xmlrpc_c::value_nil();
}
示例4: state
void
execute(const xmlrpc_c::paramList & paramList, xmlrpc_c::value* retvalP) {
// Get the requested mode
int const state(paramList.getInt(0));
paramList.verifyEnd(1);
ILOG << "Received 'setApsValveControl(" << state << ")' command";
TheApsControl->setValveControl(static_cast<ApsControl::ValveControlState>(state));
*retvalP = xmlrpc_c::value_nil();
}
示例5:
void devTcp4Client_Interface::client_set_ms_between_attempts(xmlrpc_c::paramList const& paramList,
xmlrpc_c::value* retvalP) {
ACE_TRACE("devTcp4Client_Interface::client_set_ms_between_attempts");
std::string devname = static_cast<std::string>(paramList.getString(0));
int ms = static_cast<int>(paramList.getInt(1));
devTcp4Client* tcp4_dev = dynamic_cast<devTcp4Client*>(devices::instance()->device(devname));
tcp4_dev->setMsBetweenAttempts(ms);
*retvalP = xmlrpc_c::value_nil();
}
示例6: iMode
void
execute(const xmlrpc_c::paramList & paramList, xmlrpc_c::value* retvalP) {
paramList.verifyEnd(1);
// Get the requested mode
const int iMode(paramList.getInt(0));
HcrPmc730::HmcOperationMode hmcMode =
static_cast<HcrPmc730::HmcOperationMode>(iMode);
ILOG << "Received 'setRequestedHmcMode(" << iMode << ")' command";
TheTransmitControl->setRequestedHmcMode(hmcMode);
*retvalP = xmlrpc_c::value_nil();
}
示例7: fault
/** Execute method.
* @param params parameters
* @param result result value
*/
void
XmlRpcLogMethods::log_set_size::execute(xmlrpc_c::paramList const& params,
xmlrpc_c::value * const result)
{
int new_size = params.getInt(0);
if (new_size <= 0) {
throw xmlrpc_c::fault("Illegal size value, must be integer > 0",
xmlrpc_c::fault::CODE_UNSPECIFIED);
}
__cache_logger->set_size(new_size);
*result = xmlrpc_c::value_nil();
}
示例8: execute
void execute(xmlrpc_c::paramList const& paramList, xmlrpc_c::value* const retvalP)
{
chair = paramList.getInt(0);
symbol_name = paramList.getString(1);
SetEvent(symbol_need);
DWORD wait_result;
wait_result = WaitForSingleObject(symbol_ready, INFINITE);
if(WAIT_OBJECT_0 == wait_result)
{
*retvalP = xmlrpc_c::value_double(symbol_value);
} else {
msg(L"Something went wrong.", L"openholdem-xmlrpc-dll");
}
}
示例9: set_rate_limit
virtual void set_rate_limit(xmlrpc_c::paramList const& paramList, xmlrpc_c::value* retvalP) {
ACE_TRACE("modEmulateRate_Interface::set_rate");
int rate = 0, startTime = -1.0;
if ( paramList[2].type() != xmlrpc_c::value::TYPE_ARRAY ) {
rate = paramList.getInt(2);
}
else {
const std::vector<xmlrpc_c::value> arrayData = paramList.getArray(2);
startTime = xmlrpc_c::value_double(arrayData[0]);
rate = xmlrpc_c::value_double(arrayData[1]);
}
find_handler(paramList)->setRateLimit(rate, startTime);
*retvalP = xmlrpc_c::value_nil();
}