.Net app with real time processing!

B

bredal Jensen

I have an MFC app. that i want to port to VS.Net.
The application acces some hardware via "Callbacks" to do real time data
processing.

Does .Net support interrupts? Or do i need to stick to VC++.


I know one can define unmanaged areas in .Net code . Is that the
way to control my peace of hardware via C#.


My application is doing real time processing. Is there any way DOTNET will
ever
support this kind of scenarios?


Thank you in advance
 
N

Niki Estner

Neither MFC nor .NET do support interrupts or real-time-processing.

What platform do you run on? Realtime NT/W2K/XP? Otherwise, even a device
driver cannot guarantee realtime processing.

The question is: what do you want to do?
If you're programming a device driver, stick to VC++.
If you're writing a user-mode program forget about interrupts, realtime, and
"direct hardware access", and use the programming environment of your
choice.

Niki
 
B

bredal Jensen

Well,

I'm working on an video encoder. The encoding is performed on a dedicated
hardware that can be controled via a set of DLLs provided by the manufactor
of the hardware.
I guest this could be called "user mode driver".
The movie is provided by a Camera.

The PC client uses MFC, with a set of "Callbacks" that get fired when the
card needs to do processing.

Does it make any sens?
 
N

Niki Estner

bredal Jensen said:
Well,

I'm working on an video encoder. The encoding is performed on a dedicated
hardware that can be controled via a set of DLLs provided by the manufactor
of the hardware.

You should be able to P/Invoke these DLLs.
I guest this could be called "user mode driver".
The movie is provided by a Camera.

The PC client uses MFC, with a set of "Callbacks" that get fired when the
card needs to do processing.

Sounds a lot like function pointers? Use delegates in managed code. Have a
look at:
http://msdn.microsoft.com/library/d...us/csref/html/vcwlkplatforminvoketutorial.asp
Does it make any sens?

Sure. The realtime processing is done in hardware, and the
non-realtime-parts can be done on a PC. Both plain C++ and .NET can be used
to write non-realtime software;
I think you should be able to build your application using .NET.

Niki
 
B

bredal Jensen

Yes, but one of the tax of the client is to display the recorded film on the
PC screen.
The Bit rate is quite high. True that the hardware acquires and compresses
the data from
the camera but the PC Client still need to show all these frames.

the P/Invoke feature is quite intersting but will i run into performance
problem, du to .Net
runtime?
 
N

Niki Estner

bredal Jensen said:
Yes, but one of the tax of the client is to display the recorded film on the
PC screen.
The Bit rate is quite high. True that the hardware acquires and compresses
the data from
the camera but the PC Client still need to show all these frames.

the P/Invoke feature is quite intersting but will i run into performance
problem, du to .Net
runtime?

You can't definitely say without any tests. Generally I've found .NET
performance comparable to VC++ performance. In some tests, .NET code even
outperforms plain old C++. However P/Invoke *does* cost performance, as
parameters have to be converted to and from.
It depends on the interface of those DLLs, but maybe accessing them using
managed C++ could be faster.

Another problem you might encounter is that .NET only provides native
support for GDI+, which is a lot slower than plain old GDI. You should be
prepared to P/Invoke a few GDI oerations for image display.

So, I can't really answer your question, but I think your chances aren't
bad, and it's definitely worth the try.

Good luck,

Niki
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top