AnsweredAssumed Answered

vrf Passing Params in compliled functions.

Question asked by VRFuser on Oct 16, 2000


-----------------------------------------------------------------------
Yes! you are right. You may not use the structs, some data types etc. of C
while calling them from Vee. I am not sure for now but double or float was
not support by Vee 5.00.
Of course you should use the functions as defined. In order to call
them from Vee, you SHOULD write a transition function in C that calls the
main function and has the parameters exactly as required by Vee.This
brings extra load but simplicity from the Vee side.

-----------------------------------------------------------------------

Cagri Acar
Mikro Dalga ve Sistem Teknolojileri / Microwave and System Technologies
Test Muhendisligi Bolumu            / Test Engineering Department
ASELSAN A.S.
PK 101 Yenimahalle Ankara/Turkey

Phone:+903123851900-2701


On Fri, 13 Oct 2000, Christner, Rod J wrote:

> All,
>
> I have a compiled function whose definition file for VEE looks like this:
>
> int chi_receive_mess(char* *return_buff, int max_coun, int* actual, int
> timeout);
>
> Unfortunately, the retrun_buff parameter is defined like this on the C side:
>
>
> struct MSG_STATUS_REC       { unsigned _short remstat;
>                                       char msg[msg_size];
>                                       char msg_line_1[msg_line_size];
>                                       char msg_line_2[msg_line_size];
>                                     };
>
> struct LOT_STATUS_BRIEF_RETURN { struct MSG_STATUS_REC status;
>                                       char lot_found;
>                                       char moved_in;
>                                       char route[route_size];
>                                       char operation[operation_size];
>                                       unsigned _int wafer_cnt;
>                                       char product[product_size];
>                                     };
>
> So basically, the pass by reference parameter that gets modified by
> chi_receive_mess called return_buff ends up being a structure where the
> first field is another structure.
>
> On page 38 of the HP VEE Advanced Programming Techniques manual, it clearly
> states there is a discrete list of types that can be passed to a compiled
> function and a record or structure is not one of them.  I've tried passing
> an array of chars by reference but garbage comes out.
>
> I just wanted to confirm that there is no fancy way to handle this.  My
> alternative is to write another compiled C function that uses the original
> compiled C function where I can pick off the values I need inside of
> retrun_buff and only modify values of types supported by VEE.
>
>
> Any input is appreciated,
> Thanks,
> Rod Christner
> Phone: (480) 554-8451
> Pager: (602) 440-7484
>
>
> ---------------------------------------------------------------------
> This is the "vrf" maillist, managed by Majordomo.  To send messages to
> this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
> unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
> If you need details, just send a message containing the text "help"
> to "vrf-request@lvld.agilent.com".
> ---------------------------------------------------------------------
>

---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.agilent.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.agilent.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.agilent.com".
---------------------------------------------------------------------

Outcomes