[Ace-users] [ace-users] problems linking streams

Wasilios Goutas wasili at goutas.de
Fri Oct 19 13:36:57 CDT 2007


Hi Johnny,

thats interrinsting.
Thanks
Wasili

Johnny Willemsen schrieb:
> Hi,
>
> Thanks for using the PRF form. Check the link in detail, the reader module
> is connected to the writer module of the second stream.
>
> Regards,
>
> Johnny Willemsen
> Remedy IT
> Postbus 101
> 2650 AC  Berkel en Rodenrijs
> The Netherlands
> www.theaceorb.nl / www.remedy.nl  
>
> *** Integrated compile and test statistics see
> http://scoreboard.theaceorb.nl ***
> *** Commercial service and support for ACE/TAO/CIAO             ***
> *** See http://www.theaceorb.nl/en/support.html                 ***
>
> "Wasilios Goutas" <wasili at goutas.de> wrote in message
> news:<mailman.2569.1192650915.5286.ace-users at mail.cse.wustl.edu>...
>   
>>     ACE VERSION: 5.6
>>
>>     HOST MACHINE and OPERATING SYSTEM:
>>         Windows XP
>>
>>     COMPILER NAME AND VERSION (AND PATCHLEVEL):
>>        VC 8
>>
>>     THE $ACE_ROOT/ace/config.h FILE
>>         #include "ace/config-win32.h"
>>
>>     AREA/CLASS/EXAMPLE AFFECTED:
>>        ACE_Stream::link()
>>
>>      SYNOPSIS:
>>        messages passed into a linked stream does not get processed by 
>> its modules      
>>
>>     DESCRIPTION:
>>        I wrote a module containing a file reading and a file writing 
>> task and another wich acts as echo module by passing the messages back 
>> to its sibling down the stream.
>>        This works as long as these two modules are part of the same 
>> ACE_Stream instance, but when I split this modules to two streams and 
>> link them together, the messages of the first are not passed to the 
>> second module.
>>
>>
>>
>> int ACE_TMAIN ( int argc, ACE_TCHAR *argv[] )
>> {
>>   ACE_TRACE( ACE_TEXT("ACE_TMAIN\n") );
>>
>>   ACE_Stream<ACE_MT_SYNCH> *fileIOStream = new ACE_Stream<ACE_MT_SYNCH>();
>>   IO_Posix_InOut_Module    *inout_module = new 
>> IO_Posix_InOut_Module(argv[0],
>>     
>>
>>     
> "--io_posix_out_task_file=D:/Projects/privat/WeatherBox/libs/io/posix/stream
> s/tests/io/io_posix_stream_test.out 
>   
>> "
>>     
>>
>>     
> "--io_posix_in_task_file=D:/Projects/privat/WeatherBox/libs/io/posix/tasks/t
> ests/in/io.posix.in.task.test.txt");
>   
>>   ModuleBridge_Module      *module_bridge = new ModuleBridge_Module();
>>
>>   ACE_Stream<ACE_MT_SYNCH> *echoStream   = new ACE_Stream<ACE_MT_SYNCH>();
>>   echoStream->push(module_bridge);
>>   fileIOStream->link(*echoStream);
>>   fileIOStream->push(inout_module);
>>
>> /*
>>   fileIOStream->push(module_bridge);
>>   fileIOStream->push(inout_module);
>> */
>>  
>>   fileIOStream->wait();
>>   return 0;
>> }
>>
>>
>>     REPEAT BY:
>>
>> I debuged the application and find out, that some default modules 
>> containing ACE_Stream_Head and ACE_Stream_Tail tasks are created and 
>> pushed into the streams and
>> my message is processed by the ACE_Stream_Tail instance.
>> I tryied to replace the tail module with my one, but this seems not to 
>> work, because my messages are still processed by an ACE_Stream_Tail 
>> instance.
>>
>> int ACE_TMAIN ( int argc, ACE_TCHAR *argv[] )
>> {
>>   ACE_TRACE( ACE_TEXT("ACE_TMAIN\n") );
>>
>>   ACE_Stream<ACE_MT_SYNCH> *fileIOStream = new ACE_Stream<ACE_MT_SYNCH>();
>>   IO_Posix_InOut_Module    *inout_module = new 
>> IO_Posix_InOut_Module(argv[0],
>>     
>>
>>     
> "--io_posix_out_task_file=D:/Projects/privat/WeatherBox/libs/io/posix/stream
> s/tests/io/io_posix_stream_test.out 
>   
>> "
>>     
>>
>>     
> "--io_posix_in_task_file=D:/Projects/privat/WeatherBox/libs/io/posix/tasks/t
> ests/in/io.posix.in.task.test.txt");
>   
>>   ModuleBridge_Module      *module_bridge = new ModuleBridge_Module();
>>
>>   ACE_Stream<ACE_MT_SYNCH> *echoStream   = new ACE_Stream<ACE_MT_SYNCH>();
>>  
>>   echoStream->replace(echoStream->tail()->name(), module_bridge);
>>   fileIOStream->link(*echoStream);
>>   fileIOStream->push(inout_module);
>>
>> /*
>>   fileIOStream->push(module_bridge);
>>   fileIOStream->push(inout_module);
>> */
>>  
>>   fileIOStream->wait();
>>   return 0;
>> }
>>
>>
>>
>> Is it possible to get messages passed across linked streams?
>>
>> bye
>> Wasili
>>
>>
>>
>>
>>
>>
>>
>>     
>
>   



More information about the Ace-users mailing list