• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ sendResult函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中sendResult函数的典型用法代码示例。如果您正苦于以下问题:C++ sendResult函数的具体用法?C++ sendResult怎么用?C++ sendResult使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了sendResult函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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);
    }
}
开发者ID:APCVSRepo,项目名称:hmi_sdk,代码行数:28,代码来源:BasicCommunication.cpp


示例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);
    }
}
开发者ID:APCVSRepo,项目名称:hmi_sdk,代码行数:31,代码来源:VehicleInfo.cpp


示例3: while

void matrix_mul::thread(void) {
 while (1) {
  readOperand();
  multiplyMat();
  sendResult();
 }
}
开发者ID:maperr,项目名称:inf3610_tp4,代码行数:7,代码来源:matrix_mul.cpp


示例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());
}
开发者ID:adamros,项目名称:MineCraftManager,代码行数:33,代码来源:loginutils.cpp


示例5: stopInput

 void stopInput(rowcount_t c)
 {
     if (!stopped) {
         stopped = true;
         sendResult(c);
         CSlaveActivity::stopInput(input);
     }
 }
开发者ID:jamienoss,项目名称:HPCC-Platform,代码行数:8,代码来源:thlimitslave.cpp


示例6: stopInput

 void stopInput(rowcount_t c)
 {
     if (!stopped)
     {
         stopped = true;
         sendResult(c);
         PARENT::stop();
     }
 }
开发者ID:sukhong,项目名称:HPCC-Platform,代码行数:9,代码来源:thlimitslave.cpp


示例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);
  
}
开发者ID:Belxjander,项目名称:Kirito,代码行数:10,代码来源:llexperienceassociationresponder.cpp


示例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);
		}
	}
}
开发者ID:iceslab,项目名称:MandelbrotMPI,代码行数:54,代码来源:Slave.cpp


示例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);
 }
}
开发者ID:Marvens,项目名称:inf3610lab4,代码行数:17,代码来源:controller.cpp


示例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));
}
开发者ID:embedthis,项目名称:catalog,代码行数:21,代码来源:pak.c


示例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();
	}
}
开发者ID:dimitarnestorov,项目名称:benchmarked,代码行数:40,代码来源:main.cpp


示例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);
    }
}
开发者ID:Koulio,项目名称:MJL_BANK,代码行数:52,代码来源:TransOnlinePro.cpp


示例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());
    }
}
开发者ID:BrandonHe,项目名称:hmi_sdk,代码行数:13,代码来源:Channel.cpp


示例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);
}
开发者ID:BrandonHe,项目名称:hmi_sdk,代码行数:13,代码来源:Channel.cpp


示例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" );
	}
}
开发者ID:Marvens,项目名称:inf3610lab4,代码行数:14,代码来源:matrix_mul.cpp


示例16: while

//////////////////////////////////////////////////////////////////////////////
///
///	Multiplication's algorithm
///
//////////////////////////////////////////////////////////////////////////////
void multiplier::thread(void)
{
 long operand1;
 long operand2;
 long result;

 while(1)
 {
  operand1 = readOperand();
  operand2 = readOperand();
  result = multiply(operand1, operand2);
  sendResult(result);
 }
}
开发者ID:Marvens,项目名称:inf3610lab4,代码行数:19,代码来源:multiplier.cpp


示例17: while

//////////////////////////////////////////////////////////////////////////////
///
///	Addition's algorithm
///
//////////////////////////////////////////////////////////////////////////////
void adder::thread(void)
{
    long operand1;
    long operand2;
    long result;

    while(1)
    {
        operand1 = readOperand();
        operand2 = readOperand();
        result = add(operand1, operand2);
        sendResult(result);
    }
}
开发者ID:maperr,项目名称:inf3610_tp4,代码行数:19,代码来源:adder.cpp


示例18: main

int main() {
    while (1) {
        switch (action) {
            case NONE:
                // sleep a bit
                break;
            case DO_START:
                clearAction();
                int result = task_do_work();
                sendResult(result);
                break;
        }
    }
}
开发者ID:bvdberg,项目名称:code,代码行数:14,代码来源:1-simple.cpp


示例19: while

void matrix_mul::thread(void) {

 long* operand1;
 long* operand2;
 long* result;

 while(1) {
  operand1 = readOperand();
  operand2 = readOperand();
  result = operand1;
  //result = multiply(operand1, operand2);
  sendResult(result);
 }
}
开发者ID:maperr,项目名称:inf3610_tp4,代码行数:14,代码来源:matrix_mul.cpp


示例20: canUser

PUBLIC bool canUser(cchar *abilities, bool warn)
{
    HttpStream    *stream;

    stream = getStream();
    if (httpCanUser(stream, abilities)) {
        return 1;
    }
    if (warn) {
        setStatus(HTTP_CODE_UNAUTHORIZED);
        sendResult(feedback("error", "Access Denied. Insufficient Privilege."));
    }
    return 0;
}
开发者ID:embedthis,项目名称:esp,代码行数:14,代码来源:espAbbrev.c



注:本文中的sendResult函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ sendSettings函数代码示例发布时间:2022-05-30
下一篇:
C++ sendResponse函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap