这篇教程C++ ACE_DEBUG函数代码示例写得很实用,希望能帮到您。
本文整理汇总了C++中ACE_DEBUG函数的典型用法代码示例。如果您正苦于以下问题:C++ ACE_DEBUG函数的具体用法?C++ ACE_DEBUG怎么用?C++ ACE_DEBUG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。 在下文中一共展示了ACE_DEBUG函数的26个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。 示例1: RPG_TRACEvoidRPG_Graphics_Cursor_Manager::setCursor(const RPG_Graphics_Cursor& type_in, SDL_Rect& dirtyRegion_out, const bool& lockedAccess_in){ RPG_TRACE(ACE_TEXT("RPG_Graphics_Cursor_Manager::setCursor")); // step0: init return value(s) ACE_OS::memset(&dirtyRegion_out, 0, sizeof(dirtyRegion_out)); // step1: load graphic (check cache first) RPG_Graphics_Cursor_CacheConstIterator_t iterator = myCache.find(type_in); if (iterator != myCache.end()) myCurrentGraphic = (*iterator).second; else { // not in cache --> (try to) load graphic RPG_Graphics_GraphicTypeUnion type; type.discriminator = RPG_Graphics_GraphicTypeUnion::CURSOR; type.cursor = type_in; RPG_Graphics_t graphic; graphic.category = RPG_GRAPHICS_CATEGORY_INVALID; graphic.type.discriminator = RPG_Graphics_GraphicTypeUnion::INVALID; // retrieve properties from the dictionary graphic = RPG_GRAPHICS_DICTIONARY_SINGLETON::instance()->get(type); ACE_ASSERT((graphic.type.cursor == type_in) && (graphic.type.discriminator == RPG_Graphics_GraphicTypeUnion::CURSOR)); // sanity check if (graphic.category != CATEGORY_CURSOR) { ACE_DEBUG((LM_ERROR, ACE_TEXT("invalid category (was: /"%s/"): /"%s/" not a cursor type, aborting/n"), ACE_TEXT(RPG_Graphics_CategoryHelper::RPG_Graphics_CategoryToString(graphic.category).c_str()), ACE_TEXT(RPG_Graphics_CursorHelper::RPG_Graphics_CursorToString(type_in).c_str()))); return; } // end IF // assemble path std::string filename; RPG_Graphics_Common_Tools::graphicToFile(graphic, filename); ACE_ASSERT(!filename.empty()); // load file myCurrentGraphic = NULL; myCurrentGraphic = RPG_Graphics_Surface::load(filename, // file true); // convert to display format if (!myCurrentGraphic) { ACE_DEBUG((LM_ERROR, ACE_TEXT("failed to RPG_Graphics_Surface::load(/"%s/"), aborting/n"), ACE_TEXT(filename.c_str()))); return; } // end IF // update cache myCache.insert(std::make_pair(type_in, myCurrentGraphic)); iterator = myCache.find(type_in); ACE_ASSERT(iterator != myCache.end()); } // end ELSE // step1: restore old background if (myScreenLock && lockedAccess_in) myScreenLock->lock(); restoreBG(dirtyRegion_out, NULL, false); if (myScreenLock && lockedAccess_in) myScreenLock->unlock(); // step2: create background surface if (myBG) { SDL_FreeSurface(myBG); myBG = NULL; } // end IF myBG = RPG_Graphics_Surface::create((*iterator).second->w, (*iterator).second->h); if (!myBG) { ACE_DEBUG((LM_ERROR, ACE_TEXT("failed to RPG_Graphics_Surface::create(%u,%u), aborting/n"), (*iterator).second->w, (*iterator).second->h)); return; } // end IF myBGPosition = std::make_pair(std::numeric_limits<unsigned int>::max(), std::numeric_limits<unsigned int>::max());// ACE_DEBUG((LM_DEBUG,// ACE_TEXT("set cursor to: /"%s/"/n"),// ACE_TEXT(RPG_Graphics_TypeHelper::RPG_Graphics_TypeToString(type_in).c_str()))); myCurrentType = type_in;}
开发者ID:bhutnath,项目名称:yarp,代码行数:97,
示例2: ACE_DEBUG//// init//int Tena_Data_Channel_Subscriber::init (int argc, ACE_TCHAR * argv []){ try { // Parse the configuration and initialize the TENA middleware. this->config_.parse (argc, argv); this->runtime_ = TENA::Middleware::init (this->config_.tenaConfiguration ()); // Extract the current settings from the configuration. std::string channel = this->config_["channelName"].getValue <std::string> ().c_str (); TENA::uint32 verbosity = this->config_["verbosity"].getValue <TENA::uint32>(); bool self_reflection = this->config_["enableSelfReflection"].getValue< bool >(); bool want_pruning = this->config_["pruneExpiredStateChange"].getValue< bool >(); TENA::Middleware::CommunicationProperties communication_properties = this->config_["bestEffort"].isSet() ? TENA::Middleware::BestEffort : TENA::Middleware::Reliable; // Extract the endpoint and join the specified TENA execution. TENA::Middleware::Endpoint endpoint = this->config_["emEndpoint"].getValue <TENA::Middleware::Endpoint> (); this->execution_ = this->runtime_->joinExecution (endpoint); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%T (%t) - %M - joining execution %s/n"), endpoint.toString ().c_str ())); // Extract the session from the configuration. We are going to // use this to determine what session we should join. std::string session = this->config_["sessionName"].getValue <std::string> ().c_str (); ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("%T (%t) - %M - joining session %s/n"), session.c_str ())); this->session_ = this->execution_->createSession (session); // Create a new data channel subscription pointer. We are then // going to subscribe, but we do not allow self-reflection (i.e., // we can't receive our own objects) since it does not make sense // in this case. this->data_subscription_.reset (new OASIS::Middleware::DataChannel::Subscription ()); this->registration_subscription_.reset (new OASIS::Middleware::RegistrationChannel::Subscription ()); // Create the observer and add it to the subscription(s). Einode_Observer * observer = new Einode_Observer (*this); this->observer_.reset (observer); this->registration_subscription_->addObserver ( OASIS::Middleware::RegistrationChannel::AbstractObserverPtr (observer)); OASIS::Middleware::RegistrationChannel::subscribe (*this->session_, this->registration_subscription_, false); this->data_subscription_->addObserver ( OASIS::Middleware::DataChannel::AbstractObserverPtr (observer)); OASIS::Middleware::DataChannel::subscribe (*this->session_, this->data_subscription_, false); // We can now start listening for callbacks. this->task_.reset (this->session_); this->task_.activate (); return 0; } catch (const TENA::Middleware::ConfigurationError & ex) { std::cerr << "Configuration Error: /n" << ex.what() << std::endl; ACE_ERROR ((LM_ERROR, ACE_TEXT ("%T (%t) - %M - Configuration Error: %s/n"), ex.what ())); } catch (const std::exception & ex) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("%T (%t) - %M - Error: Exception raised: %s/n"), ex.what ())); } catch (...) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("%T (%t) - %M - caught unknown exception/n"))); } return -1;}
开发者ID:EnasAlikhashashashneh,项目名称:OASIS,代码行数:90,
示例3: ACE_ERRORvoidReceiver_exec_i::ccm_remove (void){ //DDS_Get if (!this->getter_ok_) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver : get getter failed/n"))); } else { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Receiver : Get getter passed/n"))); } if (!this->getter_dds_data_reader_ok_) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver : get DDS reader of DDS_Get failed/n"))); } else { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Receiver : Get DDS reader of DDS_Get passed/n"))); } if (!this->getter_reader_ok_) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver : get reader of DDS_Get failed/n"))); } else { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Receiver : Get reader of DDS_Get passed/n"))); } if (!this->getter_filter_config_ok_) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver : get filter config of DDS_Get failed/n"))); } else { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Receiver : Get filter config of DDS_Get passed/n"))); } //DDS_Listen if (!this->listen_data_control_ok_) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver : get data listen control of DDS_Listen failed/n"))); } else { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Receiver : Get data listen control of DDS_Listen passed/n"))); } if (!this->listen_reader_ok_) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver : get reader of DDS_Listen failed/n"))); } else { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Receiver : Get reader of DDS_Listen passed/n"))); } if (!this->listen_dds_data_reader_ok_) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver : get dds reader of DDS_Listen failed/n"))); } else { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Receiver : Get dds reader of DDS_Listen passed/n"))); } if (!this->listen_filter_config_ok_) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver : get filter config of DDS_Listen failed/n"))); } else { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Receiver : Get filter config of DDS_Listen passed/n"))); } //Provides if (!this->raw_listener_created_) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver : listener not created/n"))); } else { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Receiver : Listener was created/n"))); } if (!this->listen_port_status_created_) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver : PortStatusListener of DDS_Listen not created/n"))); } else { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Receiver : PortStatusListener of DDS_Listen was created/n"))); } if (!this->get_port_status_created_) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver : PortStatusListener of DDS_Get not created/n"))); } else { ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("Receiver : PortStatusListener of DDS_Get was created/n"))); } if (!this->get_status_listener_created_) { ACE_ERROR ((LM_ERROR, ACE_TEXT ("ERROR: Receiver : ConnectorStatusListener not created/n"))); } else {//.........这里部分代码省略.........
开发者ID:asdlei00,项目名称:ACE,代码行数:101,
示例4: device_factory_initint KSGateway::setupAllDevices(){ DRTPPoolType::SmartObject obj; int ret; ret = device_factory_init(KSG_LOOP_DEV); if(ret) { return -1; } ACE_DEBUG((LM_INFO,"下载设备参数")); obj = KsgGetDrtpPool()->Alloc(); obj->SetRequestHeader(_configuration._drtpGetDevFuncNo,1); obj->AddField(F_LCERT_CODE,_configuration._gwId); // ID obj->AddField(F_SCUST_LIMIT2,_configuration._dynaKey.c_str()); // dynamic key if(obj->Connect()) { return -1; } if(obj->SendRequest(3000)) { ACE_DEBUG((LM_ERROR,"下载设备参数失败")); return -1; } else if(obj->GetReturnCode()) { ACE_DEBUG((LM_ERROR,"下载设备参数失败[%s]",obj->GetReturnMsg().c_str())); return -1; } if(obj->HasMoreRecord()) { while(obj->HasMoreRecord()) { ST_PACK * data = obj->GetNextRecord(); // 获取设备的参数 NormalDeviceType dt = data->semp; std::string devphyid = data->sname; std::string ipaddr = data->sname2; std::string devname = data->scust_limit; // 设备名称 std::string vendor = data->sdate0; // 连接方式, 默认为 TCP KSGDeviceURL::DevConnType conn_type = static_cast<KSGDeviceURL::DevConnType>(data->lvol5); char addr[512]; int devport = data->lvol2; try { ACE_DEBUG((LM_DEBUG,"设备[%d][%s]类型[%s]物理ID[%s]机号[%d]" ,data->lvol0,devname.c_str(),dt.c_str(),devphyid.c_str(),devport)); // 设备厂商标识 DeviceNodeType * device = _devManager->NewDevice(data->lvol0,data->lvol1,vendor,devphyid,dt); // 设备地址信息 if(conn_type == KSGDeviceURL::dctCOM) ACE_OS::sprintf(addr,"dev:COM:%s//%[email C++ ACE_ERROR函数代码示例 C++ ACE_BIT_ENABLED函数代码示例
|