Пример #1
0
void BlockManagerMaster::BlockManagerMasterActor::matcherReceiver(const MatcherMessage &message,const Theron::Address from){
	cout<<"I want the proj "<<from.AsString()<<" shows:"<<message.filenameText<<" from "<<message.bmiText<<endl;
	BlockManagerId *bmi=new BlockManagerId(message.bmiText);
	BlanceMatcher *bm=BlanceMatcher::getInstance();
	string res=bm->matcher(message.filenameText,*bmi);
	MatcherRespond resp(res.c_str());
	cout<<"I will send the proj "<<res.c_str()<<" to "<<from.AsString()<<endl;
	Send(resp,from);
}
Пример #2
0
void BlockManagerMaster::BlockManagerMasterActor::workerRegister(const StorageBudgetMessage &message,const Theron::Address from){
	// 加到blockInfo中
	cout<<"I receive message: nodeid"<<message.nodeid<<" and other information "<<from.AsString()<<endl;
	string respond="ok";
	RegisterStorageRespond rsr(respond.c_str());
	Send(rsr,from);
}
Пример #3
0
void CellDrawActor< C >::allDrawHandler(
    const AllDrawMessage< C >& m,
    const Theron::Address from
) {
    std::cout << Ogre::StringConverter::toString( from.AsInteger() ) <<
        " CellDrawActor::allDrawHandler() start" << std::endl;

    CellDrawActor< C >::allDraw( m );

    // Информируем о выполнении
    TailSend( true, from );

    // @test Спим, чтобы убедиться: мы в потоке и нам потоков хватает.
    //Sleep( 5000 );

    std::cout << Ogre::StringConverter::toString( from.AsInteger() ) <<
        " CellDrawActor::allDrawHandler() stop" << std::endl;
}
Пример #4
0
void CellDrawActor< C >::gridDrawHandler(
    const GridDrawMessage& m,
    const Theron::Address from
) {
    std::cout << Ogre::StringConverter::toString( from.AsInteger() ) <<
        " CellDrawActor::gridDrawHandler() start" << std::endl;

    CellDrawActor< GasFD >::gridDraw( m );

    // Информируем о выполнении
    Send( true, from );

    // @test Спим, чтобы убедиться: мы в потоке и нам потоков хватает.
    // Если потоков на отрисовку не хватает, будет пауза.
    //Sleep( 5000 );

    std::cout << Ogre::StringConverter::toString( from.AsInteger() ) <<
        " CellDrawActor::gridDrawHandler() stop" << std::endl;
}
Пример #5
0
static void DumpMessage(
    const void *const data,
    const Theron::uint32_t size,
    const Theron::Address from)
{
    printf("Unhandled %d byte message sent from address %d:\n",
        size,
        from.AsInteger());

    // Dump the message as hex data.
    if (data)
    {
        const char *const format("[%d] 0x%08x\n");

        const unsigned int *const begin(reinterpret_cast<const unsigned int *>(data));
        const unsigned int *const end(begin + size / sizeof(unsigned int));

        for (const unsigned int *word(begin); word != end; ++word)
        {
            printf(format, static_cast<int>(word - begin), *word);
        }
    }
}
Пример #6
0
void BlockManagerMaster::BlockManagerMasterActor::blockStatusReceiver(const BlockStatusMessage &message,const Theron::Address from){
	cout<<"receive a block "<<from.AsString()<<" shows:"<<message.mText<<endl;
	AllBlockInfo *abi=AllBlockInfo::getInstance();
	abi->put(from.AsString(),message.mText);
}
Пример #7
0
void BlockManagerMaster::BlockManagerMasterActor::heartbeatReceiver(const HeartBeatMessage &message,const Theron::Address from){
	cout<<"receive heartbeat from node "<<from.AsString()<<" shows:"<<message.mText<<endl;
	string respond="ok";
	HeartBeatRespond hbr(respond.c_str());
	Send(hbr,from);
}
Пример #8
0
void NFCActor::HandlerEx(const NFIActorMessage& message, const Theron::Address from)
{
    m_pActorModule->HandlerEx(message, from.AsInteger());
}