473,385 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Which inter-process communications technique is best?

Hello All,

This is my first post so apologies if this is the wrong newsgroup.

I'm designing software for a platform that will sit on a CAN bus. There
will be three separate programs running on the platform, A, B and C.
Program A will handle the CAN communications. It will pass messages
received from the CAN network to programs B and C and transmit their
messages out on the CAN network.

What is the best (fastest) method for transferring messages between the CAN
communications process and the other two processes?

Currently I'm leaning towards named pipes but would like to pass the CAN
messages as structures and not simply as "streams" of data.

Got any suggestions?

Thanks

Paul
Nov 17 '05 #1
4 1185
Hi Paul!
I'm designing software for a platform that will sit on a CAN bus. There
will be three separate programs running on the platform, A, B and C.
Program A will handle the CAN communications. It will pass messages
received from the CAN network to programs B and C and transmit their
messages out on the CAN network.

What is the best (fastest) method for transferring messages between the CAN
communications process and the other two processes?
I would suggest to use OPC...
It is a standard-interface (other apps also can connect to your
device)... you can simply use a OPC_Toolkit (for example
http://www.softing.com/en/communicat.../cplusplus.htm)

Currently I'm leaning towards named pipes but would like to pass the CAN
messages as structures and not simply as "streams" of data.


If you want a really fast solution you should either cinsidering of
writing a device-driver (which can be connected from different apps) or
you can use memory-mapped-files...

In general you can take a look at:
http://msdn.microsoft.com/library/en...unications.asp
But as I said: I would use OPC. It is really fast (erarly-bound COM is
fast (IMHO)) and it is a standard interface which can be used by others.

--
Greetings
Jochen

My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Nov 17 '05 #2
Paul Baker wrote:
What is the best (fastest) method for transferring messages between the CAN
communications process and the other two processes?


I don't know CAN, but the fastest IPC is shared memory (memory mapped
files). It's just as fast to read/write data in shared memory as it is
in normal memory allocated with malloc or new. Nothing else can even
come close to that speed (sockets, pipes, COM, etc., are much slower).
This is, of course, when both processes reside on the same computer.

Tom
Nov 17 '05 #3
"Paul Baker" <pb****@liftstore.com> wrote in message
news:uS**************@TK2MSFTNGP10.phx.gbl...
Currently I'm leaning towards named pipes but would like to pass the CAN
messages as structures and not simply as "streams" of data.

Got any suggestions?


As Jochen and Tamas have pointed out there are faster ways to go. But pipes
have a few appealing characteristics

1) they are easy to implement and use with file semantics
2) they are easily securable
3) they are easily impersonable
4) they can be message rather than stream oriented

And if you move the pipe server, you merely change the name of the pipe to
use in the client.

<rant>
As for COM, I hate it for no better reason than that it exists largely for
the benefit of VB "developers". <gd&r> Plain vanilla RPC seems to me to be
far more attractive.
</rant>

Regards,
Will
Nov 17 '05 #4
Chaps,
Many thanks for the useful advice you've given me. I've got more choices
than I expected.

Jochen,
I'll try to cross-post in future! By the way I think we'll be using the
Softing FG-100 CAN to Ethernet gateway device.

Thanks

Paul
Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Raymond H. | last post by:
Hello, I create a vb4 project which can also naviger on Internet via the WebBrowser control which I put on my form. My question is: if this program is installed on a station having already...
17
by: John Bentley | last post by:
John Bentley: INTRO The phrase "decimal number" within a programming context is ambiguous. It could refer to the decimal datatype or the related but separate concept of a generic decimal number....
3
by: Edward | last post by:
ASP.NET / VB.NET SQL Server 7.0 Our client has insisted that we change our established practice of building SQL in-line and move it all to SPROCs. Not a problem for 80% of the app. However,...
9
by: johkar | last post by:
I only have IE 6 and dial-up. Can you help me determine which browsers support this code? Thanks, John <html> <head> <title>Fixed Table Headers</title> <script language="JavaScript"...
133
by: Jane Withnolastname | last post by:
I have a web page that uses an unordered list (<UL>) and the LH (list header) tag. I know LH is a valid tag because it is clearly defined by the W3C here:...
65
by: Skybuck Flying | last post by:
Hi, I needed a method to determine if a point was on a line segment in 2D. So I googled for some help and so far I have evaluated two methods. The first method was only a formula, the second...
6
by: TZ | last post by:
I have two classes, UIHousehold and WIZEditHousehold (both are winforms). UIHousehold creates and shows the WIZEditHousehold (WIZEditHousehold can't be modal, so UIHousehold doesn't know when...
0
by: madhubabumallidi | last post by:
hi all, i am working on a webpage where i need to have two textboxes in a datagrid which are inter related i.e changes in one textbox should reflect on other and viceversa.please anyone help me...
1
by: Laurence | last post by:
Hi folks, As I konw: database partition (aka data partition?), the database can span multiple machines; table partition, the data within a table can seperate by certain condition. How about...
4
by: Mark | last post by:
Hi, I'm relatively new to Java, but have been a programmer for decades. I would like multiple instances of my Java app (on different computers on the same local LAN) to communicate with each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.