Hi folks,

i've an architectural question regarding the software design of emc.

the history:
We 've written a CANOpen multimaster protocol stack for a commercial RTOS
which we used in several products.
We  started porting the protocol machine to RTAI/EMC because we see
fading the glance of the RTOS for future projects.
We first ported a older version of our software, that is not able to be 
configured by XML-EDS.
We now control four servo axis over one CANOpen bus and peripheral I/O 
over a second bus.
The software is implemented as a driver running in realtime.

So far so good, the software operates reliable (2ms servo speed loop)
and even the IDE is quite nice, using eclipse.

Our most recent version of the CANOpen protocol is able to read bus 
configuration
from XML files (two  for each bus, up to ten busses are supported), what 
makes it much
easier to configure other CANOpen slaves.
In the commercial RTOS we use expat libray to parse trough the XML files,
so we like to do this in RTAI the same way using the shared expat library.

my question:
Because shared expat library and file operations have to run in user mode,
we have to pass the parsed data to the protocol machine running in 
kernel mode.

I 'ld like to use two blocking queues, one upstream, one downstream,
connection user and realtime tasks realizing a message based 
client/server relationship.
This architecture would allow us to reread the XML files while CANOpen 
Stack is running.
(it's not a must, but would be nice for future development)

So I was looking for a queue, that
- can be called from user and realtime context
- blocks in user and realtime context, when no message is in the queue
- is message based, instead of character based.

Even solving this requirements with shared memory and semaphores
is not possible, when I understand the informations in rtapi.h correctly.

Because message communication is very common in RTOS,
I was wondering if there is no way to use RTAI library functions in EMC 
to do this.
The only example I found that implements a compareable function is
the "streamer" example, where stdin is used as upstream and a handmade
fifo (using shared memory) as downstream.
I didn't find an example in emc using rtai message queue functions 
(rtai_mq.h).

Is there a reason to avoid using rtai message queues in EMC to communicate
between user and realtime tasks ?

Any hint is welcome and thanx in advance

R.Stelzer

=====================================================


                    Ingenieurbüro Stelzer

           Inhaber:  Dipl.-Ing. (RWTH) Rainer Stelzer
           Adresse:  Römerstrasse 37a
                     47638 Straelen

             Mobil:  (++49) 0173-5391086
           Telefon:  (++49) 02834-425058
               Fax:  (++49) 02834-425059
            mailto:  r.stel...@ibstelzer.de

               www:  http://www.ibstelzer.de

Umsatzsteuer-
Identifikationsnr:  DE249033623


=====================================================



------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to