diff --git a/cwIo.cpp b/cwIo.cpp index d6d37d8..86d57fb 100644 --- a/cwIo.cpp +++ b/cwIo.cpp @@ -455,8 +455,14 @@ namespace cw { rc_t rc = kOkRC; unsigned parserBufByteN = 1024; - - if((rc = c->getv( + const object_t* cfg = nullptr; + + // get the MIDI port cfg + if((cfg = c->find("midi")) == nullptr) + return cwLogError(kSyntaxErrorRC,"Unable to locate the 'MIDI' configuration."); + + + if((rc = cfg->getv( "parserBufByteN", parserBufByteN )) != kOkRC ) { rc = cwLogError(kSyntaxErrorRC,"MIDI configuration parse failed."); @@ -1478,14 +1484,14 @@ namespace cw } // parse the audio group list - if((rc = _audioDeviceParseAudioGroupList( p, cfg )) != kOkRC ) + if((rc = _audioDeviceParseAudioGroupList( p, node )) != kOkRC ) { rc = cwLogError(rc,"Parse audio group list."); goto errLabel; } // parse the audio device list - if((rc = _audioDeviceParseAudioDeviceList( p, cfg )) != kOkRC ) + if((rc = _audioDeviceParseAudioDeviceList( p, node )) != kOkRC ) { rc = cwLogError(rc,"Parse audio device list."); goto errLabel; @@ -1546,13 +1552,13 @@ namespace cw // // This function is called by the websocket with messages comring from a remote UI. - rc_t _uiCallback( void* cbArg, unsigned wsSessId, ui::opId_t opId, unsigned parentAppId, unsigned uuId, unsigned appId, const ui::value_t* v ) + rc_t _uiCallback( void* cbArg, unsigned wsSessId, ui::opId_t opId, unsigned parentAppId, unsigned uuId, unsigned appId, unsigned chanId, const ui::value_t* v ) { io_t* p = (io_t*)cbArg; msg_t r; r.tid = kUiTId; - r.u.ui = { .opId=opId, .wsSessId=wsSessId, .parentAppId=parentAppId, .uuId=uuId, .appId=appId, .value=v }; + r.u.ui = { .opId=opId, .wsSessId=wsSessId, .parentAppId=parentAppId, .uuId=uuId, .appId=appId, .chanId=chanId, .value=v }; return p->cbFunc(p->cbArg,&r); } @@ -2588,192 +2594,192 @@ unsigned cw::io::uiFindElementUuId( handle_t h, unsigned appId ) return kInvalidId; } -cw::rc_t cw::io::uiCreateFromObject( handle_t h, const object_t* o, unsigned wsSessId, unsigned parentUuId, const char* eleName) +cw::rc_t cw::io::uiCreateFromObject( handle_t h, const object_t* o, unsigned parentUuId, unsigned chanId, const char* eleName) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createFromObject(uiH,o,wsSessId,parentUuId,eleName); + rc = ui::createFromObject(uiH,o,parentUuId,chanId,eleName); return rc; } -cw::rc_t cw::io::uiCreateFromFile( handle_t h, const char* fn, unsigned wsSessId, unsigned parentUuId) +cw::rc_t cw::io::uiCreateFromFile( handle_t h, const char* fn, unsigned parentUuId, unsigned chanId) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createFromFile(uiH,fn,wsSessId,parentUuId); + rc = ui::createFromFile(uiH,fn,parentUuId,chanId); return rc; } -cw::rc_t cw::io::uiCreateFromText( handle_t h, const char* text, unsigned wsSessId, unsigned parentUuId) +cw::rc_t cw::io::uiCreateFromText( handle_t h, const char* text, unsigned parentUuId, unsigned chanId) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createFromText(uiH,text,wsSessId,parentUuId); + rc = ui::createFromText(uiH,text,parentUuId, chanId); return rc; } -cw::rc_t cw::io::uiCreateDiv( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ) +cw::rc_t cw::io::uiCreateDiv( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createDiv(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title); + rc = ui::createDiv(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title); return rc; } -cw::rc_t cw::io::uiCreateLabel( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ) +cw::rc_t cw::io::uiCreateLabel( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createLabel(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title); + rc = ui::createLabel(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title); return rc; } -cw::rc_t cw::io::uiCreateButton( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ) +cw::rc_t cw::io::uiCreateButton( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createButton(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title); + rc = ui::createButton(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title); return rc; } -cw::rc_t cw::io::uiCreateCheck( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ) +cw::rc_t cw::io::uiCreateCheck( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createCheck(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title); + rc = ui::createCheck(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title); return rc; } -cw::rc_t cw::io::uiCreateCheck( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, bool value ) +cw::rc_t cw::io::uiCreateCheck( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, bool value ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createCheck(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title,value); + rc = ui::createCheck(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title,value); return rc; } -cw::rc_t cw::io::uiCreateSelect( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ) +cw::rc_t cw::io::uiCreateSelect( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createSelect(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title); + rc = ui::createSelect(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title); return rc; } -cw::rc_t cw::io::uiCreateOption( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ) +cw::rc_t cw::io::uiCreateOption( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createOption(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title); + rc = ui::createOption(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title); return rc; } -cw::rc_t cw::io::uiCreateStr( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ) +cw::rc_t cw::io::uiCreateStr( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createStr(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title); + rc = ui::createStr(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title); return rc; } -cw::rc_t cw::io::uiCreateStr( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, const char* value ) +cw::rc_t cw::io::uiCreateStr( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, const char* value ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createStr(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title,value); + rc = ui::createStr(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title,value); return rc; } -cw::rc_t cw::io::uiCreateNumbDisplay(handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, unsigned decPl ) +cw::rc_t cw::io::uiCreateNumbDisplay(handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, unsigned decPl ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createNumbDisplay(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title,decPl); + rc = ui::createNumbDisplay(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title,decPl); return rc; } -cw::rc_t cw::io::uiCreateNumbDisplay(handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, unsigned decPl, double value ) +cw::rc_t cw::io::uiCreateNumbDisplay(handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, unsigned decPl, double value ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createNumbDisplay(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title,value); + rc = ui::createNumbDisplay(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title,value); return rc; } -cw::rc_t cw::io::uiCreateNumb( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, double minValue, double maxValue, double stepValue, unsigned decPl ) +cw::rc_t cw::io::uiCreateNumb( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, double minValue, double maxValue, double stepValue, unsigned decPl ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createNumb(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title,minValue,maxValue,stepValue,decPl); + rc = ui::createNumb(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title,minValue,maxValue,stepValue,decPl); return rc; } -cw::rc_t cw::io::uiCreateNumb( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, double minValue, double maxValue, double stepValue, unsigned decPl, double value ) +cw::rc_t cw::io::uiCreateNumb( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, double minValue, double maxValue, double stepValue, unsigned decPl, double value ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createNumb(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title,minValue,maxValue,stepValue,decPl,value); + rc = ui::createNumb(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title,minValue,maxValue,stepValue,decPl,value); return rc; } -cw::rc_t cw::io::uiCreateProg( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, double minValue, double maxValue ) +cw::rc_t cw::io::uiCreateProg( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, double minValue, double maxValue ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createProg(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title,minValue,maxValue); + rc = ui::createProg(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title,minValue,maxValue); return rc; } -cw::rc_t cw::io::uiCreateProg( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, double minValue, double maxValue, double value ) +cw::rc_t cw::io::uiCreateProg( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, double minValue, double maxValue, double value ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createProg(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title,minValue,maxValue,value); + rc = ui::createProg(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title,minValue,maxValue,value); return rc; } -cw::rc_t cw::io::uiCreateLog( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ) +cw::rc_t cw::io::uiCreateLog( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::createLog(uiH,uuIdRef,wsSessId,parentUuId,eleName,appId,clas,title); + rc = ui::createLog(uiH,uuIdRef,parentUuId,eleName,appId,chanId,clas,title); return rc; } -cw::rc_t cw::io::uiSetNumbRange( handle_t h, unsigned wsSessId, unsigned uuId, double minValue, double maxValue, double stepValue, unsigned decPl, double value ) +cw::rc_t cw::io::uiSetNumbRange( handle_t h, unsigned uuId, double minValue, double maxValue, double stepValue, unsigned decPl, double value ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::setNumbRange(uiH,wsSessId,uuId,minValue,maxValue,stepValue,decPl,value); + rc = ui::setNumbRange(uiH,uuId,minValue,maxValue,stepValue,decPl,value); return rc; } -cw::rc_t cw::io::uiSetProgRange( handle_t h, unsigned wsSessId, unsigned uuId, double minValue, double maxValue, double value ) +cw::rc_t cw::io::uiSetProgRange( handle_t h, unsigned uuId, double minValue, double maxValue, double value ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::setProgRange(uiH,wsSessId,uuId,minValue,maxValue,value); + rc = ui::setProgRange(uiH,uuId,minValue,maxValue,value); return rc; } @@ -2787,57 +2793,57 @@ cw::rc_t cw::io::uiRegisterAppIdMap( handle_t h, const ui::appIdMap_t* map, uns return rc; } -cw::rc_t cw::io::uiSendValue( handle_t h, unsigned wsSessId, unsigned uuId, bool value ) +cw::rc_t cw::io::uiSendValue( handle_t h, unsigned uuId, bool value ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::sendValueBool(uiH, wsSessId, uuId, value ); + rc = ui::sendValueBool(uiH, uuId, value ); return rc; } -cw::rc_t cw::io::uiSendValue( handle_t h, unsigned wsSessId, unsigned uuId, int value ) +cw::rc_t cw::io::uiSendValue( handle_t h, unsigned uuId, int value ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::sendValueInt(uiH, wsSessId, uuId, value ); + rc = ui::sendValueInt(uiH, uuId, value ); return rc; } -cw::rc_t cw::io::uiSendValue( handle_t h, unsigned wsSessId, unsigned uuId, unsigned value ) +cw::rc_t cw::io::uiSendValue( handle_t h, unsigned uuId, unsigned value ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::sendValueUInt(uiH, wsSessId, uuId, value ); + rc = ui::sendValueUInt(uiH, uuId, value ); return rc; } -cw::rc_t cw::io::uiSendValue( handle_t h, unsigned wsSessId, unsigned uuId, float value ) +cw::rc_t cw::io::uiSendValue( handle_t h, unsigned uuId, float value ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::sendValueFloat(uiH, wsSessId, uuId, value ); + rc = ui::sendValueFloat(uiH, uuId, value ); return rc; } -cw::rc_t cw::io::uiSendValue( handle_t h, unsigned wsSessId, unsigned uuId, double value ) +cw::rc_t cw::io::uiSendValue( handle_t h, unsigned uuId, double value ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::sendValueDouble(uiH, wsSessId, uuId, value ); + rc = ui::sendValueDouble(uiH, uuId, value ); return rc; } -cw::rc_t cw::io::uiSendValue( handle_t h, unsigned wsSessId, unsigned uuId, const char* value ) +cw::rc_t cw::io::uiSendValue( handle_t h, unsigned uuId, const char* value ) { rc_t rc; ui::handle_t uiH; if((rc = _handleToUiHandle(h,uiH)) == kOkRC ) - rc = ui::sendValueString(uiH, wsSessId, uuId, value ); + rc = ui::sendValueString(uiH, uuId, value ); return rc; } diff --git a/cwIo.h b/cwIo.h index b36169f..8b38eaf 100644 --- a/cwIo.h +++ b/cwIo.h @@ -112,6 +112,7 @@ namespace cw unsigned parentAppId; unsigned uuId; unsigned appId; + unsigned chanId; const ui::value_t* value; } ui_msg_t; @@ -275,50 +276,51 @@ namespace cw unsigned uiFindElementUuId( handle_t h, const char* eleName ); unsigned uiFindElementUuId( handle_t h, unsigned appId ); - rc_t uiCreateFromObject( handle_t h, const object_t* o, unsigned wsSessId, unsigned parentUuId=kInvalidId, const char* eleName=nullptr); - rc_t uiCreateFromFile( handle_t h, const char* fn, unsigned wsSessId, unsigned parentUuId=kInvalidId); - rc_t uiCreateFromText( handle_t h, const char* text, unsigned wsSessId, unsigned parentUuId=kInvalidId); - rc_t uiCreateDiv( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ); - rc_t uiCreateLabel( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ); - rc_t uiCreateButton( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ); + rc_t uiCreateFromObject( handle_t h, const object_t* o, unsigned parentUuId=kInvalidId, unsigned chanId=kInvalidId, const char* eleName=nullptr); + rc_t uiCreateFromFile( handle_t h, const char* fn, unsigned parentUuId=kInvalidId, unsigned chanId=kInvalidId ); + rc_t uiCreateFromText( handle_t h, const char* text, unsigned parentUuId=kInvalidId, unsigned chanId=kInvalidId ); + + rc_t uiCreateDiv( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ); + rc_t uiCreateLabel( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ); + rc_t uiCreateButton( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ); // Create check: w/o value. The value will be read from the engine via the UI 'echo' event. // Create check: w/ value. The value will be sent to the engine as the new value of the associated varaible. - rc_t uiCreateCheck( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ); - rc_t uiCreateCheck( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, bool value ); + rc_t uiCreateCheck( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ); + rc_t uiCreateCheck( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, bool value ); - rc_t uiCreateSelect( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ); - rc_t uiCreateOption( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ); + rc_t uiCreateSelect( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ); + rc_t uiCreateOption( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ); - rc_t uiCreateStr( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ); - rc_t uiCreateStr( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, const char* value ); + rc_t uiCreateStr( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ); + rc_t uiCreateStr( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, const char* value ); - rc_t uiCreateNumbDisplay(handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, unsigned decPl ); - rc_t uiCreateNumbDisplay(handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, unsigned decPl, double value ); + rc_t uiCreateNumbDisplay(handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, unsigned decPl ); + rc_t uiCreateNumbDisplay(handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, unsigned decPl, double value ); - rc_t uiCreateNumb( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, double minValue, double maxValue, double stepValue, unsigned decPl ); - rc_t uiCreateNumb( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, double minValue, double maxValue, double stepValue, unsigned decPl, double value ); + rc_t uiCreateNumb( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, double minValue, double maxValue, double stepValue, unsigned decPl ); + rc_t uiCreateNumb( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, double minValue, double maxValue, double stepValue, unsigned decPl, double value ); - rc_t uiCreateProg( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, double minValue, double maxValue ); - rc_t uiCreateProg( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title, double minValue, double maxValue, double value ); + rc_t uiCreateProg( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, double minValue, double maxValue ); + rc_t uiCreateProg( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title, double minValue, double maxValue, double value ); - rc_t uiCreateLog( handle_t h, unsigned& uuIdRef, unsigned wsSessId, unsigned parentUuId, const char* eleName, unsigned appId, const char* clas, const char* title ); + rc_t uiCreateLog( handle_t h, unsigned& uuIdRef, unsigned parentUuId, const char* eleName, unsigned appId, unsigned chanId, const char* clas, const char* title ); - rc_t uiSetNumbRange( handle_t h, unsigned wsSessId, unsigned uuId, double minValue, double maxValue, double stepValue, unsigned decPl, double value ); - rc_t uiSetProgRange( handle_t h, unsigned wsSessId, unsigned uuId, double minValue, double maxValue, double value ); + rc_t uiSetNumbRange( handle_t h, unsigned uuId, double minValue, double maxValue, double stepValue, unsigned decPl, double value ); + rc_t uiSetProgRange( handle_t h, unsigned uuId, double minValue, double maxValue, double value ); // Register parent/child/name app id's rc_t uiRegisterAppIdMap( handle_t h, const ui::appIdMap_t* map, unsigned mapN ); // Send a value from the application to the UI. // Set wsSessId to kInvalidId to send to all sessions. - rc_t uiSendValue( handle_t h, unsigned wsSessId, unsigned uuId, bool value ); - rc_t uiSendValue( handle_t h, unsigned wsSessId, unsigned uuId, int value ); - rc_t uiSendValue( handle_t h, unsigned wsSessId, unsigned uuId, unsigned value ); - rc_t uiSendValue( handle_t h, unsigned wsSessId, unsigned uuId, float value ); - rc_t uiSendValue( handle_t h, unsigned wsSessId, unsigned uuId, double value ); - rc_t uiSendValue( handle_t h, unsigned wsSessId, unsigned uuId, const char* value ); + rc_t uiSendValue( handle_t h, unsigned uuId, bool value ); + rc_t uiSendValue( handle_t h, unsigned uuId, int value ); + rc_t uiSendValue( handle_t h, unsigned uuId, unsigned value ); + rc_t uiSendValue( handle_t h, unsigned uuId, float value ); + rc_t uiSendValue( handle_t h, unsigned uuId, double value ); + rc_t uiSendValue( handle_t h, unsigned uuId, const char* value ); diff --git a/cwIoAudioMidi.cpp b/cwIoAudioMidi.cpp index 861b29b..39ab919 100644 --- a/cwIoAudioMidi.cpp +++ b/cwIoAudioMidi.cpp @@ -199,7 +199,7 @@ namespace cw { app->midiMsgArrayInIdx = next_idx; - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kMsgCntId), app->midiMsgArrayInIdx ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kMsgCntId), app->midiMsgArrayInIdx ); } @@ -349,7 +349,7 @@ namespace cw } // update UI msg count - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kMsgCntId), app->midiMsgArrayInIdx ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kMsgCntId), app->midiMsgArrayInIdx ); file::close(fH); @@ -652,7 +652,7 @@ namespace cw } double audioSecs = (double)af_info.frameCnt / af_info.srate; - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kAudioSecsId), audioSecs ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kAudioSecsId), audioSecs ); } @@ -878,7 +878,7 @@ namespace cw app->midiMsgArrayInIdx += 1; // send msg count - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kMsgCntId), app->midiMsgArrayInIdx ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kMsgCntId), app->midiMsgArrayInIdx ); } } } diff --git a/cwIoAudioMidiApp.cpp b/cwIoAudioMidiApp.cpp index abb521a..5b446dd 100644 --- a/cwIoAudioMidiApp.cpp +++ b/cwIoAudioMidiApp.cpp @@ -221,10 +221,10 @@ namespace cw errLabel: mem::release(fn); - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kTotalMidiEvtCntId), midi_record_play::event_count(app->mrpH) ); - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kCurAudioSecsId), audio_record_play::current_loc_seconds(app->arpH) ); - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kTotalAudioSecsId), audio_record_play::duration_seconds(app->arpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kTotalMidiEvtCntId), midi_record_play::event_count(app->mrpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kCurAudioSecsId), audio_record_play::current_loc_seconds(app->arpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kTotalAudioSecsId), audio_record_play::duration_seconds(app->arpH) ); return rc; @@ -245,8 +245,8 @@ namespace cw goto errLabel; } - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kCurAudioSecsId), audio_record_play::current_loc_seconds(app->arpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kCurAudioSecsId), audio_record_play::current_loc_seconds(app->arpH) ); errLabel: return rc; @@ -323,8 +323,8 @@ namespace cw goto errLabel; } - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kCurAudioSecsId), audio_record_play::current_loc_seconds(app->arpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kCurAudioSecsId), audio_record_play::current_loc_seconds(app->arpH) ); errLabel: @@ -454,14 +454,14 @@ namespace cw { midi_record_play::exec( app->mrpH, *m ); if( midi_record_play::is_started(app->mrpH) ) - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); } if( app->arpH.isValid() ) { audio_record_play::exec( app->arpH, *m ); if( audio_record_play::is_started(app->arpH) ) - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kCurAudioSecsId), audio_record_play::current_loc_seconds(app->arpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kCurAudioSecsId), audio_record_play::current_loc_seconds(app->arpH) ); } switch( m->tid ) diff --git a/cwIoAudioPanel.cpp b/cwIoAudioPanel.cpp index 446710a..5c94638 100644 --- a/cwIoAudioPanel.cpp +++ b/cwIoAudioPanel.cpp @@ -127,6 +127,7 @@ namespace cw { unsigned parentUuId = ui::kRootAppId; unsigned divUuId = kInvalidId; unsigned titleUuId = kInvalidId; + unsigned chanId = kInvalidId; const char* title = inputFl ? "Input" : "Output"; const char* divEleName = inputFl ? "inMeterId" : "outMeterId"; unsigned divAppId = inputFl ? kInMeterDivId : kOutMeterDivId; @@ -137,14 +138,14 @@ namespace cw { unsigned colUuId; unsigned uuid; - uiCreateLabel(p->ioH, titleUuId, wsSessId, parentUuId, nullptr, kInvalidId, nullptr, title ); - uiCreateDiv( p->ioH, divUuId, wsSessId, parentUuId, divEleName, d->baseAppId + divAppId, "uiRow", nullptr ); + uiCreateLabel(p->ioH, titleUuId, parentUuId, nullptr, kInvalidId, chanId, nullptr, title ); + uiCreateDiv( p->ioH, divUuId, parentUuId, divEleName, d->baseAppId + divAppId, chanId, "uiRow", nullptr ); - uiCreateDiv( p->ioH, colUuId, wsSessId, divUuId, nullptr, kInvalidId, "uiCol", nullptr ); - uiCreateLabel(p->ioH, uuid, wsSessId, colUuId, nullptr, kInvalidId, nullptr, "Tone" ); - uiCreateLabel(p->ioH, uuid, wsSessId, colUuId, nullptr, kInvalidId, nullptr, "Mute" ); - uiCreateLabel(p->ioH, uuid, wsSessId, colUuId, nullptr, kInvalidId, nullptr, "Gain" ); - uiCreateLabel(p->ioH, uuid, wsSessId, colUuId, nullptr, kInvalidId, nullptr, "Meter" ); + uiCreateDiv( p->ioH, colUuId, divUuId, nullptr, kInvalidId, chanId, "uiCol", nullptr ); + uiCreateLabel(p->ioH, uuid, colUuId, nullptr, kInvalidId, chanId, nullptr, "Tone" ); + uiCreateLabel(p->ioH, uuid, colUuId, nullptr, kInvalidId, chanId, nullptr, "Mute" ); + uiCreateLabel(p->ioH, uuid, colUuId, nullptr, kInvalidId, chanId, nullptr, "Gain" ); + uiCreateLabel(p->ioH, uuid, colUuId, nullptr, kInvalidId, chanId, nullptr, "Meter" ); for(unsigned i=0; iioH, colUuId, wsSessId, divUuId, nullptr, kInvalidId, "uiCol", chLabel ); - uiCreateCheck(p->ioH, uuid, wsSessId, colUuId, nullptr, d->baseAppId + baseToneId + i, "checkClass", nullptr, false ); - uiCreateCheck(p->ioH, uuid, wsSessId, colUuId, nullptr, d->baseAppId + baseMuteId + i, "checkClass", nullptr, false ); - uiCreateNumb( p->ioH, uuid, wsSessId, colUuId, nullptr, d->baseAppId + baseGainId + i, "floatClass", nullptr, 0.0, 3.0, 0.001, 3, 0 ); - uiCreateNumb( p->ioH, uuid, wsSessId, colUuId, nullptr, d->baseAppId + baseMeterId + i, "floatClass", nullptr, -100.0, 100, 1, 2, 0 ); + uiCreateDiv( p->ioH, colUuId, divUuId, nullptr, kInvalidId, kInvalidId, "uiCol", chLabel ); + uiCreateCheck(p->ioH, uuid, colUuId, nullptr, d->baseAppId + baseToneId + i, i, "checkClass", nullptr, false ); + uiCreateCheck(p->ioH, uuid, colUuId, nullptr, d->baseAppId + baseMuteId + i, i, "checkClass", nullptr, false ); + uiCreateNumb( p->ioH, uuid, colUuId, nullptr, d->baseAppId + baseGainId + i, i, "floatClass", nullptr, 0.0, 3.0, 0.001, 3, 0 ); + uiCreateNumb( p->ioH, uuid, colUuId, nullptr, d->baseAppId + baseMeterId + i, i, "floatClass", nullptr, -100.0, 100, 1, 2, 0 ); } return rc; @@ -170,8 +171,8 @@ namespace cw { for(; d!=nullptr; d=d->link) { - _create_meters( p, d, m.wsSessId, d->iChCnt, true ); - _create_meters( p, d, m.wsSessId, d->oChCnt, false ); + _create_meters( p, d, kInvalidId, d->iChCnt, true ); + _create_meters( p, d, kInvalidId, d->oChCnt, false ); } return rc; @@ -250,7 +251,7 @@ namespace cw { for(unsigned i=0; ibaseAppId + meterAppId + i; - uiSendValue( p->ioH, kInvalidId, uiFindElementUuId(p->ioH,appId), agd.meterA[i] ); + uiSendValue( p->ioH, uiFindElementUuId(p->ioH,appId), agd.meterA[i] ); } return kOkRC; diff --git a/cwIoPresetSelApp.cpp b/cwIoPresetSelApp.cpp index 8abbe32..626c45e 100644 --- a/cwIoPresetSelApp.cpp +++ b/cwIoPresetSelApp.cpp @@ -106,19 +106,17 @@ namespace cw } app_t; - rc_t _parseCfg(app_t* app, const object_t* cfg ) + rc_t _parseCfg(app_t* app, const object_t* cfg, const object_t*& params_cfgRef ) { rc_t rc = kOkRC; - const object_t* params = nullptr; - - if((rc = cfg->getv( "params", params)) != kOkRC ) + if((rc = cfg->getv( "params", params_cfgRef)) != kOkRC ) { rc = cwLogError(kSyntaxErrorRC,"Preset Select App 'params' cfg record not found."); goto errLabel; } - if((rc = params->getv( "record_dir", app->record_dir, + if((rc = params_cfgRef->getv( "record_dir", app->record_dir, "record_folder", app->record_folder, "record_fn_ext", app->record_fn_ext, "score_fn", app->scoreFn )) != kOkRC ) @@ -288,8 +286,8 @@ namespace cw errLabel: - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kTotalMidiEvtCntId), midi_record_play::event_count(app->mrpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kTotalMidiEvtCntId), midi_record_play::event_count(app->mrpH) ); return rc; } @@ -310,7 +308,7 @@ namespace cw // goto errLabel; //} - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); //io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kCurAudioSecsId), audio_record_play::current_loc_seconds(app->arpH) ); errLabel: @@ -364,7 +362,7 @@ namespace cw else { start( app->mrpH, false ); - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); } break; @@ -493,7 +491,7 @@ namespace cw { midi_record_play::exec( app->mrpH, *m ); if( midi_record_play::is_started(app->mrpH) ) - io::uiSendValue( app->ioH, kInvalidId, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); + io::uiSendValue( app->ioH, uiFindElementUuId(app->ioH,kCurMidiEvtCntId), midi_record_play::event_index(app->mrpH) ); } /* @@ -549,9 +547,10 @@ cw::rc_t cw::preset_sel_app::main( const object_t* cfg ) { rc_t rc; app_t app = {}; - + const object_t* params_cfg = nullptr; + // Parse the configuration - if((rc = _parseCfg(&app,cfg)) != kOkRC ) + if((rc = _parseCfg(&app,cfg,params_cfg)) != kOkRC ) goto errLabel; // create the io framework instance @@ -562,7 +561,7 @@ cw::rc_t cw::preset_sel_app::main( const object_t* cfg ) } // create the MIDI record-play object - if((rc = midi_record_play::create(app.mrpH,app.ioH,*cfg,_midi_play_callback,&app)) != kOkRC ) + if((rc = midi_record_play::create(app.mrpH,app.ioH,*params_cfg,_midi_play_callback,&app)) != kOkRC ) { rc = cwLogError(rc,"MIDI record-play object create failed."); goto errLabel; diff --git a/cwIoSocketChat.cpp b/cwIoSocketChat.cpp index f5f8686..6343804 100644 --- a/cwIoSocketChat.cpp +++ b/cwIoSocketChat.cpp @@ -62,6 +62,7 @@ namespace cw { { rc_t rc = kOkRC; unsigned parentUuId = ui::kRootAppId; + unsigned chanId = kInvalidId; unsigned divUuId; unsigned uuid; @@ -69,12 +70,12 @@ namespace cw { char s[sn+1]; snprintf(s,sn,"Chat: %i", io::socketPort(p->ioH, p->sockIdx )); - uiCreateDiv( p->ioH, divUuId, m.wsSessId, parentUuId, nullptr, p->baseAppId + kUiDivAppId, "uiCol", s ); - uiCreateStr( p->ioH, uuid, m.wsSessId, divUuId, nullptr, p->baseAppId + kUiSendTextAppId, "uiText", "Send" ); - uiCreateStr( p->ioH, uuid, m.wsSessId, divUuId, nullptr, p->baseAppId + kUiRemoteAddrAppId, "uiText", "Addr", "127.0.0.1" ); - uiCreateNumb( p->ioH, uuid, m.wsSessId, divUuId, nullptr, p->baseAppId + kUiRemotePortAppId, "uiNumb", "Port", 0, 0xffff, 1, 0, 0 ); - uiCreateButton(p->ioH, uuid, m.wsSessId, divUuId, nullptr, p->baseAppId + kUiSendBtnAppId, "uiBtn", "Send" ); - uiCreateStr( p->ioH, p->recvTextUuId, m.wsSessId, divUuId, nullptr, p->baseAppId + kUiRecvTextAppId, "uiText", "Recv" ); + uiCreateDiv( p->ioH, divUuId, parentUuId, nullptr, p->baseAppId + kUiDivAppId, chanId, "uiCol", s ); + uiCreateStr( p->ioH, uuid, divUuId, nullptr, p->baseAppId + kUiSendTextAppId, chanId, "uiText", "Send" ); + uiCreateStr( p->ioH, uuid, divUuId, nullptr, p->baseAppId + kUiRemoteAddrAppId, chanId, "uiText", "Addr", "127.0.0.1" ); + uiCreateNumb( p->ioH, uuid, divUuId, nullptr, p->baseAppId + kUiRemotePortAppId, chanId, "uiNumb", "Port", 0, 0xffff, 1, 0, 0 ); + uiCreateButton(p->ioH, uuid, divUuId, nullptr, p->baseAppId + kUiSendBtnAppId, chanId, "uiBtn", "Send" ); + uiCreateStr( p->ioH, p->recvTextUuId, divUuId, nullptr, p->baseAppId + kUiRecvTextAppId, chanId, "uiText", "Recv" ); return rc; } @@ -145,21 +146,21 @@ namespace cw { { case kUiSendTextAppId: if( p->sendText ) - io::uiSendValue( p->ioH, m.wsSessId, m.uuId, p->sendText ); + io::uiSendValue( p->ioH, m.uuId, p->sendText ); break; case kUiRemoteAddrAppId: if( p->remoteAddr) - io::uiSendValue( p->ioH, m.wsSessId, m.uuId, p->remoteAddr ); + io::uiSendValue( p->ioH, m.uuId, p->remoteAddr ); break; case kUiRecvTextAppId: if( p->recvText ) - io::uiSendValue( p->ioH, m.wsSessId, m.uuId, p->recvText ); + io::uiSendValue( p->ioH, m.uuId, p->recvText ); break; case kUiRemotePortAppId: - io::uiSendValue( p->ioH, m.wsSessId, m.uuId, p->remotePort ); + io::uiSendValue( p->ioH, m.uuId, p->remotePort ); break; default: @@ -218,7 +219,7 @@ namespace cw { if( m.byteA && p->sockIdx == m.sockIdx ) { p->recvText = mem::duplStr((const char*)m.byteA); - io::uiSendValue(p->ioH, kInvalidId, p->recvTextUuId, (const char*)m.byteA ); + io::uiSendValue(p->ioH, p->recvTextUuId, (const char*)m.byteA ); } break;