limit on number of data ports?

Hello,

There is an "estimator" taskcontext which grabs inputs and from various
other taskcontexts and calculates the current state of a truck. This
state information is then used by other taskcontexts to drive the truck.

The information from the estimator is sent out via dataports. We need to
make a design decision regarding whether to have one dataport per
variable, or bunch variables into structures and send the structures out
of the ports. Is there a limit on the number of dataports a TC can have,
before its performance starts suffering? Or is this number so large that
we need not consider this in our design?

Thanks,
Sagar

limit on number of data ports?

On Tuesday 21 September 2010 13:27:50 Sagar Behere wrote:
> Hello,
>
> There is an "estimator" taskcontext which grabs inputs and from various
> other taskcontexts and calculates the current state of a truck. This
> state information is then used by other taskcontexts to drive the truck.
>
> The information from the estimator is sent out via dataports. We need to
> make a design decision regarding whether to have one dataport per
> variable, or bunch variables into structures and send the structures out
> of the ports. Is there a limit on the number of dataports a TC can have,
> before its performance starts suffering? Or is this number so large that
> we need not consider this in our design?

The only hard limit is the available memory/cpu on your system. That said, I
would group as much variables as possible in structs (use typegen to create
transports/typekits for these structs). If necessary, you'll have a certain
value present in multiple structs.

The reason you want to do this is:
* each port connnection must be made, so many ports is many connections to be
made and more chance to mistakes (forgotten connection or copy/paste error)
* each port read must be checked for NoData/OldData/NewData, which adds code
in your reading part of the code
* If you go distributed, performance would suffer from many small writes,
compared to a few big writes.

Peter