Design problem, how to do this?

Jef Patat

New member
Joined
Dec 5, 2005
Messages
1
Hi,

Im strugling with a design problem, I dont know how to implement it.

I have a main form which starts a thread that is a continious while loop receiving data from the CANbus. (after a lot of learning I got this to work)

This data is received in the form of a structure, containing message ID, time, databytes, ....

For the moment I write this data away in a tab seperated file, which shows me my program is working correctly.

At program start it will be defined which messages need to be stored. A config file contains a certain amout of keys representing which messages need to be stored.

I want to put the last x received structs with ID=y to be stored in some kind of buffer, i see it as a table with x rows, in which x can vary from ID to ID when the application starts but not during application, x comes out of the config file.

Put it shortly: a configuration file will define the length and number of buffers.

So what i need are y buffers with different lengths.

Also, my Form1 gives the possibility to open a inheritted baseform which visualizes the data in a numerical way. During runtime a theoretical maximum of y of these forms can be opened. Inside this baseform there is an option to open another form to visualise the data graphically, f.e. temperature logging.

And now comes the problem. These tables are only written to by the thread in Form1. But all forms need access to this data.

This sounds like dataset/database stuff, but I do not have any experience on this, certainly not on .NET

What I would like to do is save this data in the best possible way, only, I dont really know how.

Can you guys help me out?

Kind regards, Jef
 
Back
Top