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


C++ OSCMessage::getAddress方法代码示例

本文整理汇总了C++中OSCMessage::getAddress方法的典型用法代码示例。如果您正苦于以下问题:C++ OSCMessage::getAddress方法的具体用法?C++ OSCMessage::getAddress怎么用?C++ OSCMessage::getAddress使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OSCMessage的用法示例。


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

示例1: handleOSCBundleInternal

void SmSnDevice::handleOSCBundleInternal(class OSCBundle &bundle) {
    if (bundle.hasError()) {
        errorCue();
        playTone(400,100);
        osc.sendOSCBundleError(bundle);
    } else if (!(handleOSCBundle(bundle)
        // TODO: copying addresses into buffers on the fly (via address()), one by one, is inefficient
        || bundle.dispatch(address(OSC_ERROR), handleErrorMessage)
        || bundle.dispatch(address(OSC_INFO), handleInfoMessage)
        //|| bundle.dispatch(address(OSC_MORSE), handleMorseMessage)
        || bundle.dispatch(address(OSC_OK), handleOkMessage)
        || bundle.dispatch(address(OSC_PING), handlePingMessage)
        || bundle.dispatch(address(OSC_READY), handleReadyMessage)
#ifdef BOUNTIFUL_RAM
        || bundle.dispatch(address(OSC_CONTEXT_SET), handleContextSetMessage)
        || bundle.dispatch(address(OSC_PING_REPLY), handlePingReplyMessage)
        || bundle.dispatch(address(OSC_RGB_SET), handleRGBSetMessage)
        || bundle.dispatch(address(OSC_TONE), handleToneMessage)
        || bundle.dispatch(address(OSC_VIBRO), handleVibroMessage)
#endif // BOUNTIFUL_RAM
        || bundle.dispatch(address(OSC_WARNING), handleWarningMessage)
        )) {
        if (!bundle.size()) {
            osc.sendError(ERR_EMPTY_OSC_BUNDLE);
        } else {
            for (int i = 0; i < bundle.size(); i++) {
                OSCMessage *m = bundle.getOSCMessage(i);
                char address[64];
                m->getAddress(address);
                osc.sendError(ERR_NO_HANDLER, address);
            }
        }
        errorCue();
    }
}
开发者ID:JeffreyBenjaminBrown,项目名称:smsn,代码行数:35,代码来源:SmSnDevice.cpp

示例2: dispatchMessage

void OSCPacketDispatcher::dispatchMessage(OSCMessage& message, QHostAddress& address, QDateTime& time)
{
    QList<QString> mkeys = iAddressToClassTable->keys();
    for(int i=0; i < mkeys.length(); i++)
    {
        const QString& addresskey = mkeys.at(i);
        if(addresskey==message.getAddress())
        {
            OSCListener* olistener = iAddressToClassTable->value(addresskey);
            olistener->acceptMessage(address,time,message);
        }
    }
}
开发者ID:dodata3,项目名称:reroot,代码行数:13,代码来源:OSCPacketDispatcher.cpp

示例3: check_OSC

void check_OSC(){
  
 if ( osc.available() ) {

          //toplevel address matching
          if( !strcmp( recMes.getAddress(0) , topAddress ) ){
                            
              //second level address matching           
             
                if( !strcmp( recMes.getAddress(1) , subAddress[0] ) ) {  // xpos    
                      do_xpos();}
  
                if( !strcmp( recMes.getAddress(1) , subAddress[1] ) ){   // ypos   
                      do_ypos();}
                
                if( !strcmp( recMes.getAddress(1) , "/button1" ) ){   // button1
                      do_button1();}
                
                if( !strcmp( recMes.getAddress(1) , subAddress[6] ) ){   // button2
                      do_button2();}
                
                if( !strcmp( recMes.getAddress(1) , subAddress[7] ) ){   // button3
                      do_button3();}
                
                if( !strcmp( recMes.getAddress(1) , subAddress[8] ) ){   // button4
                      do_button4();}
  
                if( !strcmp( recMes.getAddress(1) , subAddress[9] ) ){   // button5
                      do_button5();}
  
                if( !strcmp( recMes.getAddress(1) , subAddress[10] ) ){   // button6
                      do_button6();}
  
                if( !strcmp( recMes.getAddress(1) , subAddress[11] ) ){   // button7
                      do_button7();}
  
                if( !strcmp( recMes.getAddress(1) , subAddress[12] ) ){   // button8
                      do_button8();}
                                
                if( !strcmp( recMes.getAddress(1) , "/button9" ) ){  
                      do_button9();}                                     
         
                if( !strcmp( recMes.getAddress(1) , "/button16" ) ){  
                      do_button16();}               



                          
                if( !strcmp( recMes.getAddress(1) , subAddress[2] ) ){   // slider1
                      do_slider1();}
                
                if( !strcmp( recMes.getAddress(1) , subAddress[3] ) ){   // slider2
                      do_slider2();}
                
                if( !strcmp( recMes.getAddress(1) , subAddress[4] ) ){   // slider3
                      do_slider3();}
                      
                if( !strcmp( recMes.getAddress(1) , subAddress[13] ) ){   // slider4
                      do_slider4();}
                      
                if( !strcmp( recMes.getAddress(1) , "/slider5" ) ){  
                      do_slider5();}
                
                if( !strcmp( recMes.getAddress(1) , "/slider6" ) ){  
                      do_slider6();}
        
                if( !strcmp( recMes.getAddress(1) , "/slider7" ) ){  
                      do_slider7();}
        
                if( !strcmp( recMes.getAddress(1) , "/slider8" ) ){  
                      do_slider8();}
                      
                if( !strcmp( recMes.getAddress(1) , "/slider9" ) ){  
                      do_slider9();}
                      
                if( !strcmp( recMes.getAddress(1) , "/slider10" ) ){  
                      do_slider10();}
                      
                if( !strcmp( recMes.getAddress(1) , "/slider11" ) ){  
                      do_slider11();}
                      
                if( !strcmp( recMes.getAddress(1) , "/slider12" ) ){  
                      do_slider12();}
          
           }
 
    }
 }      //check_OSC
开发者ID:ralfberge,项目名称:git,代码行数:88,代码来源:Iphone_arduino_silvester_2010.cpp


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