Retrieving items from config file

12 views
Skip to first unread message

Mike

unread,
Nov 4, 2009, 10:58:50 AM11/4/09
to IADS
Hi,

I'm converting various algorithms from our front end to IADS. I'm
just getting started in IADS algorithm developement and I'm new to the
Windows platform and MS Visual Studio, C++, C#, basically new to
object oriented programming (I've been working in C on a Unix system),
so I have a huge learning curve to overcome. I have been able to
follow the basic examples for creating an algorithm for IADS or a COM
dll such as the sample function in C++. I'm sure someone has already
asked this question and the answer is already in this group, but I
guess I'm either not entering the right search key words or
understanding what I am finding. Anyway, I need to fetch the units
and sample rate of the input parameter to the algorithm, do I have
access to that information through the IadsFunction.idl interface or
can I access it from the config file easily?

Thanks,
Mike

James Bretz

unread,
Nov 4, 2009, 12:57:53 PM11/4/09
to ia...@googlegroups.com
Hi Mike,

No problem... Actually, I don't think anyone has actually asked that
question before ;)

Unfortunately, there's no way currently to obtain the exact parameter that's
being passed into your function. At this time, the equation engine simply
evaluates the expression in the argument position and sends in the resultant
value to the function. The current technique is to simply pass in the
required information as follows:

Functions.MyFunction( param, GetUpdateRate(param), GetUnits(param) )

It's not pretty, but it should work. Think of the custom function being more
similar to C that say C++. At this point in time, your not able to pass
"classes" into the function, so you'll have to send the actual value of the
desired input.

Let me know if you have any further questions,
Jim

Mike

unread,
Nov 4, 2009, 1:06:47 PM11/4/09
to IADS
Thanks Jim!
That works! Uses what is already available and it's simple...No
wonder I didn't think of it!

Mike

James Bretz

unread,
Nov 4, 2009, 1:10:03 PM11/4/09
to ia...@googlegroups.com
> Thanks Jim!
> That works! Uses what is already available and it's simple...No
> wonder I didn't think of it!

LOL! ;)

No problem,
Jim

Michael Jones

unread,
Nov 4, 2009, 1:14:41 PM11/4/09
to IADS
Mike,

Just a small headsup, keep in mind that the units field is sometimes
incorrectly defined. Think of it as more of a 'visual indicator' than
a data type.

Ultimately if you will be using this field to autoconvert data, suchas
from Degrees to Radians, it might be a good idea to spotcheck the
reliability of how that field is being used.

Good Luck,
Miek

Mike

unread,
Nov 4, 2009, 1:28:11 PM11/4/09
to IADS


That's a good point. Issues with this algorithm are almost always
related to typos in the units field. Maybe I'll just create 2, one for
degrees, one for radians.

Thanks again!

Reply all
Reply to author
Forward
0 new messages