您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ vprDEBUG函数代码示例

51自学网 2021-06-03 09:48:10
  C++
这篇教程C++ vprDEBUG函数代码示例写得很实用,希望能帮到您。

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

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

示例1: switch

vpr::Uint8 SerialPortImplWin32::getStopBits() const{   vpr::Uint8 num_bits;   DCB dcb;   if ( GetCommState(mHandle, &dcb) )   {      switch ( dcb.StopBits )      {         case ONESTOPBIT:            num_bits = 1;            break;         case TWOSTOPBITS:            num_bits = 2;            break;      }   }   else   {      std::stringstream msg_stream;      msg_stream << "Number of stop bits is unavailable: "                 << getErrorMessageWithCode(GetLastError());      vprDEBUG(vprDBG_ALL, vprDBG_WARNING_LVL)         << clrOutBOLD(clrYELLOW, "WARNING") << ": " << msg_stream.str()         << std::endl << vprDEBUG_FLUSH;      throw IOException(msg_stream.str(), VPR_LOCATION);   }   return num_bits;}
开发者ID:rpavlik,项目名称:vrjuggler-2.2-debs,代码行数:30,


示例2: GetCommState

// Set the number of stop bits to use.  The value must be either 1 or 2.void SerialPortImplWin32::setStopBits(const vpr::Uint8 numBits){   DCB dcb;   GetCommState(mHandle, &dcb);   switch ( numBits )   {      case 1:         dcb.StopBits = ONESTOPBIT;         break;      case 2:         dcb.StopBits = TWOSTOPBITS;         break;   }   if ( ! SetCommState(mHandle, &dcb) )   {      std::stringstream msg_stream;      msg_stream << "Failed to set stop bits: "                 << getErrorMessageWithCode(GetLastError());      vprDEBUG(vprDBG_ALL, vprDBG_WARNING_LVL)         << clrOutBOLD(clrYELLOW, "WARNING") << ": " << msg_stream.str()         << std::endl << vprDEBUG_FLUSH;      throw IOException(msg_stream.str(), VPR_LOCATION);   }}
开发者ID:rpavlik,项目名称:vrjuggler-2.2-debs,代码行数:27,


示例3: defined

// Reconfigure the file handle so that writes are synchronous.void FileHandleImplUNIX::setSynchronousWrite(bool sync){#if ! defined(_POSIX_SOURCE) && defined(O_SYNC) && defined(O_ASYNC)   int cur_flags, new_flags, retval;   // Get the current flags.   cur_flags = getFlags();   // Synchronous writes.   if ( sync )   {      new_flags = cur_flags | O_SYNC;   }   // Asynchronous writes.   else   {      new_flags = cur_flags | O_ASYNC;   }   // Set the file descriptor to be blocking with the new flags.   retval = setFlags(new_flags);   if ( retval == -1 )   {      vprDEBUG(vprDBG_ERROR, vprDBG_CRITICAL_LVL)         << "[vpr::FileHandleImplUNIX::setSynchronousWrite()] Failed to enable "         << (sync ? "synchronous" : "asynchronous") << " writes on "         << mName << ": " << strerror(errno) << std::endl << vprDEBUG_FLUSH;      std::ostringstream msg_stream;      msg_stream << "Failed to enable "                 << (sync ? "synchronous" : "asynchronous") << " writes on "                 << mName << ": " << strerror(errno);      throw IOException(msg_stream.str(), VPR_LOCATION);   }#else   vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL)      << "[vpr::FileHandleImplUNIX::setSynchronousWrite()] Cannot enable "      << (sync ? "synchronous" : "asynchronous")      << " writes on this platform!/n" << vprDEBUG_FLUSH;   std::ostringstream msg_stream;   msg_stream << "Cannot enable " << (sync ? "synchronous" : "asynchronous")              << " writes on this platform!";   throw IOException(msg_stream.str(), VPR_LOCATION);#endif}
开发者ID:rpavlik,项目名称:vrjuggler-2.2-debs,代码行数:48,


示例4: vprASSERT

void Header::readData(vpr::SocketStream* stream, bool dumpHeader){   vprASSERT( NULL != stream && "Can not create a Header using a NULL SocketStream" );   // - Is stream is a valid SocketStream?   //   - Read in the packet from the socket   //   - Set the BufferObjectReader and BufferObjectWriter to use mData  <====We only need BufferObjectReader   if (NULL == stream)   {      vprDEBUG( gadgetDBG_RIM, vprDBG_CONFIG_LVL )         << clrOutBOLD( clrRED, "ERROR:" )         << " SocketSteam is NULL"         << std::endl << vprDEBUG_FLUSH;      throw cluster::ClusterException("Header::Header() - SocketStream is NULL");   }   vpr::Uint32 bytes_read;      std::vector<vpr::Uint8> header_data;    try   {      bytes_read = stream->readn(header_data, Header::RIM_PACKET_HEAD_SIZE);   }   catch (vpr::IOException& ex)   {      vprDEBUG( gadgetDBG_RIM, vprDBG_CRITICAL_LVL )         << "Header::readData() - Could not read the header!/n"         << ex.what()         << std::endl << vprDEBUG_FLUSH;      throw ex;   }   vprASSERT( RIM_PACKET_HEAD_SIZE == bytes_read && "Header::Header() - Bytes read != RIM_PACKET_HEAD_SIZE" );   parseHeader(header_data);   if(dumpHeader)   {      std::cout << "Dumping Header(" << header_data.size() << " bytes): ";      for ( std::vector<vpr::Uint8>::const_iterator i = header_data.begin();            i != header_data.end(); i++ )      {         std::cout << (int)*i << " ";      }      std::cout << std::endl;   }}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:47,


示例5: vprDEBUG_BEGIN

void ConfigPacket::printData(int debugLevel) const{   vprDEBUG_BEGIN(gadgetDBG_RIM,debugLevel)       <<  clrOutBOLD(clrYELLOW,"==== Config Packet Data ====/n") << vprDEBUG_FLUSH;      Packet::printData(debugLevel);   vprDEBUG(gadgetDBG_RIM,debugLevel)       << clrOutBOLD(clrYELLOW, "Config:       ") << mConfig      << std::endl << vprDEBUG_FLUSH;   vprDEBUG(gadgetDBG_RIM,debugLevel)       << clrOutBOLD(clrYELLOW, "Type          ") << mType      << std::endl << vprDEBUG_FLUSH;   vprDEBUG_END(gadgetDBG_RIM,debugLevel)       <<  clrOutBOLD(clrYELLOW,"====================================/n") << vprDEBUG_FLUSH;}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:17,


示例6: vprDEBUG_BEGIN

void EventPacket::printData(int debugLevel) const{   vprDEBUG_BEGIN(gadgetDBG_RIM,debugLevel)       <<  clrOutBOLD(clrYELLOW,"==== Event Packet ====/n") << vprDEBUG_FLUSH;      Packet::printData(debugLevel);   vprDEBUG(gadgetDBG_RIM,debugLevel)       << clrOutBOLD(clrYELLOW, "Plugin ID: ") << mPluginId.toString()      << std::endl << vprDEBUG_FLUSH;   vprDEBUG(gadgetDBG_RIM,debugLevel)       << clrOutBOLD(clrYELLOW, "Name: ") << mName      << std::endl << vprDEBUG_FLUSH;   vprDEBUG_END(gadgetDBG_RIM,debugLevel)       <<  clrOutBOLD(clrYELLOW,"============================/n") << vprDEBUG_FLUSH;}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:17,


示例7: handleAnalogChange

void VRPN_CALLBACK handleAnalogChange(void* userdata, vrpn_ANALOGCB b){   vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_STATE_LVL)      << "VRPN driver handleAnalogChange() called/n" << vprDEBUG_FLUSH;   gadget::Vrpn* this_ptr = static_cast<gadget::Vrpn*>(userdata);   this_ptr->analogChange(b);}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:8,


示例8: throw

char* StringSubjectImpl::getValue()   throw(CORBA::SystemException){   vpr::Guard<vpr::Mutex> val_guard(mValueLock);   vprDEBUG(vprDBG_ALL, vprDBG_STATE_LVL)      << "Returning '" << mValue << "' to caller/n" << vprDEBUG_FLUSH;   return CORBA::string_dup(mValue.c_str());}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:8,


示例9: handleTrackerChange

void VRPN_CALLBACK handleTrackerChange(void* userdata, vrpn_TRACKERCB t){   vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_STATE_LVL)      << "VRPN driver handleTrackerChange() called/n" << vprDEBUG_FLUSH;   gadget::Vrpn* this_ptr = static_cast<gadget::Vrpn*>(userdata);   this_ptr->trackerChange(t);}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:8,


示例10: vprDEBUG

bool DataGlove::startSampling(){   vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_STATE_LVL)         << "[dataglove] Begin sampling/n"         << vprDEBUG_FLUSH;   bool started(false);   if (mThread == NULL)   {      int maxAttempts=0;      bool result = false;      while (result == false && maxAttempts < 5)      {         vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CONFIG_LVL)               << "[dataglove] Connecting to "               << mPortName << " at "               << mBaudRate << ".../n"               << vprDEBUG_FLUSH;         result = mGlove->connectToHardware( mPortName , mBaudRate);         if (result == false)         {            vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CRITICAL_LVL)               << "[dataglove] ERROR: Can't open or it is already opened."               << vprDEBUG_FLUSH;            vpr::System::usleep(14500);            maxAttempts++;         }      }      vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CONFIG_LVL)         << "[dataglove] Successfully connected, Now sampling dataglove data."         << vprDEBUG_FLUSH;      // Create a new thread to handle the control and set exit flag to false      mExitFlag = false;      vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CONFIG_LVL)         << "[dataglove] Spawning control thread/n" << vprDEBUG_FLUSH;      try      {         mThread = new vpr::Thread(boost::bind(&DataGlove::controlLoop, this));         vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CONFIG_LVL)            << "[dataglove] DataGlove is active " << std::endl            << vprDEBUG_FLUSH;         mActive = true;         started = true;      }      catch (vpr::Exception& ex)      {         vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CRITICAL_LVL)            << clrOutBOLD(clrRED, "ERROR")            << ": Failed to spawn thread for 5DT DataGlove driver!/n"            << vprDEBUG_FLUSH;         vprDEBUG_NEXT(gadgetDBG_INPUT_MGR, vprDBG_CRITICAL_LVL)            << ex.what() << std::endl << vprDEBUG_FLUSH;      }   }   return started;}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:60,


示例11: vprDEBUG

bool SdlJoystick::startSampling(){   //return init();   if (!init())   {      vprDEBUG(vprDBG_ERROR,vprDBG_CRITICAL_LVL)         << clrOutNORM(clrRED,"ERROR:")         << " gadget::SdlJoystick::startSampling() SDL init failed./n"         << vprDEBUG_FLUSH;      return false;   }   if(mThread != NULL)   {      vprDEBUG(vprDBG_ERROR,vprDBG_CRITICAL_LVL)         << clrOutNORM(clrRED,"ERROR:")         << " gadget::SdlJoystick::startSampling() called, when already "         << "sampling./n" << vprDEBUG_FLUSH;      return false;   }   // Set flag that will later allow us to stop the control loop.   mDone = false;   bool started(true);   // Create a new thread to handle the control   try   {      mThread = new vpr::Thread(boost::bind(&SdlJoystick::controlLoop,                                this));   }   catch (vpr::Exception& ex)   {      vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CRITICAL_LVL)         << clrOutBOLD(clrRED, "ERROR")         << ": Failed to spawn thread for SDL Joystick driver!/n"         << vprDEBUG_FLUSH;      vprDEBUG_NEXT(gadgetDBG_INPUT_MGR, vprDBG_CRITICAL_LVL)         << ex.what() << std::endl << vprDEBUG_FLUSH;      started = false;   }   return started;}
开发者ID:baibaiwei,项目名称:vrjuggler,代码行数:45,


示例12: dbg_output

void Node::debugDump(int debug_level){   vpr::DebugOutputGuard dbg_output(gadgetDBG_NET_MGR, debug_level,                              std::string("-------------- Node --------------/n"),                              std::string("-----------------------------------------/n"));   vprDEBUG(gadgetDBG_NET_MGR, debug_level) << "Node Name: "      << mName << std::endl << vprDEBUG_FLUSH;   vprDEBUG(gadgetDBG_NET_MGR, debug_level) << "Hostname:  "      << mHostname << std::endl << vprDEBUG_FLUSH;   vprDEBUG(gadgetDBG_NET_MGR, debug_level) << "Port:      "      << mPort << std::endl << vprDEBUG_FLUSH;   vprDEBUG(gadgetDBG_NET_MGR, debug_level) << "SockStream "      << (NULL == mSockStream ? "is NULL" : "is NOT NULL") << std::endl << vprDEBUG_FLUSH;   if (CONNECTED == getStatus())   {      vprDEBUG(gadgetDBG_NET_MGR, debug_level) << clrOutBOLD(clrGREEN,"CONNECTED") << std::endl << vprDEBUG_FLUSH;   }   else if (NEWCONNECTION == getStatus())   {      vprDEBUG(gadgetDBG_NET_MGR, debug_level) << clrOutBOLD(clrRED,"NEW CONNECTION") << std::endl << vprDEBUG_FLUSH;   }   else   {      vprDEBUG(gadgetDBG_NET_MGR, debug_level) << clrOutBOLD(clrRED,"DISCONNECTED") << std::endl << vprDEBUG_FLUSH;   }}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:28,


示例13: getPacket

 void ClusterDelta::receiveResponce() {    getPacket(1);    mAccept = mReader->readBool();    if ( mAccept == false )    {       vprDEBUG(gadgetDBG_RIM,vprDBG_VERB_LVL) << clrOutNORM(clrRED,"[SYNC]FAILED SYNC") << "/n" << vprDEBUG_FLUSH;    } }
开发者ID:rpavlik,项目名称:vrjuggler-2.2-debs,代码行数:9,


示例14: vprDEBUG

void DataGloveUltraWireless::controlLoop(){   vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_STATE_LVL)         << "[DataGloveUltraWireless] Entered control thread/n"         << vprDEBUG_FLUSH;   // Go until mDone is set to true   while( !mDone )   {      sample();      vpr::System::msleep(10);   }   vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_STATE_LVL)         << "[DataGloveUltraWireless] Exited control thread/n"         << vprDEBUG_FLUSH;}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:18,


示例15: if

// Stop sampling.bool MotionStar::stopSampling(){   bool retval;   // If we are not active, we cannot stop the device.   if ( isActive() == false )   {      retval = false;   }   // If the sampling thread was started, stop it and the device.   else if ( mMyThread != NULL )   {      vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CONFIG_LVL)         << "Stopping the MotionStar thread .../n" << vprDEBUG_FLUSH;      mExitFlag = true;      mMyThread->join();      delete mMyThread;      mMyThread = NULL;      vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CONFIG_LVL)         << "  Stopping the MotionStar .../n" << vprDEBUG_FLUSH;      try      {         mMotionStar.stop();         vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CONFIG_LVL)            << "MotionStar server shut down./n" << vprDEBUG_FLUSH;         retval = true;      }      catch(mstar::CommandException&)      {         vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CONFIG_LVL)            << "MotionStar server did not shut down./n" << vprDEBUG_FLUSH;         retval = false;      }   }   // If the thread was not started, then the device is stopped.   else   {      retval = true;   }   return retval;}
开发者ID:rpavlik,项目名称:vrjuggler-2.2-debs,代码行数:45,


示例16: getFlags

// Reconfigure the file handle so that it is in blocking mode.void FileHandleImplUNIX::setBlocking(bool blocking){   if ( ! mOpen )   {      mOpenBlocking = blocking;   }   else   {      int cur_flags, new_flags;      // Get the current flags.      cur_flags = getFlags();      if ( blocking )      {#ifdef _SGI_SOURCE         // On IRIX, mask FNONBLK and FNDELAY.  We mask FNDELAY to ensure that         // it is not set by the operating system at some level.         new_flags = cur_flags & ~(FNONBLK | FNDELAY);#else         // On everything else, mask O_NONBLOCK and O_NDELAY.  We mask O_NDELAY         // to ensure that it is not set by the operating system at some level.         new_flags = cur_flags & ~(O_NONBLOCK | O_NDELAY);#endif      }      else      {#ifdef _SVR4_SOURCE         // On SysV, set FNONBLK.  We do not set FNDELAY because it just adds         // confusion.  FNONBLK is preferred.         new_flags = cur_flags | FNONBLK;#else         // On everything else, set O_NONBLOCK.  We do not set O_NDELAY because         // it just adds confusion.  O_NONBLOCK is preferred.         new_flags = cur_flags | O_NONBLOCK;#endif      }      // Set the file descriptor to be blocking with the new flags.      if ( setFlags(new_flags) == -1 )      {         vprDEBUG(vprDBG_ERROR, vprDBG_CRITICAL_LVL)            << "[vpr::FileHandleImplUNIX::setBlocking()] Failed to set "            << (blocking ? "blocking" : "non-blocking") << " state on "            << mName << ": " << strerror(errno) << std::endl << vprDEBUG_FLUSH;         throw IOException("[vpr::FileHandleImplUNIX::setBlocking()] Failed to set "            + std::string(blocking ? "blocking" : "non-blocking") + " state on "            + mName + ": " + std::string(strerror(errno)), VPR_LOCATION);      }      else      {         mBlocking = blocking;      }   }}
开发者ID:rpavlik,项目名称:vrjuggler-2.2-debs,代码行数:57,


示例17: vprDEBUG

void X_IST::controlLoop(){   vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_STATE_LVL)      << "[X-IST] Entered control thread/n" << vprDEBUG_FLUSH;// Go until mExitFlag is set to true   while ( ! mExitFlag )   {      sample();   }}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:10,


示例18: vprDEBUG

void ApplicationBarrierManager::handlePacket(PacketPtr packet, gadget::NodePtr node){   vprDEBUG(gadgetDBG_RIM, vprDBG_HVERB_LVL)         << clrOutBOLD(clrMAGENTA,"[ApplicationBarrierManager::handlePacket()]")         << "In handlePacket./n" << vprDEBUG_FLUSH;   if ( NULL != packet.get() && NULL != node.get() )   {      switch ( packet->getPacketType() )      {      case cluster::Header::RIM_DATA_PACKET:      {         DataPacketPtr data_packet = boost::dynamic_pointer_cast<DataPacket>(packet);         vprASSERT(NULL != data_packet.get() && "Dynamic cast failed!");         // Find the ApplicationBarrier Object that we have received data         // for.         ApplicationBarrier* barrier =            getApplicationBarrier(data_packet->getObjectId());         if (barrier != NULL)         {            // Parse the object's data using the temporary ObjectReader            barrier->incWaitingNodes();         }         else         {            vprDEBUG(gadgetDBG_RIM,vprDBG_WARNING_LVL)               << clrOutBOLD(clrCYAN,"[ApplicationBarrierManager] ")               << "Got data for an unknown ApplicationBarrier object: "               << data_packet->getObjectId() << std::endl << vprDEBUG_FLUSH;         }         break;      }      default:         vprDEBUG(gadgetDBG_RIM,vprDBG_WARNING_LVL)            << clrOutBOLD(clrCYAN,"[ApplicationBarrierManager] ")            << "Don't know how to handle a packet of type: "            << packet->getPacketType() << std::endl << vprDEBUG_FLUSH;         break;      }   }}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:43,


示例19: g

void Vrpn::buttonChange(const vrpn_BUTTONCB& b){   vpr::Guard<vpr::Mutex> g(mButtonMutex);   if ( b.button > mButtonNumber )   {      vprDEBUG(vprDBG_ALL, vprDBG_CONFIG_LVL)         << "Vrpn: button " << b.button         << " out of declared range ("<<mButtons.size()<<")"<<std::endl         << vprDEBUG_FLUSH;      mButtons.resize(b.button + 1);   }   vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_VERB_LVL)      << "Button #" << b.button << " state " << b.state << std::endl      << vprDEBUG_FLUSH;   mButtons[b.button] = static_cast<DigitalState::State>(b.state);}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:19,


示例20: vprDEBUG

   /**    * Adds a new plugin to the ClusterManager.    */   void AbstractNetworkManager::addHandler(PacketHandler* new_handler)   {         std::pair<vpr::GUID, PacketHandler*> p             = std::make_pair( new_handler->getHandlerGUID(), new_handler );         mHandlerMap.insert( p );         vprDEBUG( gadgetDBG_NET_MGR, vprDBG_CONFIG_LVL )            << clrOutBOLD( clrMAGENTA, "[Reactor] " )            << "Adding Handler: " << new_handler->getHandlerName() << std::endl << vprDEBUG_FLUSH;   }
开发者ID:rpavlik,项目名称:vrjuggler-2.2-debs,代码行数:13,


示例21: vprDEBUG

vpr::IOSys::Handle FileHandleImplUNIX::getHandle() const{#ifdef VPR_USE_NSPR   vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL)       << "ERROR: Cannot get handle for UNIX file descriptor with NSPR!/n";   return vpr::IOSys::NullHandle;#else   return mFdesc;#endif}
开发者ID:rpavlik,项目名称:vrjuggler-2.2-debs,代码行数:10,


示例22: threadIdKey

// Called by the spawn routine to start the user thread function.void ThreadPosix::startThread(){   // WE are a new thread... yeah!!!!   // TELL EVERYONE THAT WE LIVE!!!!   ThreadManager::instance()->lock();      // Lock manager   {      threadIdKey().setspecific((void*)this);  // Store the pointer to me      registerThread(true);                    // Finish thread initialization   }   ThreadManager::instance()->unlock();   // Signal that thread registration is complete.   mThreadStartCondVar.acquire();   {      mThreadStartCompleted = true;      mThreadStartCondVar.signal();   }   mThreadStartCondVar.release();   try   {      emitThreadStart(this);      // --- CALL USER FUNCTOR --- //      mUserThreadFunctor();      emitThreadExit(this);   }   catch (std::exception& ex)   {      vprDEBUG(vprDBG_ALL, vprDBG_WARNING_LVL)         << clrOutNORM(clrYELLOW, "WARNING:")         << " Caught an unhandled exception of type " << typeid(ex).name()         << " in thread:" << std::endl         << ex.what() << std::endl << vprDEBUG_FLUSH;      vprDEBUG(vprDBG_ALL, vprDBG_WARNING_LVL)         << "Thread exiting due to uncaught exception/n" << vprDEBUG_FLUSH;      mCaughtException = true;      mException.setException(ex);   }}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:43,


示例23: vprDEBUG

bool IntersenseAPI::stopSampling(){   // Make sure that we are sampling in the first place.   if (this->isActive() == false)   {      return false;   }   if (mThread != NULL)   {      vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CONFIG_LVL)         << "[gadget::IntersenseAPI::stopSampling()] Stopping the InterSense "         << "thread.../n" << vprDEBUG_FLUSH;      // Set the done flag to attempt to cause the control loop to exit      // naturally.      mDone = true;      mThread->join();      delete mThread;      mThread = NULL;      // Close the connection to the tracker      mTracker.close();      // If the tracker failed to stop      if (isActive() == true)      {         vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CRITICAL_LVL)            << clrOutNORM(clrRED,"/nERROR:")            << " [gadget::IntersenseAPI::stopSampling()] InterSense tracker "            << "failed to stop./n" << vprDEBUG_FLUSH;         return false;      }      vprDEBUG(gadgetDBG_INPUT_MGR, vprDBG_CONFIG_LVL)         << "*** IntersenseAPI has been shutdown. ***" << std::endl         << vprDEBUG_FLUSH;   }   return true;}
开发者ID:baibaiwei,项目名称:vrjuggler,代码行数:42,


示例24: vprDEBUG

bool Vrpn::stopSampling(){   if ( NULL != mThread )   {      vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL)         << "[Vrpn::stopSampling()] Stopping sample thread" << std::endl         << vprDEBUG_FLUSH;      mExitFlag = true;      // Wait for thread to exit..      mThread->join();      vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL)         << "[Vrpn::stopSampling()] Sample thread stopped" << std::endl         << vprDEBUG_FLUSH;      delete mThread;      mThread = NULL;   }   return true;}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:20,


示例25: vprDEBUG

/** * kill the sound API, deallocating any sounds, etc... * @postconditions sound API is ready to go. * @semantics this function could be called any time, the function could be *            called multiple times, so it should be smart. */void AudiereSoundImplementation::shutdownAPI(){   if ( this->isStarted() == false )   {      vprDEBUG(snxDBG, vprDBG_CONFIG_LVL)         << clrOutNORM(clrYELLOW, "Auidere| WARNING:")         << "API not started, nothing to shutdown [dev="         << std::hex << mDev.get() << std::dec << "]/n" << vprDEBUG_FLUSH;      return;   }   this->unbindAll();   mDev = NULL;   vprDEBUG(snxDBG, vprDBG_CONFIG_LVL)      << clrOutNORM(clrYELLOW, "Audiere| NOTICE:")      << " Audiere API closed: [dev="      << std::hex << mDev.get() << std::dec << "]/n" << vprDEBUG_FLUSH;}
开发者ID:baibaiwei,项目名称:vrjuggler,代码行数:26,


示例26: vprDEBUG

bool Analog::config(jccl::ConfigElementPtr element){   mMin = element->getProperty<float>("min");   mMax = element->getProperty<float>("max");   vprDEBUG(vprDBG_ALL, vprDBG_VERB_LVL)      << "[gadget::Analog::config()] min:" << mMin      << " max:" << mMax << "/n" << vprDEBUG_FLUSH;   return true;}
开发者ID:Michael-Lfx,项目名称:vrjuggler,代码行数:11,


示例27: vprDEBUG

//: Start the main functionint SyncIncrementer::start(){    // Create a new thread to handle the control    vpr::Thread* control_thread =        new vpr::Thread(boost::bind(&SyncIncrementer::main, this));    vprDEBUG(vprDBG_ALL, vprDBG_CRITICAL_LVL) << "SyncIncrementer::start: Just started main loop.  "            << control_thread << std::endl << vprDEBUG_FLUSH;    return 1;}
开发者ID:flair2005,项目名称:vrjuggler,代码行数:12,



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


C++ vprintf函数代码示例
C++ vprASSERT函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。