Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » read/write to pipe /dev/rtp..?
read/write to pipe /dev/rtp..? [message #33750] Sat, 10 September 2011 15:06 Go to next message
Monty.mvh is currently offline  Monty.mvh
Messages: 31
Registered: July 2011
Location: Bangalore
Member
Hi,
I am trying write and read commands to pipe /dev/rtp0 and rtp1..
can anyone provide an example for this...
I tried with FileOut method but did'nt get the thing..
FileOut file1;
file1.Open ( "/dev/rtp1 " );
file1.Put(&wr1,sizeof(wr1));


where wr1 is

 struct write {
       int command;
       int data;
   };
write wr1;


Also is " file1.Put(&wr1,sizeof(wr1)); " is the right method to write data to any file other than /dev..????
Re: read/write to pipe /dev/rtp..? [message #33752 is a reply to message #33750] Sat, 10 September 2011 15:07 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
Monty.mvh wrote on Sat, 10 September 2011 09:06

Hi,
I am trying write and read commands to pipe /dev/rtp0 and rtp1..
can anyone provide an example for this...
I tried with FileOut method but did'nt get the thing..
FileOut file1;
file1.Open ( "/dev/rtp1 " );
file1.Put(&wr1,sizeof(wr1));


where wr1 is

 struct write {
       int command;
       int data;
   };
write wr1;


Also is " file1.Put(&wr1,sizeof(wr1)); " is the right method to write data to any file other than /dev..????


pipe does not have support in U++. You have to use C API.


Mirek
Re: read/write to pipe /dev/rtp..? [message #33762 is a reply to message #33750] Sun, 11 September 2011 05:55 Go to previous message
Monty.mvh is currently offline  Monty.mvh
Messages: 31
Registered: July 2011
Location: Bangalore
Member
Thanks Mirek.
Is there any example so that i can know the method of using C API in upp..

Also if i want to write a data declared in structure into a file does this method holds good?

file1.Put(&wr1,sizeof(wr1));
Previous Topic: isnan [BUG?] fix for Core OSX11
Next Topic: Why this one leaks ?
Goto Forum:
  


Current Time: Sat Apr 27 21:42:57 CEST 2024

Total time taken to generate the page: 0.04244 seconds