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 » assection failed error while opening /dev/rtp0 on ubuntu
assection failed error while opening /dev/rtp0 on ubuntu [message #34304] Thu, 10 November 2011 13:12 Go to next message
Shwetha is currently offline  Shwetha
Messages: 39
Registered: August 2011
Member
Hiii,

I am using xenomai as rtos on ubuntu
we have written a small application for pipe communication

Test.h
class Test : public WithTestLayout<TopWindow> {
public:
typedef Test CLASSNAME;
		Test();
	FileStream RTtoUI;
	struct RT2UI
		{
			uint  Status;
			
		};

		RT2UI rt2ui;
		RT2UI ReadArray[3];
		void readpipe();
	
};



main.cpp


void Test::readpipe()
{String str;
RTtoUI.Open("/dev/rtp0" ,0);
	{
	str << "opened" << "\n";
	lineedit.Paste ( str.ToWString() );
	}
	else
	{
	str << "cannot open" << "\n";
	lineedit.Paste ( str.ToWString() );
	}
RTtoUI.Read(0, &ReadArray, sizeof ( ReadArray ) );
	str <<  ReadArray[0].Status << "\n";
	lineedit.Paste ( str.ToWString() );
}



while running this on ubuntu through U++ am getting following error
assertion failed in /root/upp/core/BlockStream.cpp
(IsOpen() && (style & STRM_READ));


The same code was working fine in fedora OS

Actually in ubuntu /dev/rtp0 is not opening through upp.





[Updated on: Thu, 10 November 2011 13:16]

Report message to a moderator

Re: assection failed error while opening /dev/rtp0 on ubuntu [message #34306 is a reply to message #34304] Thu, 10 November 2011 19:38 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
FileStream only works with regular files.

Shwetha wrote on Thu, 10 November 2011 07:12

Hiii,

I am using xenomai as rtos on ubuntu
we have written a small application for pipe communication

Test.h
class Test : public WithTestLayout<TopWindow> {
public:
typedef Test CLASSNAME;
		Test();
	FileStream RTtoUI;
	struct RT2UI
		{
			uint  Status;
			
		};

		RT2UI rt2ui;
		RT2UI ReadArray[3];
		void readpipe();
	
};



main.cpp


void Test::readpipe()
{String str;
RTtoUI.Open("/dev/rtp0" ,0);
	{
	str << "opened" << "\n";
	lineedit.Paste ( str.ToWString() );
	}
	else
	{
	str << "cannot open" << "\n";
	lineedit.Paste ( str.ToWString() );
	}
RTtoUI.Read(0, &ReadArray, sizeof ( ReadArray ) );
	str <<  ReadArray[0].Status << "\n";
	lineedit.Paste ( str.ToWString() );
}



while running this on ubuntu through U++ am getting following error
assertion failed in /root/upp/core/BlockStream.cpp
(IsOpen() && (style & STRM_READ));


The same code was working fine in fedora OS

Actually in ubuntu /dev/rtp0 is not opening through upp.







Previous Topic: Bug in XmlParser
Next Topic: Extend StaticText with method possible?
Goto Forum:
  


Current Time: Sat Apr 27 05:35:46 CEST 2024

Total time taken to generate the page: 0.03412 seconds