[openrtm-users 00177] Re: Return type for two components. OmniORB.

janarbek canarbekmatay @ yahoo.com
2007年 8月 6日 (月) 10:55:02 JST


Hello, Thank you very much. 

Ando Noriaki <n-ando @ aist.go.jp> wrote:    Hello

> I have a WAVE Component that plays *.Wav file and another component caller
> component that uses WAVE component via service port.
>
> Interface is looks like below.
>
> Interface WavePlayer{
>
> void playWaveFile(string filename);
> }
>
>
> When I start my Caller Comp and WaveComp in 2 different terminals,
> playWaveFile plays in the the terminal where Wave Comp started.
>
> I want payWaveFile to be played in CallerComp's terminal.

You mean you want get .wav file in CallerComp's node?
    If I have a sting show(); function in ProviderComp, then I can get the Return value from ConsumerComp. 
   
  Now, I have a void playWaveFile(string filename); function in my ProviderComp which playes Wav file. But, since playWaveFile function returns no value, I can not see the playing sounc in my Consumer Components terminal.So, I think I need to retunr some value, but I don't knwo which value I need to retun? 
   
   
  I am trying to play Wav in Proivder Comp and get the sound in Consumer comp without sending the Wav file to consumer,........Is it possibel????
   
   
   
  

> In order to do so, I think I need to return a value for playWaveFile. But
> omniORB doesn't have such feature.
>
> Is there any other way, I can do it??????????????????????

If you want to send ".wav" file to player component from caller
component, you can give ".wav" file data as an argument like this.

typedef sequence FileData;
interface WavePlayer
{
void playWaveFile(in FileData data);
};


and call this operations in caller component like this,

FileData data;
data.length( set_length_of_the_wav_file );

for (int i(0); i < length_of_the_wav_file; ++i)
{
data[i] = // copy wav file data
// you can also use memcpy() to copy data, because
// CORBA sequence data area is continuously allocated.
}

wavplayer->playWaveFile(data);


-- 
°ÂÆ£·Ä¾¼¡÷ÆÈΩ¹ÔÀ¯Ë¡¿Í»º¶Èµ»½ÑÁí¹ç¸¦µæ½ê ¸¦µæ°÷
ÃÎǽ¥·¥¹¥Æ?¸¦µæÉôÌç ?¥¹?¥¤¥ó¥Æ¥ê¥¸¥§¥ó¥¹¸¦µæ¥°¥ë¡¼¥×
¢©305-8568 °ñ¾ë¸©¤Ä¤¯¤Ð»ÔÇß±à1-1-1 Ãæ±ûÂè2
TEL: 029-861-5981 FAX: 029-861-5971
n-ando @ aist.go.jp, n-ando @ ieee.org




 
  ==================================================================================================================================================================
  Janarbek, Researcher. 
Software Robot Research Team, ETRI(Electronics and Telecommunications Research Institute)
161 Kajong-Dong, Yusong-Gu, TAEJON, 305-350, KOREA
Email : janarbek @ etri.re.kr
Phone : 82-42-860-1838
Fax : 82-42-860-6790
  Cell Phone: 82-10-8692-8103
  ===================================================================================================================================================================

       
---------------------------------
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
-------------- next part --------------
HTML$B$NE:IU%U%!%$%k$rJ]4I$7$^$7$?(B...
URL: <http://www.openrtm.org/pipermail/openrtm-users/attachments/20070805/d16ff660/attachment-0001.html>


openrtm-users メーリングリストの案内