LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-29-2008, 02:15 AM   #1
navderm
Member
 
Registered: Dec 2008
Location: Chandigarh, India
Distribution: Red Hat 9
Posts: 67

Rep: Reputation: 15
A Help with FIFO


Hello everyone:

I need some help with FIFO in RTLinux environment.

I have a GUI which is in the normal Linux mode operating as an executable.
I want to make is possible that the RTLinux module file *.o starts working after one of the command button (Say 'Start') is pressed. Is it possible to attach such a function to the command button itself or do i have to do this with the help of a flag (Like the flag is 0 initiallly and and then when the flag is 1 the whole thing inside the thread ( only 1 thread used for now) starts working).

Another thing is that i have to transfer a lot of data from the GUI (as in the user inputs in terms of omega and amplitude of the sine function etc). I want to do this with FIFO. I have created two fifos for bi-directional communication.
Is is possible to send all the data one by one from the linux environment and collect it from the RTLinux end without any loss of data.
Its like can i input 20 data one by one in like either as a structure or as different data in 20 different code lines and the thread that is collecting it at some frequency is able to collect it without any loss of any of the data that i had sent from the Linux side. \

I know when data is sent one by one from the RTLinux side at some frequency, it can easily be collected in the linux side and vice versa. wat about multiple data???

Please clarify these concepts I am not being able to move without them sorted out.

Thx a lot.
 
Old 12-29-2008, 04:07 PM   #2
bastl
Member
 
Registered: Sep 2003
Location: Germany/BW
Distribution: My own
Posts: 237

Rep: Reputation: 22
Hello.

In FIFO mode(RT) only one task can be executed so signals and multitasking isn't possible and so no GUI will work.
So the schedular should be in other mode for GUIs
A nother thing is that for great data transfers only FILOs should be used called streams or char devices. You can also use the c++ headers for streaming.

With a RTLinux system you have now realy big problems.
I think also, that you have to extend the Start app, say your GUI with your special needs and compile it new.

An other possibility is to take say knoppix and start the RT-app out of your app that switches the linux shedular to FIFO, means to an RT system and executes that RT-app. So I do. Simple write that Start app new by your own and with your needs. You have then to take care of all IRQs you need. Have a look on my project PCNC http://freenet-homepage.de/PCNC/

There is no datatransfer between RT app and GUI app possible at all.
You have to programm an interface, say a file that you fill with data and close it when you have all written in it in GUI mode then start your RT app that can then open that file and read all that's in it.
That`s the maximum you can do.

If you sent data like you discribed it then you don't have a real RT system any more, then you can use a common linux distribution.

You say at a known frequency - hm - well, or with spezial hardware like ethernet or over serial port. Then your RT-app have to take care of that hardware, means of that IRQ and the corresponding controller. - Is possible. Then you need one Linux computer for your GUI and one RTL computer.
- Good, that will work.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about FIFO Sathya Programming 3 07-05-2008 05:11 PM
Regarding behaviour of FIFO Sathya Programming 2 05-23-2008 10:32 AM
Linux 2.6 FIFO vs Linux 2.4 FIFO gjpc Programming 4 03-19-2008 07:26 PM
fifo help !! matlin Linux - Newbie 1 02-21-2008 01:51 PM
snmptrapd FIFO eccsamba Linux - Networking 2 11-24-2004 08:52 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration