Beispiel #1
0
bool GUINode::init( Config* config )
{
    LBASSERT( config );
    _config = config;

    if( !co::LocalNode::listen( ))
        return false;

    registerCommand( CMD_GUI_SETX,
                    co::CommandFunc<GUINode>( this, &GUINode::_cmdSetX ),
                    getCommandThreadQueue( ));

    registerCommand( CMD_GUI_SET_FILE,
                    co::CommandFunc<GUINode>( this, &GUINode::_cmdSetFile ),
                    getCommandThreadQueue( ));

    registerCommand( CMD_GUI_SET_TF,
                    co::CommandFunc<GUINode>( this, &GUINode::_cmdSetTF ),
                    getCommandThreadQueue( ));

    registerCommand( CMD_GUI_SET_TENSOR_PARAMETERS,
                    co::CommandFunc<GUINode>( this, &GUINode::_cmdSetTensorParameters ),
                    getCommandThreadQueue( ));

    return true;
}
Beispiel #2
0
void Node::attach( const UUID& id, const uint32_t instanceID )
{
    Super::attach( id, instanceID );

    co::CommandQueue* queue = getMainThreadQueue();
    co::CommandQueue* commandQ = getCommandThreadQueue();
    co::CommandQueue* transmitQ = &transmitter.getQueue();

    registerCommand( fabric::CMD_NODE_CREATE_PIPE,
                     NodeFunc( this, &Node::_cmdCreatePipe ), queue );
    registerCommand( fabric::CMD_NODE_DESTROY_PIPE,
                     NodeFunc( this, &Node::_cmdDestroyPipe ), queue );
    registerCommand( fabric::CMD_NODE_CONFIG_INIT, 
                     NodeFunc( this, &Node::_cmdConfigInit ), queue );
    registerCommand( fabric::CMD_NODE_SET_AFFINITY,
                     NodeFunc( this, &Node::_cmdSetAffinity), transmitQ );
    registerCommand( fabric::CMD_NODE_CONFIG_EXIT,
                     NodeFunc( this, &Node::_cmdConfigExit ), queue );
    registerCommand( fabric::CMD_NODE_FRAME_START,
                     NodeFunc( this, &Node::_cmdFrameStart ), queue );
    registerCommand( fabric::CMD_NODE_FRAME_FINISH,
                     NodeFunc( this, &Node::_cmdFrameFinish ), queue );
    registerCommand( fabric::CMD_NODE_FRAME_DRAW_FINISH, 
                     NodeFunc( this, &Node::_cmdFrameDrawFinish ), queue );
    registerCommand( fabric::CMD_NODE_FRAME_TASKS_FINISH, 
                     NodeFunc( this, &Node::_cmdFrameTasksFinish ), queue );
    registerCommand( fabric::CMD_NODE_FRAMEDATA_TRANSMIT,
                     NodeFunc( this, &Node::_cmdFrameDataTransmit ), commandQ );
    registerCommand( fabric::CMD_NODE_FRAMEDATA_READY,
                     NodeFunc( this, &Node::_cmdFrameDataReady ), commandQ );
}
Beispiel #3
0
 LocalNode()
     : _gotAsync( false )
     , _counter( 0 )
 {
     co::CommandQueue* q = getCommandThreadQueue();
     registerCommand( CMD_ASYNC, CmdFunc( this, &LocalNode::_cmdAsync ), q );
     registerCommand( CMD_SYNC, CmdFunc( this, &LocalNode::_cmdSync ), q );
     registerCommand( CMD_DATA, CmdFunc( this, &LocalNode::_cmdData ), q );
     registerCommand( CMD_DATA_REPLY,
                      CmdFunc( this, &LocalNode::_cmdDataReply ), q );
 }
Beispiel #4
0
void Pipe::attach( const co::base::UUID& id, const uint32_t instanceID )
{
    Super::attach( id, instanceID );

    co::CommandQueue* cmdQ = getCommandThreadQueue();
    registerCommand( fabric::CMD_OBJECT_SYNC,
                     PipeFunc( this, &Pipe::_cmdSync ), cmdQ );
    registerCommand( fabric::CMD_PIPE_CONFIG_INIT_REPLY,
                     PipeFunc( this, &Pipe::_cmdConfigInitReply ), cmdQ );
    registerCommand( fabric::CMD_PIPE_CONFIG_EXIT_REPLY, 
                     PipeFunc( this, &Pipe::_cmdConfigExitReply ), cmdQ );
}
Beispiel #5
0
void Window::attach( const UUID& id, const uint32_t instanceID )
{
    Super::attach( id, instanceID );

    co::CommandQueue* cmdQ = getCommandThreadQueue();
    registerCommand( fabric::CMD_OBJECT_SYNC,
                     WindowFunc( this, &Window::_cmdSync ), cmdQ );
    registerCommand( fabric::CMD_WINDOW_CONFIG_INIT_REPLY,
                     WindowFunc( this, &Window::_cmdConfigInitReply ), cmdQ );
    registerCommand( fabric::CMD_WINDOW_CONFIG_EXIT_REPLY,
                     WindowFunc( this, &Window::_cmdConfigExitReply ), cmdQ );
}
Beispiel #6
0
void Channel::attach( const co::base::UUID& id, const uint32_t instanceID )
{
    Super::attach( id, instanceID );
    
    co::CommandQueue* mainQ  = getMainThreadQueue();
    co::CommandQueue* cmdQ = getCommandThreadQueue();

    registerCommand( fabric::CMD_CHANNEL_CONFIG_INIT_REPLY, 
                     CmdFunc( this, &Channel::_cmdConfigInitReply ), cmdQ );
    registerCommand( fabric::CMD_CHANNEL_CONFIG_EXIT_REPLY,
                     CmdFunc( this, &Channel::_cmdConfigExitReply ), cmdQ );
    registerCommand( fabric::CMD_CHANNEL_FRAME_FINISH_REPLY,
                     CmdFunc( this, &Channel::_cmdFrameFinishReply ), mainQ );
}