473,473 Members | 1,534 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

design guidance


I inquired about utilizing a vector of pairs just yesterday and after
receiving some feedback, I got to thinking my thoughts with regards to
my initial 'approach' was flawed to begin with:

Here's my 'dilema' in a nutshell. I've got 24 sources ( call them 0
... 23 )
sending data to a recipient ( call this 'X' ). The data from each
source has
what's called an 'id' (call it segment id) assosciated with it.

Today, I've got a maximum of two id's ( 0 and 1 ).
X will receive from all sources, a source id, a segment id and data
size. So now:

struct from_source_to_x { // transmitted from all sources (
0...24) to X
unsigned int the_segment;
unsigned int the_source_id;
unsigned int the_size_of_data;
};

Upon receipt of the data from _all_ sources, X will perform processing
on the data. X knows (via a structure that's sent to it intially )
that the processing order is segment 0 followed by segment 1. i.e
process segment 0 first followed by segment 1.

So on X, the very first thing X receives before anything is a table
that tells X the processing order:
segment what_to_do
0 IFFT // I want to an IFFT
1 FFT // do an FFT here

The trouble on X is all the 'required house keeping that goes along
with receipt of the segments' from the 24 sources.

Having said that - on X (i.e local to X) - I need to track three
things.
1. The size of the segment per source
2. The address where I store the segment - for _each_ source on X
3. A count parameter to keep track of things.

In it's simplest form. Lets assume source 0 transmits segment 0, with
a size of 0x10000;

// so now source 0 fills out the from_source_to_x composite
from_source_to_x source0;
source0.the_segment = 0; // I source 0 just did something
with data on segment 0
source0.the_source_id = 0; // Here's my source_id
source0.the_size_of_data = 0x100000; // Here's the results size of
what I came up with

Upon receipt of the the above header. The code executing on "X' will.
Increment the count parameter associated with _that_ source (i.e
source 0), store the size of data from source 0, and the keep track of
the offset in memory where I stored source 0's data.

Now do that X will do that the remainder. i.e receive data from a
source, increment the count, store the addresss of where the data was
moved and the size of the data.

If the count == 24, then X has received results from every source - for
segment 0.
if ( count0 = 1 && count1 = 1 && .. up to count23 == 1 )
// I've received all the data.
// do an IFFT on all the data.

X then will do an IFFT on the data from all the sources. Once 'X' is
complete with its' processing on segment 0. X will 'request' segment
1 from the sources. I'm executing in a
multi-threaded environment but enviornment 'details' aside, that's it
in a nutshell.

Now here's where it gets tricky for me - the design aspect of this.

Pictorially my thoughts were a map where first would be the
'what_to_do', second is a struct that entails - segment id, sources,
source counts, source data size, offset in memory. So now:

__ what_to_do_ segment_id
IFFT 0
0........ 24 (24) sources
0 ....... 0 (24) counts - all
zeros initially
X1.......X24 (24) data size - this
we'll get from every source
Y1......Y24 (24) address in memory
- this part is tricky but doable.
Trouble is, something just doesn't seem right about the use of map
here.

That said, I'm interested in design guidance. After think about this.
I'm thinking a chain of responsibilty pattern might be prudent here.
Bottom line: I'll take a suggestion (source snippet) and will go off
an implement it.

I tend to struggle with getting the 'design going'. The real
tricky/confusing aspect of this is trying to detemine if
1. I've received all the results.
2. How do I now, 'walk' through a struct or (?) and get the address of
every source and the size of the data. Whew!!

Thanks in advance.

Jan 17 '06 #1
0 1442

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

Similar topics

2
by: dogu | last post by:
I've worked the last number of years using an object oriented database tool that comes with a complete IDE, built in wigets for things like forms, buttons, hot spots, propietary client but apps are...
3
by: BT | last post by:
Please take a look at a picture of my design: http://tinyurl.com/4quzv I am pretty sure I designed this wrong. tblTickerListDate contains two foreign keys. That pair (TickerId & ListDateId)...
2
by: Donal McWeeney | last post by:
Hi, Are there any good guidance white papers out there on the best way to design and build assemblys in VS.Net that would cover the following questions I have and requirements I know of: The...
4
by: HankD | last post by:
I have been given the task to upgrade the company's website. It is large and unorganized right now. There should be a main common area with subareas for each division (5). My main question is what...
2
by: vbnetguy | last post by:
Hi All, I have read MANY posts on how to track changes to data over time It appears there are two points of view 1. Each record supports a Change Indicator flag to indicate the current...
20
by: Brad Pears | last post by:
I am completely new to vb .net. I am using visual Studio 2005 to redo an Access 2000 application into a .net OO application using SQL Server 2000 - so a complete rewrite and re-thinking of how...
8
by: | last post by:
I'm looking for some design guidance on a collection of projects I'm working on. The project involves a bunch of websites constructed out of a collection of user controls. Different user...
1
by: Rusty Hill | last post by:
In ASP.net 2.0 I need to create a scheduling page that allows my users to book/schedule/reserve six different surgery rooms. What the design calls for is one screen that has the daily schedule on...
3
by: vicky | last post by:
Hi All, Can u please suggest me some books for relational database design or database modelling(Knowledgeable yet simple) i.e. from which we could learn database relationships(one to many,many to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.