void GatewayMgr::start(QString password) { g_sm->checkCurrentOn(ServiceMgr::LOGIC); // check if (mdsm_ != nullptr || tdsm_ != nullptr) { BfDebug("mdsm_!= nullptr || tdsm_ != nullptr"); return; } // init mdsm password_ = password; if (!initMdSm()) { return; } if (!initTdSm()) { delete mdsm_; mdsm_ = nullptr; return; } startMdSm(); startTdSm(); return; }
void CtpMgr::tryStartSubscrible() { if (mdsm_logined_ && tdsm_logined_) { tdsm_->queryInstrument(); } if (tdsm_ == nullptr) { if(!initTdSm()){ qFatal("initTdSm == false"); } startTdSm(); } }
void GatewayMgr::tryStartSubscrible() { g_sm->checkCurrentOn(ServiceMgr::LOGIC); if (mdsm_logined_ && tdsm_logined_) { emit tradeWillBegin(); //函数开始执行时候才resetData tdsm_->queryInstrument(1000); } if (tdsm_ == nullptr) { if (!initTdSm()) { qFatal("initTdSm == false"); } startTdSm(); } }
bool CtpMgr::start(QString password) { // check if (mdsm_ != nullptr || tdsm_ != nullptr) { qFatal("mdsm_!= nullptr || tdsm_ != nullptr"); } // init mdsm password_ = password; if (!initMdSm()) { return false; } if (!initTdSm()) { delete mdsm_; mdsm_ = nullptr; return false; } startMdSm(); startTdSm(); return true; }