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

C++ ProcessData函数代码示例

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

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



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

示例1: CRYPTOPP_ASSERT

void StreamTransformation::ProcessLastBlock(byte *outString, const byte *inString, size_t length)
{
	CRYPTOPP_ASSERT(MinLastBlockSize() == 0);	// this function should be overridden otherwise

	if (length == MandatoryBlockSize())
		ProcessData(outString, inString, length);
	else if (length != 0)
		throw NotImplemented(AlgorithmName() + ": this object doesn't support a special last block");
}
开发者ID:13971643458,项目名称:qtum,代码行数:9,代码来源:cryptlib.cpp


示例2: assert

void StreamTransformation::ProcessLastBlock(byte *outString, const byte *inString, unsigned int length)
{
	assert(MinLastBlockSize() == 0);	// this function should be overriden otherwise

	if (length == MandatoryBlockSize())
		ProcessData(outString, inString, length);
	else if (length != 0)
		throw NotImplemented("StreamTransformation: this object does't support a special last block");
}
开发者ID:randombit,项目名称:hacrypto,代码行数:9,代码来源:cryptlib.cpp


示例3: lock

void IsuCalcLink::ReadyRead()
{
    QMutexLocker lock(&m);

    QTcpSocket::SocketState connState = Socket->state();
    if (connState == QAbstractSocket::ConnectedState)
    {
        ProcessData(Socket->readAll());
    }
}
开发者ID:omishukov,项目名称:dsu_osis,代码行数:10,代码来源:isucalclink.cpp


示例4: DSTACK

bool Client::Receive()
{
	DSTACK(__FUNCTION_NAME);
	NetworkPacket pkt;
	if (!m_con.Receive(&pkt))
		return false;

	ProcessData(&pkt);
	return true;
}
开发者ID:cyisfor,项目名称:freeminer,代码行数:10,代码来源:client.cpp


示例5: ProcessData

NS_IMETHODIMP
nsDirIndexParser::OnStopRequest(nsIRequest *aRequest, nsISupports *aCtxt,
                                nsresult aStatusCode) {
  // Finish up
  if (mBuf.Length() > (PRUint32) mLineStart) {
    ProcessData(aRequest, aCtxt);
  }

  return NS_OK;
}
开发者ID:LittleForker,项目名称:mozilla-central,代码行数:10,代码来源:nsDirIndexParser.cpp


示例6: ProcessData

void CDataView::ProcessData(
	const std::shared_ptr<SourceSetting>& pSrcSetting,
	std::shared_ptr<IDataSetting>& pDataSetting)
{
	m_pSrcSetting = pSrcSetting;
	m_pDataSetting = pDataSetting;
	ProcessData();
	Invalidate();
	UpdateWindow();
}
开发者ID:beru,项目名称:dataviewer,代码行数:10,代码来源:DataView.cpp


示例7: while

void SerialComm::ReadData() {
    while (Serial.available()) {
        data_input.AppendToBuffer(Serial.read());

        if (!data_input.IsDone())
            continue;

        ProcessData();
    }
}
开发者ID:CrypticGator,项目名称:flybrix-firmware,代码行数:10,代码来源:serial.cpp


示例8: ProcessData

void UdpServer::handle_receive(const system::error_code& error, size_t bytes_transferred)
{
	if(!error && bytes_transferred > 0)
	{
		ProcessData(DataToPacket(bytes_transferred));
		socket_.async_send_to(asio::buffer(send_data, send_data.size()), remote_endpoint_,
								boost::bind(&UdpServer::handle_send, this, asio::placeholders::error, asio::placeholders::bytes_transferred));
		start_receive();
	}
}
开发者ID:derrod,项目名称:masebc2,代码行数:10,代码来源:UdpServer.cpp


示例9: UE_LOG

bool FVoiceCaptureWindows::Tick(float DeltaTime)
{
	if (VoiceCaptureState != EVoiceCaptureState::UnInitialized &&
		VoiceCaptureState != EVoiceCaptureState::NotCapturing)
	{
#if 1
		uint32 NextEvent = (LastEventTriggered + 1) % (NUM_EVENTS - 1);
		if (WaitForSingleObject(Events[NextEvent], 0) == WAIT_OBJECT_0)
		{
			UE_LOG(LogVoice, VeryVerbose, TEXT("Event %d Signalled"), NextEvent);
			ProcessData();

			LastEventTriggered = NextEvent;
			ResetEvent(Events[NextEvent]);
		}
#else
		// All "non stop" events
		for (int32 EventIdx = 0; EventIdx < STOP_EVENT; EventIdx++)
		{
			if (WaitForSingleObject(Events[EventIdx], 0) == WAIT_OBJECT_0)
			{
				UE_LOG(LogVoice, VeryVerbose, TEXT("Event %d Signalled"), EventIdx);
				if (LastEventTriggered != EventIdx)
				{
					ProcessData();
				}

				LastEventTriggered = EventIdx;
				ResetEvent(Events[EventIdx]);
			}
		}
#endif

		if (Events[STOP_EVENT] != INVALID_HANDLE_VALUE && WaitForSingleObject(Events[STOP_EVENT], 0) == WAIT_OBJECT_0)
		{
			UE_LOG(LogVoice, Verbose, TEXT("Voice capture stopped"));
			ResetEvent(Events[STOP_EVENT]);
			VoiceCaptureState = EVoiceCaptureState::NotCapturing;
		}
	}

	return true;
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:43,代码来源:VoiceCaptureWindows.cpp


示例10: YUV2Jpg

/////////////////////////////////////////////////////////////////////////////
// Convert YUV411 to JPEG photo file
static int YUV2Jpg(PBYTE in_Y,PBYTE in_U,PBYTE in_V,int width,int height,int quality,int nStride,PBYTE pOut,DWORD *pnOutSize)
{
	PBYTE pYBuf,pUBuf,pVBuf;
	int nYLen = nStride  * height;
	int nUVLen = nStride  * height / 4;
	int	nDataLen;
	JPEGINFO JpgInfo;
	memset(&JpgInfo, 0, sizeof(JPEGINFO));
	JpgInfo.bytenew = 0;
	JpgInfo.bytepos = 7;
	pYBuf = (PBYTE)malloc(nYLen);
	memcpy(pYBuf,in_Y,nYLen);
	pUBuf = (PBYTE)malloc(nYLen);
	pVBuf = (PBYTE)malloc(nYLen);
	
	ProcessUV(pUBuf,in_U,width,height,nStride);
	ProcessUV(pVBuf,in_V,width,height,nStride);
	//	GetDataFromSource(pYBuf,pUBuf,pVBuf,in_Y,in_U,in_V,width);
	DivBuff(pYBuf,width,height,nStride,DCTSIZE,DCTSIZE);
	DivBuff(pUBuf,width,height,nStride,DCTSIZE,DCTSIZE);
	DivBuff(pVBuf,width,height,nStride,DCTSIZE,DCTSIZE);
	quality = QualityScaling(quality);
	SetQuantTable(std_Y_QT,JpgInfo.YQT, quality); // 设置Y量化表
	SetQuantTable(std_UV_QT,JpgInfo.UVQT,quality); // 设置UV量化表
	
	InitQTForAANDCT(&JpgInfo);            // 初始化AA&N需要的量化表
	JpgInfo.pVLITAB=JpgInfo.VLI_TAB + 2048;                             // 设置VLI_TAB的别名
	BuildVLITable(&JpgInfo);            // 计算VLI表   
	
	
	nDataLen = 0;
	// 写入各段
	nDataLen = WriteSOI(pOut,nDataLen); 
	nDataLen = WriteAPP0(pOut,nDataLen);
	nDataLen = WriteDQT(&JpgInfo,pOut,nDataLen);
	nDataLen = WriteSOF(pOut,nDataLen,width,height);
	nDataLen = WriteDHT(pOut,nDataLen);
	nDataLen = WriteSOS(pOut,nDataLen);
	
	// 计算Y/UV信号的交直分量的huffman表,这里使用标准的huffman表,并不是计算得出,缺点是文件略长,但是速度快
	BuildSTDHuffTab(STD_DC_Y_NRCODES,STD_DC_Y_VALUES,JpgInfo.STD_DC_Y_HT);
	BuildSTDHuffTab(STD_AC_Y_NRCODES,STD_AC_Y_VALUES,JpgInfo.STD_AC_Y_HT);
	BuildSTDHuffTab(STD_DC_UV_NRCODES,STD_DC_UV_VALUES,JpgInfo.STD_DC_UV_HT);
	BuildSTDHuffTab(STD_AC_UV_NRCODES,STD_AC_UV_VALUES,JpgInfo.STD_AC_UV_HT);
	
	// 处理单元数据
	nDataLen = ProcessData(&JpgInfo,pYBuf,pUBuf,pVBuf,width,height,pOut,nDataLen);  
	nDataLen = WriteEOI(pOut,nDataLen);
	
	free(pYBuf);
	free(pUBuf);
	free(pVBuf);
	*pnOutSize = nDataLen;
	return 0;
}
开发者ID:SkyChen2012,项目名称:GMApp,代码行数:57,代码来源:JpegApp.c


示例11: ExplorationRun

void ExplorationRun(void) {
	int i;

	if (pSegment.cnt != 0) {
		switch (DispDotMatrixWait("There are recorded data. Continue?")) {
			case SW_PRESS: return;
			default: break;
		}
	}

	// clear rSegment.
	clrSegStruct = (char *) &rSegment;
	for (i = 0; i < sizeof(rSegment); i++)
		*clrSegStruct++ = 0;

	 // clear pSegment before recording data.
	clrSegStruct = (char *) &pSegment;
	for (i = 0; i < sizeof(pSegment); i++)
		*clrSegStruct++ = 0;

	StartBeep();
	DispDotMatrix("GOGO");
	DelaymSec(1500);

	StartRun();
	bExplorationFlag = TRUE;

	// constant speed & acceleration
//	SetRobotSpeedX(EXPLORATION_SPEED);
//	SetRobotAccX(ACCELERATION);

	SetMoveCommand(XSPEED, 100000, 0, EXPLORATION_SPEED, 0, ACCELERATION);

	while (1) {
		PrintRunStatus();

		// prematurely terminate the run with switch press
		if (bSWFlag) {
			bExplorationFlag = FALSE;
			bSWFlag = FALSE;

			StopRun();
			break;
		}

		if (bStopFlag) {
			rSegment.totalDisp = curPos[XSPEED] / DIST_mm_oc(1);
			StopRun();

			ProcessData();
			DispExplorationStats();
			break;
		}
	}
}
开发者ID:gowgos5,项目名称:myproj,代码行数:55,代码来源:libLineTracer.c


示例12: Terminal_Process

///////////////////////////////////////////////////////////////////////////////
/// \brief process the buffer data and extract the commands
///
///	\return TRUE success. FALSE no error
///
///	\todo update the document return state value. need to implement
///////////////////////////////////////////////////////////////////////////////
int_fast8_t Terminal_Process(void)
{
	uint8_t SerialTempData = 0; // hold the new byte from the serial fifo
	int_fast8_t Result = FALSE;

	Result = SerialPort2.GetByte(&SerialTempData);

	if ( TRUE != Result )
	{
		return Result;
	}

	// echo the user command
	SerialPort2.SendByte(SerialTempData);

	if ('\r' == SerialTempData)
	{
		if (NumberOfByteReceived)
		{
			/// \todo call the process data
			if ( TRUE == ProcessData(&Buffer[0], NumberOfByteReceived, &ParameterList) )
			{
				if(  TRUE == RunCommand() )
				{
					Result =  TRUE;
				}

			}
		}
		else
		{
			Result =  FALSE;
		}
	}
	else if ( (SerialTempData >= '0' && SerialTempData <= '9') ||
			(SerialTempData >= 'A' && SerialTempData <= 'Z') ||
			(SerialTempData >= 'a' && SerialTempData <= 'z') || ' ' == SerialTempData || '.' == SerialTempData)

	{
		if ( NumberOfByteReceived < TERMINAL_BUFFER_SIZE )
		{
			Buffer[NumberOfByteReceived] = SerialTempData;
			NumberOfByteReceived++;
			return FALSE;
		}

	}

	// reset buffer by reseting the counter
	NumberOfByteReceived = 0;
	return Result;


}
开发者ID:ContextualElectronics,项目名称:Embedded,代码行数:61,代码来源:Terminal.c


示例13: sender

void CNetwork::DataMayRead( )
{
    QByteArray byData;
    QUdpSocket* udpServer = qobject_cast< QUdpSocket* > ( sender( ) );

    while ( udpServer->hasPendingDatagrams( ) ) {
        byData.resize( udpServer->pendingDatagramSize( ) );
        udpServer->readDatagram( byData.data( ), byData.size( ) );
        ProcessData( byData );
    }
}
开发者ID:Strongc,项目名称:SCPark,代码行数:11,代码来源:parkintranet.cpp


示例14: while

//ProcessOne() takes a track, transforms it to bunch of buffer-blocks,
//and executes ProcessData, on it...
// uses mMult and mOffset to normalize a track.  Needs to have them set before being called
bool EffectNormalize::ProcessOne(WaveTrack * track, wxString msg)
{
   bool rc = true;
   sampleCount s;

   //Transform the marker timepoints to samples
   sampleCount start = track->TimeToLongSamples(mCurT0);
   sampleCount end = track->TimeToLongSamples(mCurT1);
         
   //Get the length of the buffer (as double). len is
   //used simply to calculate a progress meter, so it is easier
   //to make it a double now than it is to do it later 
   double len = (double)(end - start);

   //Initiate a processing buffer.  This buffer will (most likely)
   //be shorter than the length of the track being processed.
   float *buffer = new float[track->GetMaxBlockSize()];

   //Go through the track one buffer at a time. s counts which
   //sample the current buffer starts at.
   s = start;
   while (s < end) {
      //Get a block of samples (smaller than the size of the buffer)
      sampleCount block = track->GetBestBlockSize(s);
      
      //Adjust the block size if it is the final block in the track
      if (s + block > end)
         block = end - s;
      
      //Get the samples from the track and put them in the buffer
      track->Get((samplePtr) buffer, floatSample, s, block);
      
      //Process the buffer.
      ProcessData(buffer, block);
   
      //Copy the newly-changed samples back onto the track.
      track->Set((samplePtr) buffer, floatSample, s, block);
         
      //Increment s one blockfull of samples
      s += block;
      
      //Update the Progress meter
		if (TrackProgress(mCurTrackNum, 
                        0.5+((double)(s - start) / len)/2.0, msg)) {
         rc = false; //lda .. break, not return, so that buffer is deleted
         break;
      }
   }
   //Clean up the buffer
   delete[] buffer;

   //Return true because the effect processing succeeded ... unless cancelled
   return rc;
}
开发者ID:tuanmasterit,项目名称:audacity,代码行数:57,代码来源:Normalize.cpp


示例15: RETURN_IF_ERROR

OP_STATUS MIME_DecodeCache_Storage::Construct(URL_Rep *url_rep, Cache_Storage *src)
{
	RETURN_IF_ERROR(DecodedMIME_Storage::Construct(url_rep));
	source = src;
#ifdef MHTML_ARCHIVE_REDIRECT_SUPPORT
	BOOL prev_decode_only = GetDecodeOnly();
	SetDecodeOnly(TRUE);
	ProcessData(); // Process data early to make the redirect while we have a MessageHandler
	SetDecodeOnly(prev_decode_only);
#endif
	return OpStatus::OK;
}
开发者ID:prestocore,项目名称:browser,代码行数:12,代码来源:mime_cs.cpp


示例16: switch

void CUpdater::ProcessNotification(std::unique_ptr<CNotification> && notification)
{
	if (state_ != UpdaterState::checking && state_ != UpdaterState::newversion_downloading) {
		return;
	}

	switch (notification->GetID())
	{
	case nId_asyncrequest:
		{
			auto pData = unique_static_cast<CAsyncRequestNotification>(std::move(notification));
			if (pData->GetRequestID() == reqId_fileexists) {
				static_cast<CFileExistsNotification *>(pData.get())->overwriteAction = CFileExistsNotification::resume;
			}
			else if (pData->GetRequestID() == reqId_certificate) {
				auto & certNotification = static_cast<CCertificateNotification &>(*pData.get());
				if (m_use_internal_rootcert) {
					auto certs = certNotification.GetCertificates();
					if( certs.size() > 1 ) {
						auto ca = certs.back();

						unsigned int ca_data_length{};
						unsigned char const* ca_data = ca.GetRawData(ca_data_length);

						wxMemoryBuffer updater_root = wxBase64Decode(s_update_cert, wxNO_LEN, wxBase64DecodeMode_SkipWS);
						if( ca_data_length == updater_root.GetDataLen() && !memcmp(ca_data, updater_root.GetData(), ca_data_length) ) {
							certNotification.m_trusted = true;
						}
					}
				}
				else {
					certNotification.m_trusted = true;
				}
			}
			engine_->SetAsyncRequestReply(std::move(pData));
		}
		break;
	case nId_data:
		ProcessData(static_cast<CDataNotification&>(*notification.get()));
		break;
	case nId_operation:
		ProcessOperation(static_cast<COperationNotification const&>(*notification.get()));
		break;
	case nId_logmsg:
		{
			auto const& msg = static_cast<CLogmsgNotification const&>(*notification.get());
			log_ += msg.msg + _T("\n");
		}
		break;
	default:
		break;
	}
}
开发者ID:juaristi,项目名称:filezilla,代码行数:53,代码来源:updater.cpp


示例17: main

int main()
{
  ProcessData(std::vector<int>::iterator::iterator_category());
  ProcessData(std::list<int>::iterator::iterator_category());
  ProcessData(std::map<int, char>::iterator::iterator_category());
  ProcessData(std::set<int>::iterator::iterator_category());
  ProcessData(std::istream_iterator<int>::iterator::iterator_category());
  ProcessData(std::ostream_iterator<int>::iterator::iterator_category());
  ProcessData(std::forward_list<int>::iterator::iterator_category());
}
开发者ID:jamespascoe,项目名称:C11-Work,代码行数:10,代码来源:Traits.cpp


示例18: main

/* It's the main function for the program, what more do you need to know? */
int main() {
    int16_t  Degrees = 0;
    uint8_t  SregSave;
    //int16_t  Correction = 0;

    Degrees = Degrees; //Because it's a warning otherwise, and I don't think I can get rid of it
    DataReady = FALSE;

    /* Setup the ATmega328p */
    InitDevice();

    /* Enable interrupts */
    sei();

    /* Wait till we get data */
    while(!DataReady);

    /* Main loop */
    while(TRUE) {
        /* If there is pending data, process it */
        if(DataReady) {
            SregSave = SREG; /* Preserve the status register */
            /* We want the data retrevial completely performed without interruptions */
            cli();
            //Hand off to a function

            Degrees = ProcessData();

            DataReady = FALSE;

            /* Restore the status register */
            SREG = SregSave;
        }

        //Currently not used, add in later once supplies are received
        /* Check to see if the calibration circuit is active, and if so, adjust
         * change the mode to calibration mode
         */
        //if(bit_is_clear(PORTD, PD4)) {
        /* Check to so see if there is a low signal from the calibration circuit */
        //Correction = Calibrate(Correction, Degrees);
        //} else {
        /* If we aren't calibrating, display the direction and such */
        LcdWriteString(HeadingString(Degrees), LCD_LINE_ONE);
        //}
        //Degrees += Correction;

        //LcdWriteString(("Degrees: %d", Degrees), LCD_LINE_TWO); //TODO fix this!
    }
    /* If this is ever called, I don't even know anymore */
    return 0;
}
开发者ID:iospace,项目名称:compass,代码行数:53,代码来源:compass.c


示例19: ProcessData

//------------------------------------------------------------------------------
// Main function for device thread
void PingerDriver::Main()
{
    for (;;)
    {
      
        // Wait for messages to arrive
        base::Wait();
        
        base::ProcessMessages();

        ProcessData();
    }
}
开发者ID:abroun,项目名称:UweSub,代码行数:15,代码来源:PingerDriver.cpp


示例20: ProcessData

  void BaseBulkRound::IncomingDataSpecial(const Request &notification)
  {
    QVariantHash msg = notification.GetData().toHash();

    if(msg.value("bulk", false).toBool()) {
      QSharedPointer<Connections::IOverlaySender> sender =
        notification.GetFrom().dynamicCast<Connections::IOverlaySender>();
      const Id &id = sender->GetRemoteId();
      ProcessData(id, msg.value("data").toByteArray());
    } else {
      _shuffle_round->IncomingData(notification);
    }
  }
开发者ID:ASchurman,项目名称:Dissent,代码行数:13,代码来源:BaseBulkRound.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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