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

C++ IsErrorRspInfo函数代码示例

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

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



在下文中一共展示了IsErrorRspInfo函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: OnRspQryTrade

void CTraderApi::OnRspQryTrade(CThostFtdcTradeField *pTrade, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	if (!IsErrorRspInfo(pRspInfo, nRequestID, bIsLast))
	{
		OnTrade(pTrade);
	}
}
开发者ID:AlexTaylorTsang,项目名称:QuantBox_XAPI,代码行数:7,代码来源:TraderApi.cpp


示例2: OnRspUserLogin

void CTraderApi::OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	RspUserLoginField* pField = (RspUserLoginField*)m_msgQueue->new_block(sizeof(RspUserLoginField));

	if (!IsErrorRspInfo(pRspInfo)
		&&pRspUserLogin)
	{
		pField->TradingDay = GetDate(pRspUserLogin->tradeDate);
		pField->LoginTime = GetTime(pRspUserLogin->lastLoginTime);
		//sprintf(pField->SessionID, "%d:%d", pRspUserLogin->FrontID, pRspUserLogin->SessionID);

		m_msgQueue->Input_NoCopy(ResponeType::OnConnectionStatus, m_msgQueue, m_pClass, ConnectionStatus::Logined, 0, pField, sizeof(RspUserLoginField), nullptr, 0, nullptr, 0);
		m_msgQueue->Input_NoCopy(ResponeType::OnConnectionStatus, m_msgQueue, m_pClass, ConnectionStatus::Done, 0, nullptr, 0, nullptr, 0, nullptr, 0);

		// 记下登录信息,可能会用到
		memcpy(&m_RspUserLogin,pRspUserLogin,sizeof(CThostFtdcRspUserLoginField));
		m_nMaxOrderRef = atol(pRspUserLogin->localOrderNo);
		// 自己发单时ID从1开始,不能从0开始
		m_nMaxOrderRef = m_nMaxOrderRef>1 ? m_nMaxOrderRef:1;
	}
	else
	{
		pField->ErrorID = pRspInfo->ErrorID;
		strncpy(pField->ErrorMsg, pRspInfo->ErrorMsg, sizeof(ErrorMsgType));

		m_msgQueue->Input_NoCopy(ResponeType::OnConnectionStatus, m_msgQueue, m_pClass, ConnectionStatus::Disconnected, 0, pField, sizeof(RspUserLoginField), nullptr, 0, nullptr, 0);
	}
}
开发者ID:AlexTaylorTsang,项目名称:QuantBox_XAPI,代码行数:28,代码来源:TraderApi.cpp


示例3: OnRspQryInstrument

void CTraderApi::OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	if (!IsErrorRspInfo(pRspInfo, nRequestID, bIsLast))
	{
		if (pInstrument)
		{
			InstrumentField* pField = (InstrumentField*)m_msgQueue->new_block(sizeof(InstrumentField));

			strcpy(pField->InstrumentID, pInstrument->instID);
			strcpy(pField->ExchangeID, pInstrument->exchangeID);

			strcpy(pField->Symbol, pInstrument->instID);

			strcpy(pField->InstrumentName, pInstrument->name);
			pField->Type = CThostFtdcInstrumentField_2_InstrumentType(pInstrument);
			//pField->VolumeMultiple = pInstrument->VolumeMultiple;
			pField->PriceTick = pInstrument->tick;
			//strncpy(pField->ExpireDate, pInstrument->ExpireDate, sizeof(TThostFtdcDateType));
			//pField->OptionsType = TThostFtdcOptionsTypeType_2_PutCall(pInstrument->OptionsType);

			m_msgQueue->Input_NoCopy(ResponeType::OnRspQryInstrument, m_msgQueue, m_pClass, bIsLast, 0, pField, sizeof(InstrumentField), nullptr, 0, nullptr, 0);
		}
		else
		{
			m_msgQueue->Input_NoCopy(ResponeType::OnRspQryInstrument, m_msgQueue, m_pClass, bIsLast, 0, nullptr, 0, nullptr, 0, nullptr, 0);
		}
	}
}
开发者ID:AlexTaylorTsang,项目名称:QuantBox_XAPI,代码行数:28,代码来源:TraderApi.cpp


示例4: OnRspQryOrder

void CTraderApi::OnRspQryOrder(CThostFtdcOrderField *pOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	if (!IsErrorRspInfo(pRspInfo, nRequestID, bIsLast))
	{
		OnOrder(pOrder);
	}
}
开发者ID:AlexTaylorTsang,项目名称:QuantBox_XAPI,代码行数:7,代码来源:TraderApi.cpp


示例5: sprintf

void CTraderApi::OnErrRtnOrderAction(CSecurityFtdcOrderActionField *pOrderAction, CSecurityFtdcRspInfoField *pRspInfo)
{
	OrderIDType orderId = { 0 };
	if (pOrderAction)
	{
		sprintf(orderId, "%d:%d:%s", pOrderAction->FrontID, pOrderAction->SessionID, pOrderAction->OrderRef);
	}
	else
	{
		IsErrorRspInfo("OnErrRtnOrderAction", pRspInfo, 0, true);
	}

	unordered_map<string, OrderField*>::iterator it = m_id_platform_order.find(orderId);
	if (it == m_id_platform_order.end())
	{
		// 没找到?不应当,这表示出错了
		//assert(false);
	}
	else
	{
		// 找到了,要更新状态
		// 得使用上次的状态
		OrderField* pField = it->second;
		pField->ExecType = ExecType::ExecType_CancelReject;
		pField->RawErrorID = pRspInfo->ErrorID;
		strncpy(pField->Text, pRspInfo->ErrorMsg, sizeof(Char256Type));
		m_msgQueue->Input_Copy(ResponeType::ResponeType_OnRtnOrder, m_msgQueue, m_pClass, 0, 0, pField, sizeof(OrderField), nullptr, 0, nullptr, 0);
	}
}
开发者ID:Eaast,项目名称:XAPI2,代码行数:29,代码来源:TraderApi.cpp


示例6: OnRspUserLogin

void CTraderApi::OnRspUserLogin(CThostFtdcRspUserLoginField *pRspUserLogin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	RspUserLoginField field = { 0 };

	if (!IsErrorRspInfo(pRspInfo)
		&&pRspUserLogin)
	{
		strncpy(field.TradingDay, pRspUserLogin->tradeDate, sizeof(DateType));
		strncpy(field.LoginTime, pRspUserLogin->lastLoginTime, sizeof(TimeType));
		//sprintf(field.SessionID, "%d:%d", pRspUserLogin->FrontID, pRspUserLogin->SessionID);

		XRespone(ResponeType::OnConnectionStatus, m_msgQueue, this, ConnectionStatus::Logined, 0, &field, sizeof(RspUserLoginField), nullptr, 0, nullptr, 0);
		XRespone(ResponeType::OnConnectionStatus, m_msgQueue, this, ConnectionStatus::Done, 0, nullptr, 0, nullptr, 0, nullptr, 0);

		// 记下登录信息,可能会用到
		memcpy(&m_RspUserLogin,pRspUserLogin,sizeof(CThostFtdcRspUserLoginField));
		m_nMaxOrderRef = atol(pRspUserLogin->localOrderNo);
		// 自己发单时ID从1开始,不能从0开始
		m_nMaxOrderRef = m_nMaxOrderRef>1 ? m_nMaxOrderRef:1;
	}
	else
	{
		field.ErrorID = pRspInfo->ErrorID;
		strncpy(field.ErrorMsg, pRspInfo->ErrorMsg, sizeof(pRspInfo->ErrorMsg));

		XRespone(ResponeType::OnConnectionStatus, m_msgQueue, this, ConnectionStatus::Disconnected, 0, &field, sizeof(RspUserLoginField), nullptr, 0, nullptr, 0);
	}

	if (bIsLast)
		ReleaseRequestMapBuf(nRequestID);
}
开发者ID:IndigoDai,项目名称:QuantBox_XAPI,代码行数:31,代码来源:TraderApi.cpp


示例7: IsErrorRspInfo

void CTraderApi::OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	IsErrorRspInfo(pRspInfo, nRequestID, bIsLast);

	if (bIsLast)
		ReleaseRequestMapBuf(nRequestID);
}
开发者ID:IndigoDai,项目名称:QuantBox_XAPI,代码行数:7,代码来源:TraderApi.cpp


示例8: OnRspQryInstrument

void CTraderApi::OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	if (!IsErrorRspInfo(pRspInfo, nRequestID, bIsLast))
	{
		if (pInstrument)
		{
			InstrumentField field = { 0 };

			strcpy(field.InstrumentID, pInstrument->instID);
			strcpy(field.ExchangeID, pInstrument->exchangeID);

			strcpy(field.Symbol, pInstrument->instID);

			strcpy(field.InstrumentName, pInstrument->name);
			field.Type = CThostFtdcInstrumentField_2_InstrumentType(pInstrument);
			//field.VolumeMultiple = pInstrument->VolumeMultiple;
			field.PriceTick = pInstrument->tick;
			//strncpy(field.ExpireDate, pInstrument->ExpireDate, sizeof(TThostFtdcDateType));
			//field.OptionsType = TThostFtdcOptionsTypeType_2_PutCall(pInstrument->OptionsType);

			XRespone(ResponeType::OnRspQryInstrument, m_msgQueue, this, bIsLast, 0, &field, sizeof(InstrumentField), nullptr, 0, nullptr, 0);
		}
		else
		{
			XRespone(ResponeType::OnRspQryInstrument, m_msgQueue, this, bIsLast, 0, nullptr, 0, nullptr, 0, nullptr, 0);
		}
	}

	if (bIsLast)
		ReleaseRequestMapBuf(nRequestID);
}
开发者ID:IndigoDai,项目名称:QuantBox_XAPI,代码行数:31,代码来源:TraderApi.cpp


示例9: OnRspQryParkedOrderAction

///请求删除预埋撤单响应
void CtpTraderSpi::OnRspQryParkedOrderAction(CThostFtdcParkedOrderActionField *pParkedOrderAction, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast) 
{
	if( !IsErrorRspInfo(pRspInfo) && pParkedOrderAction)
	{
		
	}
	if(bIsLast) SetEvent(g_hEvent);
}
开发者ID:ForTrade,项目名称:xTrader,代码行数:9,代码来源:traderspi.cpp


示例10: OnRspRemoveParkedOrder

///删除预埋单响应
void CtpTraderSpi::OnRspRemoveParkedOrder(CThostFtdcRemoveParkedOrderField *pRemoveParkedOrder, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	if( !IsErrorRspInfo(pRspInfo) && pRemoveParkedOrder)
	{
		
	}
	if(bIsLast) SetEvent(g_hEvent);
}
开发者ID:ForTrade,项目名称:xTrader,代码行数:9,代码来源:traderspi.cpp


示例11: OnRspQryBrokerTradingAlgos

void CtpTraderSpi::OnRspQryBrokerTradingAlgos(CThostFtdcBrokerTradingAlgosField *pBrokerTradingAlgos, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	if( !IsErrorRspInfo(pRspInfo) && pBrokerTradingAlgos)
	{
		
	}
	if(bIsLast) SetEvent(g_hEvent);
}
开发者ID:ForTrade,项目名称:xTrader,代码行数:8,代码来源:traderspi.cpp


示例12: OnRspFromBankToFutureByFuture

 ///期货发起银行资金转期货应答
void CtpTraderSpi::OnRspFromBankToFutureByFuture(CThostFtdcReqTransferField *pReqTransfer, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	if( IsErrorRspInfo(pRspInfo) || (pReqTransfer==NULL))
	{	
		ShowCbErrs(pRspInfo->ErrorMsg);
	}
	if(bIsLast) SetEvent(g_hEvent);	 
}
开发者ID:ForTrade,项目名称:xTrader,代码行数:9,代码来源:traderspi.cpp


示例13: OnRspQryTradingNotice

void CtpTraderSpi::OnRspQryTradingNotice(CThostFtdcTradingNoticeField *pTradingNotice, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	if (!IsErrorRspInfo(pRspInfo) &&  pTradingNotice)
	{
	}
	
	if(bIsLast) SetEvent(g_hEvent);
}
开发者ID:ForTrade,项目名称:xTrader,代码行数:8,代码来源:traderspi.cpp


示例14: OnRspUserLogout

///登出请求响应
void CtpMdSpi::OnRspUserLogout(CThostFtdcUserLogoutField *pUserLogout, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	if( !IsErrorRspInfo(pRspInfo) && pUserLogout)
	{
		
	}
	if(bIsLast) SetEvent(g_hEvent);
}
开发者ID:ForTrade,项目名称:xTrader-1,代码行数:9,代码来源:mdspi.cpp


示例15: OnRspQryExchangeMarginRateAdjust

///请求查询交易所调整保证金率响应
void CtpTraderSpi::OnRspQryExchangeMarginRateAdjust(CThostFtdcExchangeMarginRateAdjustField *pExchangeMarginRateAdjust, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	if( !IsErrorRspInfo(pRspInfo) && pExchangeMarginRateAdjust )
	{
		
	}
	if(bIsLast) SetEvent(g_hEvent);
}
开发者ID:ForTrade,项目名称:xTrader,代码行数:9,代码来源:traderspi.cpp


示例16: OnRspQryInvestorProductGroupMargin

///请求查询投资者品种/跨品种保证金响应
void CtpTraderSpi::OnRspQryInvestorProductGroupMargin(CThostFtdcInvestorProductGroupMarginField *pInvestorProductGroupMargin, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	if( !IsErrorRspInfo(pRspInfo) && pInvestorProductGroupMargin )
	{
			
	}
	if(bIsLast) SetEvent(g_hEvent);	
}
开发者ID:ForTrade,项目名称:xTrader,代码行数:9,代码来源:traderspi.cpp


示例17: qDebug

void MainTraderSpi::OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, 
                                               CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	qDebug() << "<<<---" << "OnRspSettlementInfoConfirm:" << QThread::currentThreadId() <<endl;
	if (bIsLast && !IsErrorRspInfo(pRspInfo))
	{
		emit SettlementInfoConfirmed();
	}
}
开发者ID:liusb,项目名称:ctp-follow,代码行数:9,代码来源:TraderSpi.cpp


示例18: OnRspQryInstrument

void CTraderSpi::OnRspQryInstrument(CThostFtdcInstrumentField *pInstrument, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	std::cout << "--->>> " << "OnRspQryInstrument" << std::endl;
	if (bIsLast && !IsErrorRspInfo(pRspInfo))
	{
		///请求查询合约
		ReqQryTradingAccount();
	}
}
开发者ID:ZhuZhengyi,项目名称:ctp-2,代码行数:9,代码来源:TraderSpi.cpp


示例19: OnRspSettlementInfoConfirm

void CTraderSpi::OnRspSettlementInfoConfirm(CThostFtdcSettlementInfoConfirmField *pSettlementInfoConfirm, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	std::cout << "--->>> " << "OnRspSettlementInfoConfirm" << std::endl;
	if (bIsLast && !IsErrorRspInfo(pRspInfo))
	{
		///请求查询合约
		ReqQryInstrument();
	}
}
开发者ID:ZhuZhengyi,项目名称:ctp-2,代码行数:9,代码来源:TraderSpi.cpp


示例20: OnRspQryInvestorPosition

void CTraderSpi::OnRspQryInvestorPosition(CThostFtdcInvestorPositionField *pInvestorPosition, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
{
	std::cout << "--->>> " << "OnRspQryInvestorPosition" << std::endl;
	if (bIsLast && !IsErrorRspInfo(pRspInfo))
	{
		///报单录入请求
		ReqOrderInsert();
	}
}
开发者ID:ZhuZhengyi,项目名称:ctp-2,代码行数:9,代码来源:TraderSpi.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ IsErrorTexture函数代码示例发布时间:2022-05-30
下一篇:
C++ IsError函数代码示例发布时间: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