当前位置: 首页>>代码示例>>C++>>正文


C++ writeMessage函数代码示例

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


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

示例1: clientStateListLock

void SharedJelloServer::sendServerUpdate(void)
	{
	/* Lock the client state list: */
	Threads::Mutex::Lock clientStateListLock(clientStateListMutex);
	
	/* Go through all client states: */
	for(ClientStateList::iterator cslIt=clientStates.begin();cslIt!=clientStates.end();++cslIt)
		{
		ClientState* cs=*cslIt;
		if(cs->connected)
			{
			try
				{
				Threads::Mutex::Lock pipeLock(cs->pipeMutex);
				
				if(cs->parameterVersion!=parameterVersion)
					{
					/* Send a parameter update message: */
					writeMessage(SERVER_PARAMUPDATE,*cs->pipe);
					cs->pipe->write<Scalar>(crystal.getAtomMass());
					cs->pipe->write<Scalar>(crystal.getAttenuation());
					cs->pipe->write<Scalar>(crystal.getGravity());
					cs->parameterVersion=parameterVersion;
					}
				
				/* Send a server update message: */
				writeMessage(SERVER_UPDATE,*cs->pipe);
				
				/* Send the crystal's state: */
				crystal.writeAtomStates(*cs->pipe);
				
				cs->pipe->flush();
				}
			catch(...)
				{
				/* Ignore write errors; let the client communication thread handle them */
				}
			}
		}
	}
开发者ID:Doc-Ok,项目名称:OpticalTracking,代码行数:40,代码来源:SharedJelloServer.cpp

示例2: loadVideo

void CasparDevice::playVideo(int channel, int videolayer, const QString& name, const QString &transition, int duration,
                             const QString& easing, const QString& direction, int seek, int length, bool loop, bool useAuto)
{
    if (useAuto)
        loadVideo(channel, videolayer, name, transition, duration, easing, direction, seek, length, loop, false, useAuto);
    else
        writeMessage(QString("PLAY %1-%2 \"%3\" %4 %5 %6 %7 %8 %9 %10")
                     .arg(channel).arg(videolayer).arg(name).arg(transition).arg(duration).arg(easing)
                     .arg(direction)
                     .arg((seek > 0) ? QString("SEEK %1").arg(seek) : "")
                     .arg((length > 0) ? QString("LENGTH %1").arg(length) : "")
                     .arg((loop == true) ? "LOOP" : ""));
}
开发者ID:IainCole,项目名称:Client,代码行数:13,代码来源:CasparDevice.cpp

示例3: uiNameChanged

    void uiNameChanged(const char* const uiName) override
    {
        CARLA_SAFE_ASSERT_RETURN(uiName != nullptr && uiName[0] != '\0',);

        const CarlaMutexLocker cml(getPipeLock());

        if (! writeMessage("uiTitle\n", 8))
            return;
        if (! writeAndFixMessage(uiName))
            return;

        flushMessages();
    }
开发者ID:falkTX,项目名称:Carla,代码行数:13,代码来源:CarlaNativeExtUI.hpp

示例4: lock

void SIPTransaction::sendAckFor2xx(
  const SIPMessage::Ptr& pAck,
  const OSS::IPAddress& dialogTarget)
{
  OSS::mutex_lock lock(_mutex);
  if (!_dialogTarget.isValid())
    _dialogTarget = dialogTarget;

  if (SIPXOR::isEnabled() && _isXOREncrypted)
  {
    pAck->setProperty("xor", "1");
  }

  if (_transport->isReliableTransport())
  {
    writeMessage(pAck);
  }
  else
  {
    writeMessage(pAck, dialogTarget);
  }
}
开发者ID:arnaudcoquelet,项目名称:oss_core,代码行数:22,代码来源:SIPTransaction.cpp

示例5: QString

void ChatWindow::conNameChanged(QString name)
{
  if( m_conName == name ||( name == "" 
                            && m_conName == QString(m_chatConnection->getIp()+":"+QString::number(m_chatConnection->getClientPort())) ) ){
    return;
  }
  if( name == ""  ){
    name = QString(m_chatConnection->getIp()+":"+QString::number(m_chatConnection->getClientPort()));
  }
  writeMessage(StatusMess, QString("%1 changed name to %2").arg(m_conName, name) );
  m_conName = name;
  setWindowTitle(QString("Chat: %1 - KLan").arg(m_conName));
}
开发者ID:Fxrh,项目名称:KLan,代码行数:13,代码来源:chatwindow.cpp

示例6: writeMessage

void TextOutputWidget::showSuccessMessage(const QString &message)
{
  QColor previousBackgroundColor = m_output->textBackgroundColor();
  QColor previousColor = m_output->textColor();

  m_output->setTextBackgroundColor(m_succesBackgroundColor);
  m_output->setTextColor(m_succesTextColor);

  writeMessage(message);

  m_output->setTextBackgroundColor(previousBackgroundColor);
  m_output->setTextColor(previousColor);
}
开发者ID:UIKit0,项目名称:kate,代码行数:13,代码来源:textoutputwidget.cpp

示例7: writeMessage

void Messages::actionCB()
{
  if (entry.empty()) return;

  history.push_back(entry);  // save in history

  if (entry[0] == '!') performRequest(entry);
  else {
    writeMessage("chat", g.pref.user, entry.c_str());  // display in message zone
    User::userWriting(entry.c_str());		       // send to World Management
  }
  entry = ""; // clear textfield
}
开发者ID:philippedax,项目名称:vreng,代码行数:13,代码来源:message.cpp

示例8: writeMessage

void CasparDevice::loadVideo(int channel, int videolayer, const QString& name, const QString& transition, int duration,
                             const QString& easing, const QString& direction, int seek, int length, bool loop,
                             bool freezeOnLoad, bool useAuto)
{
    writeMessage(QString("%1 %2-%3 \"%4\" %5 %6 %7 %8 %9 %10 %11 %12")
                 .arg((freezeOnLoad == true) ? "LOAD" : "LOADBG")
                 .arg(channel).arg(videolayer).arg(name).arg(transition).arg(duration).arg(easing)
                 .arg(direction)
                 .arg((seek > 0) ? QString("SEEK %1").arg(seek) : "")
                 .arg((length > 0) ? QString("LENGTH %1").arg(length) : "")
                 .arg((loop == true) ? "LOOP" : "")
                 .arg((useAuto == true) ? "AUTO" : ""));
}
开发者ID:IainCole,项目名称:Client,代码行数:13,代码来源:CasparDevice.cpp

示例9: writeMessage

/**
 * Returns 1 (true) if the font object type 1 passed as a parameter exists
 * and it is deleted from the manager successfully.
 * @param pFo						Pointer to font object type 1
 */
bool IND_FontManager::remove(IND_Font  *pFo) {
	g_debug->header("Freeing font", DebugApi::LogHeaderBegin);

	if (!_ok) {
		writeMessage();
		return 0;
	}

	// Search object
	bool mIs = 0;
	list <IND_Font *>::iterator mFontListIter;
	for (mFontListIter  = _listFonts->begin();
	        mFontListIter != _listFonts->end();
	        mFontListIter++) {
		if ((*mFontListIter) == pFo) {
			mIs = 1;
			break;
		}
	}

	// Not found
	if (!mIs) {
		writeMessage();
		return 0;
	}

	// ----- Free object -----

	g_debug->header("File name:", DebugApi::LogHeaderInfo);
	g_debug->dataChar(pFo->getFileName(), 1);
    
	// Quit from list
	delFromlist(pFo);

	g_debug->header("Ok", DebugApi::LogHeaderEnd);

	return 1;
}
开发者ID:M-F-K,项目名称:indielib-crossplatform,代码行数:43,代码来源:IND_FontManager.cpp

示例10: qDebug

void Server::sendJob(QTcpSocket* socket)
{
  // mutexes
  if(cur_y >= vres) return;
  qDebug() << "Send Job";

  WhiteNetwork::Job job = { cur_y, cur_y + step };
  cur_y += step;

  QByteArray data;
  QDataStream ds(&data, QIODevice::ReadWrite);
  ds << WhiteNetwork::Message::Job << job;
  writeMessage(socket, data);
}
开发者ID:ghostec,项目名称:White2,代码行数:14,代码来源:Server.cpp

示例11: withoutDefaultGood

void withoutDefaultGood(Message mess){

  switch(mess){
    case Message::information:
      writeMessage();
      break;
    case Message:: warning:
      writeWarning();
      break;
    default:
      // nothing can be done
      break;
  }
  
}
开发者ID:RainerGrimm,项目名称:ModernesCppSource,代码行数:15,代码来源:switch.cpp

示例12: writeMessage

void Writer::recordMessage(const protocol::MessagePtr &msg)
{
	if(msg->isRecordable()) {
		const qint64 now = QDateTime::currentMSecsSinceEpoch();

		if(m_minInterval>0) {
			const qint64 interval = now - m_interval;
			if(interval >= m_minInterval) {
				writeMessage(protocol::Interval(0, qMin(qint64(0xffff), interval)));
			}
			m_interval = now;
		}

		if(m_timestampInterval > 0) {
			const qint64 interval = now - m_lastTimestamp;
			if(interval >= m_timestampInterval) {
				writeMessage(protocol::Marker(0, QDateTime::currentDateTime().toString()));
				m_lastTimestamp = now;
			}
		}

		writeMessage(*msg);
	}
}
开发者ID:callaa,项目名称:Drawpile,代码行数:24,代码来源:writer.cpp

示例13: mavlink_msg_request_data_stream_encode

void _MavlinkInterface::requestDataStream(uint8_t stream_id, int rate)
{
	mavlink_message_t message;
	mavlink_request_data_stream_t ds;
	ds.target_system = system_id;
	ds.target_component = autopilot_id;
	ds.req_stream_id = stream_id;
	ds.req_message_rate = rate;
	ds.start_stop = 1;
	mavlink_msg_request_data_stream_encode(system_id, companion_id, &message,&ds);

	writeMessage(message);

	return;
}
开发者ID:k5un,项目名称:OpenKAI,代码行数:15,代码来源:_MavlinkInterface.cpp

示例14: requestBroadcastMessage

int requestBroadcastMessage(uint8_t address[5], uint8_t broadcast_address[5], uint8_t messageIndex) {
    printk("running init!\n");
    uint8_t type = REQUESTBROADCAST;
    InitBroadcast msg;
    msg.messageId = type;
    msg.messageIndex = messageIndex;
    msg.length = 10;
    msg.uuid = CONFIG_HARDWARE_ID
    memcpy(msg.address, address, 5*sizeof(uint8_t));
    printk("Sending init message\n");
    printk("address %d\n", msg.address[1]);
    int writeReturn = writeMessage(msg, broadcast_address, msg.length);
    printk("sent broadcast\n");
    return writeReturn;
}
开发者ID:rymurr,项目名称:nrf24_tests,代码行数:15,代码来源:protocol.c

示例15: withDefault

void withDefault(Message mess){

  switch(mess){
    case Message::information:
      writeMessage();
      break;
    case Message:: warning:
      writeWarning();
      break;
    default:
      writeUnexpected();
      break;
  }
  
}
开发者ID:RainerGrimm,项目名称:ModernesCppSource,代码行数:15,代码来源:switch.cpp


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