AIO support for rtems; telnet and console IO

CWolfe at motioncontrol.org CWolfe at motioncontrol.org
Tue Jan 15 17:07:33 UTC 2008


I'm writing an rtems application which needs to communicate via telnet and I have 
    some questions. my original plan was to intercept all console io on the serial ports and pass 
    to/from the socket. I tried to use send() and recv() with MSG_DONTWAIT enabled, but this 
    generates an error message stating no processes available. my next attempt tried to use 
    aio_read and aio_write, but --after much hairpulling-- i read the documentation to discover 
    that this feature is not currently supported. My questions are these:
    	1.) is there a better approach which emulates an interrupt-driven console io scheme
    	     (prehaps using posix signals, callbacks and socket io)
    	2.) aio seems to be a handy library to have, so I might be interested in writing the 	
    	     code. has anyone done this yet? if not, where would i find enough information to 
    	     complete the existing  code? (i.e. posix specs etc.)
    	3.) is there define(perhaps one i should have made) which would prevent the no 
    	     processes available error message?
    	4.) it seems that some of the bsd code is a bit sliced using the __BSD_VISIBLE 	
    	     #define. what exactly is the purpose of this define, and is it advisable to 
                     undef/redefine to enable the macros which allow non-blocking socket io?
    	5.) if all else fails, I could rewrite our code to use a tty terminal in lieu of intercepting 
    	     the serial IO, but i am not sure how to read and write to a tty terminal. is there a 
    	     good example available which demonstrates it's usage in an rtems app?
    Regards,
    Christopher Wolfe
    Motion Control Systems, Inc.
    # using rtems4.7.1/mcf5235




More information about the users mailing list