本文整理汇总了C++中sendResult函数的典型用法代码示例。如果您正苦于以下问题:C++ sendResult函数的具体用法?C++ sendResult怎么用?C++ sendResult使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sendResult函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: sendResult
void BasicCommunication::onRequest(Json::Value &request)
{
std::string method = request["method"].asString();
int id = request["id"].asInt();
if (method == "BasicCommunication.MixingAudioSupported") {
sendResult(id,"MixingAudioSupported");
}else if (method == "BasicCommunication.AllowAllApps") {
sendResult(id,"AllowAllApps");
}else if (method == "BasicCommunication.AllowApp") {
sendResult(id,"AllowApp");
}else if (method == "BasicCommunication.AllowDeviceToConnect") {
sendResult(id,"AllowDeviceToConnect");
}else if (method == "BasicCommunication.UpdateAppList") {
sendResult(id,"UpdateAppList");
}else if (method == "BasicCommunication.UpdateDeviceList") {
// add by fanqiang
Result result = m_pCallback->onRequest(request);
sendResult(id,"UpdateDeviceList",result);
}else if (method == "BasicCommunication.ActivateApp") {
sendResult(id,"ActivateApp");
}else if (method == "BasicCommunication.IsReady") {
sendResult(id,"IsReady");
}else if (method == "BasicCommunication.GetSystemInfo") {
sendResult(id,"GetSystemInfo");
} else {
Channel::onRequest(request);
}
}
示例2: sendResult
void VehicleInfo::onRequest(Json::Value &request)
{
std::string method = request["method"].asString();
int id = request["id"].asInt();
if (method == "VehicleInfo.SubscribeVehicleData") {
sendResult(id,"SubscribeVehicleData");
}else if (method == "VehicleInfo.UnsubscribeVehicleData") {
sendResult(id,"UnsubscribeVehicleData");
}else if (method == "VehicleInfo.GetVehicleType") {
sendResult(id,"GetVehicleType");
}else if (method == "VehicleInfo.IsReady") {
sendResult(id,"IsReady");
}else if (method == "VehicleInfo.GetVehicleData") {
Json::Value result;
if (getVehicleData(request,result)) {
sendResult(id, result);
} else {
sendError(id,result);
}
}else if (method == "VehicleInfo.ReadDID") {
Json::Value result = vehicleInfoReadDIDResponse(request);
sendResult(id,result);
}else if (method == "VehicleInfo.GetDTCs") {
Json::Value result = vehicleInfoGetDTCsResponse(request);
sendResult(id,result);
}else if (method =="VehicleInfo.DiagnosticMessage") {
sendResult(id,"DiagnosticMessage");
} else {
Channel::onRequest(request);
}
}
示例3: while
void matrix_mul::thread(void) {
while (1) {
readOperand();
multiplyMat();
sendResult();
}
}
示例4: if
void Loginutils::replyFinished(QNetworkReply *reply)
{
if (reply->error() == QNetworkReply::NoError)
{
QString response = reply->readAll();
if (!response.contains(":"))
{
if (response.contains("Bad login"))
errCode = 1;
else if (response.contains("Old version"))
errCode = 2;
else if (response.contains("User not premium"))
errCode = 3;
else
errCode = 4;
}
else
{
errCode = 0;
QStringList list = response.split(":");
latestVer = list[0];
downloadTicket = list[1];
username = list[2];
sessionId = list[3];
}
emit sendResult(errCode);
}
else
emit sendMessage("error", "Błąd logowania: " + reply->errorString());
}
示例5: stopInput
void stopInput(rowcount_t c)
{
if (!stopped) {
stopped = true;
sendResult(c);
CSlaveActivity::stopInput(input);
}
}
示例6: stopInput
void stopInput(rowcount_t c)
{
if (!stopped)
{
stopped = true;
sendResult(c);
PARENT::stop();
}
}
示例7: LL_INFOS
void ExperienceAssociationResponder::httpFailure()
{
LLSD msg;
msg["error"]=(LLSD::Integer)getStatus();
msg["message"]=getReason();
LL_INFOS("ExperienceAssociation") << "Failed to look up associated experience: " << getStatus() << ": " << getReason() << LL_ENDL;
sendResult(msg);
}
示例8: while
void Slave::work(int &argc, char** &argv)
{
int64_t size = 0;
int tag = 0;
while(doWork)
{
waitForOrder(order);
doWork = order.doWork;
size = 0;
if(true == order.doWork)
{
// printf("Received order %d: %d, %d, %d, %d, %d, %d, %lf, %lf, %lf\n",
// order.orderID,
// order.pictureWidth,
// order.pictureHeight,
// order.beginX,
// order.beginY,
// order.count,
// order.doWork,
// order.dotSize,
// order.fractalX,
// order.fractalY);
size = executeOrder(order, resultArray);
// if(rank > 2)
// cout << "\n\nPoliczone!\n\n";
if(size > 0)
{
// for(auto i : resultArray)
// cout<< i <<" ";
int64_t id = order.orderID;
// cout << "Wysyłanie...\n\n";
sendResult(id, resultArray, size);
}
else
{
// printf("Slave %d: Received size <= 0, stopping work.\n", rank);
// printf("Received order %d: %d, %d, %d, %d, %d, %d\n",
// rank,
// order.pictureWidth,
// order.pictureHeight,
// order.beginX,
// order.beginY,
// order.count,
// order.doWork);
doWork = false;
}
}
else
{
// printf("Slave %d: Received DIETAG, stopping work.\n", rank);
}
}
}
示例9: while
//////////////////////////////////////////////////////////////////////////////
///
/// Controller's algorithm
///
//////////////////////////////////////////////////////////////////////////////
void controller::thread(void) {
long operand1;
long operand2;
long result;
Operation operation;
while (1) {
readData(&operand1, &operand2, &operation);
result = delegateOperation(operation, operand1, operand2);
sendResult(result);
}
}
示例10: retractPackage
static void retractPackage() {
EdiRec *rec;
cchar *password, *name;
name = param("name");
password = param("password");
if (!name || !*name || !password || !*password) {
sendResult(feedback("error", "Missing name or password parameters"));
return;
}
if ((rec = readRecWhere("pak", "name", "==", name)) == 0) {
sendResult(feedback("error", "Cannot find package"));
return;
} else if (!mprCheckPassword(password, getField(rec, "password"))) {
sendResult(feedback("error", "Invalid password"));
return;
}
sendResult(removeRec("pak", rec->id));
}
示例11: menu
void menu(){
char ch;
while(true){
if(exitNow){
break;
}
// TODO: OS specific console clear
printMenuOptions();
ch=_getch();
switch(ch){
case '1':
CpuTest::testSingleCore();
sendResult(CpuTest::getResultForTest(1));
break;
case '2':
CpuTest::testMultiCore();
sendResult(CpuTest::getResultForTest(2));
break;
case '3':
HddTest::testBad();
sendResult(HddTest::getResultForTest(1));
HddTest::testSlow();
sendResult(HddTest::getResultForTest(2));
#if defined(_WIN32) || defined(_WIN64)
HddTest::testWindows();
sendResult(HddTest::getResultForTest(HDD_TESTS));
#endif
break;
case '4':
exitNow=1;
break;
default:
cout << "No such option." << endl;
break;
}
if(ch == '1' || ch == '2' || ch == '3')
askForMoreTest();
}
}
示例12: qDebug
void TransOnlinePro::run()
{
qDebug() << Q_FUNC_INFO;
unsigned char ucResult;
CleanError();
emit EableNotify(false);
PreComm();
getTransNum();
switch(iOnlineType)
{
case TransMode_DownWK: //签到(工作密钥)
ucResult = DownWK();
break;
case TransMode_DownEWK: //签到(传输密钥)
ucResult = DownEWK();
break;
case TransMode_Settle: //结算 Settlement
ucResult = SettlementPro();
break;
case TransMode_CashDeposit: //存款 Deposit
case TransMode_DepositVoid: //存款撤销 Deposit Void
case TransMode_DepositAdjust:
ucResult = DepositPro();
break;
case TransMode_CashAdvance: //取款 Advance
case TransMode_AdvanceVoid: //取款撤销 Advance Void
case TransMode_AdvanceAdjust:
ucResult = AdvancePro();
break;
case TransMode_BalanceInquiry: //查余 Balance Inquiry
ucResult = BalanceInquiryPro();
break;
case TransMode_PINChange:
ucResult = PINChangePro(); //改密 PIN Change
break;
case TransMode_CardTransfer: //转账 P2P Transfer
ucResult = TransferPro();
break;
default:
ucResult = ERR_UNKNOWTRANSTYPE;
break;
}
Os__gif_stop();
if(continueFlag == true)
{
FinComm();
emit sendResult(ucResult);
}
}
示例13: MethodName
void Channel::onRequest(Json::Value &request)
{
int id = request["id"].asInt();
Json::Value method =request["method"];
std::string ref= MethodName(getChannelName(),method);
if(m_StaticResult.isMember(ref)){
sendResult(id,ref);
}
else
{
LOGE("%s.%s NOT use",getChannelName().c_str(),ref.c_str());
}
}
示例14: sendResult
void Channel::sendResult(int id, std::string ref,Result code)
{
if(code == RESULT_USER_WAIT)
return;
Json::Value result;
if(m_StaticResult[ref].isMember("result"))
result = m_StaticResult[ref]["result"];
else
result = m_StaticResult[ref];
result["code"]=code;
sendResult(id,result);
}
示例15: while
void matrix_mul::thread(void) {
unsigned int result[MATRIX_ROWS * MATRIX_COLUMNS];
unsigned int operand1[MATRIX_ROWS * MATRIX_COLUMNS];
unsigned int operand2[MATRIX_ROWS * MATRIX_COLUMNS];
while(1) {
// Add your code here...
readOperand(operand1);
readOperand(operand2);
multMatrix(operand1, operand2, result);
sendResult(result);
// SpacePrint( "matrix_mul executing...\n" );
}
}