[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference azur::mcc

Title:DECmcc user notes file. Does not replace IPMT.
Notice:Use IPMT for problems. Newsletter location in note 6187
Moderator:TAEC::BEROUD
Created:Mon Aug 21 1989
Last Modified:Wed Jun 04 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:6497
Total number of notes:27359

6106.0. "Can't read out_p for an Alarm Object event" by ANNECY::BOURDILLON (Miaou) Thu Sep 01 1994 17:18

I am trying to read the arguments for an Alarm Object create event which
I have received (using mcc_call_access). When I try to use the ILV routines
it appears that I am not getting what is in the ILV dump .......



After doing an mcc_ilv_dump, I get :

[  1 ] (
    [  1 ] (
        [  1806 ] (
            [  9 ] (
                [  65535 ]                 1b 00 00 00 01 00 01 00 18 00 0e 02 3
0 00 00 00 18 00 00 01
                01 00 00 00 05 00 00 00 00 00 00 00 08 98 02 00 00 00 00 00
                00 00 66 00 48 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                00 00 08 00 01 04 6d 65 6f 77 00 00 55 ec 00 00 01 01 01 00
                04 00 04 02 78 00 00 00 04 00 00 01 6f 00 00 00 23 00 00 00
                00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                01 00 00 00
                )
            [  1 ]             0b
            [  13 ]             bc 3e 52 a4 ce c5 cd 01 ff ff ff ff ff ff 78 10
            [  14 ]             00
            [  16 ]             04
            [  17 ] (
                [  1 ] (
                    [  65535 ]                     1a 00 00 00 01 00 01 00 1a 00
 0e 02 30 00 00 00 1a 00 00 01
                    01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 01 00 01 00 18
                    00 0e 02 30 4c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                    00 00 0a 00 01 06 61 65 6f 31 35 37 00 00 00 48 f9 03 00 00
                    01 01 01 00 0a 00 0e 02 7c 00 00 00 0a 00 00 01 8f 00 00 00
                    03 00 00 00 00 00 00 00 01 01 00 04 00 04 02 78 00 00 00 04
                    00 00 00 00 64 62 5f 74 65 73 74 6f 62 6a 00 00
                    )
                )
            [  18 ] (
                [  65535 ]                 08 00 00 00 01 00 01 00 1d 00 00 02 3
0 00 00 00 1d 00 00 01
                01 00 00 00 05 00 00 00 00 00 00 00 60 01 00 00 00 00 00 00
                08 00 08 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
                00 00 0d 00 01 09 64 62 5f 64 6f 6d 61 69 6e 00 00 00 00 00
                )
            [  19 ]             00
            [  20 ]             00
            [  21 ]             00
            [  22 ]             00
            )
        )
    )


The 1806 is the constant  MCC_K_OBJECT_CREATION

My code for reading the ilv is as follows :



    status = mcc_ilv_get_param_begin(&ctx, p_out_p);

    /* Get the constructor ID - not of interest to us */

    if (status == MCC_S_NORMAL)
    {
        status = mcc_ilv_get_id(&ctx, &id_code);
    }


    /* Open constructor */

    if (status == MCC_S_NORMAL)
    {
        mode = MCC_K_ILV_LIST_VALUE;
        status = mcc_ilv_get_cons_begin(&ctx, MCC_K_NULL_PTR, &mode);
    }


    if (status == MCC_S_NORMAL)
    {
        status = mcc_ilv_get_id(&ctx, &id_code);
        printf("Id code = %u\n", id_code);      **** This returns 1806 ****
    }

    if (status == MCC_S_NORMAL)
    {
        status = mcc_ilv_list_get_datatype(&ctx, &DataType);

        printf("DataType is %u, status = %u\n", DataType, status);
    }


The DataType at this point is 11 = MCC_K_DT_BITSET. This doesn't seem to
match up with the ILV dump. What stupid thing am I doing?!

Help!


Ben
    
T.RTitleUserPersonal
Name
DateLines
6106.1Event are ILV encoded on native modeTAEC::LAVILLATMon Sep 05 1994 05:2939
Ben,

An event is not encoded in list mode, this is basically why you see this 
problem.

In the code below, you need to replace :

>
>    /* Open constructor */
>
>    if (status == MCC_S_NORMAL)
>    {
>        mode = MCC_K_ILV_LIST_VALUE;
>        status = mcc_ilv_get_cons_begin(&ctx, MCC_K_NULL_PTR, &mode);
>    }
>
by 
>
>    /* Open constructor */
>
>    if (status == MCC_S_NORMAL)
>    {
>        mode = MCC_K_ILV_NATIVE_VALUE;
>        status = mcc_ilv_get_cons_begin(&ctx, MCC_K_NULL_PTR, &mode);
>    }
>

and then suppress the call to mcc_ilv_list_get_datatype since not allowed
in native ILV mode (you need to know in advance the datatype of the event
by looking into the dictionary and write your code accordingly)

Hope this help.

Pierre.

PS: BTW since your example is specifically a TeMIP problem, I would suggest
you enter any other problem in the TeMIP notesfile instead of the MCC one.

6106.2ANNECY::BOURDILLONMiaouMon Sep 05 1994 06:2412
Thank you Pierre - I had just clicked to the solution, myself!!

>> PS: BTW since your example is specifically a TeMIP problem, I would suggest
>> you enter any other problem in the TeMIP notesfile instead of the MCC one.



Will do.



Ben