Exemplo n.º 1
0
void NetDataNode_c::analyzeResponse(TempMemBuffer_c& tbBuffer)
{
    //tbBuffer.cutAsString();
    MSG("RECEIVED reponse, to analyze...\n");
    TempSimpleVector_c<TlvAttrIf_i*> lstResponseAttrs(8);

    TlvParser_c parser(&lstResponseAttrs);
    parser.parse(tbBuffer.getBuffer(), tbBuffer.getLength());

    MSG("returned %d attributes\n", lstResponseAttrs.size());

    //processSGResponse(&lstResponseAttrs);
    (*funcRspHandlerCB_m)(&lstResponseAttrs);

    // TODO: to suppot persistant connection in the future
    MSG("release io trans...\n");
    releaseIoTrans();

    ////to check if need to start new round checking
    //if (NULL != lstPendingGroup_m) // && (lstPendingGroup_m->size() > 0))
    //{
    //    sendSGCheckEvent();
    //}
    if (!hasNewData())
    {
        NetDataProxy_c::getInstance()->releaseNode(nSgId_m);
    }
    else
    {
        // allocate new Io trasaction
        allocateIoTrans();
    }
}
Exemplo n.º 2
0
void ServerListener::hasData()
{
    for(int i=0;i<MAXCONNECTION;i++)
    {
        if(clients[i]!=NULL&&clients[i]->isReadable())
        {
            qDebug()<<__FUNCTION__;
            emit hasNewData(clients[i],list);    //发送信号给数据包解析类
        }
    }
}
Exemplo n.º 3
0
void LaserMapping::process()
{
   if (!hasNewData())// waiting for new data to arrive...
      return;

   reset();// reset flags, etc.

   if (!BasicLaserMapping::process(fromROSTime(_timeLaserOdometry)))
      return;

   publishResult();
}