Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » modifies keyword not working
modifies keyword not working [message #1732947] Mon, 23 May 2016 09:46 Go to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi,

Does Titan support "modifies" keyword for template creation?
In the attached script "modifies" is used and it's not working as expected.
Please check comments in the script of the pattern /* Issue: ... */
Please help.

Thanks

[Updated on: Mon, 23 May 2016 09:54]

Report message to a moderator

Re: modifies keyword not working [message #1732982 is a reply to message #1732947] Mon, 23 May 2016 14:23 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Murli,

I think "modifies" works as it should, you just don't count in the impact of "implicit omit":

Without "implicit omit"

 /* Defined in TS 34.108 clause 9. */
    template UL_CCCH_Message cdr_RRC_ConnReqUE_Id(template EstablishmentCause p_EstCause) modifies cbr_108_RRC_ConnReq := 
    {
        message_ := 
        {
            rrcConnectionRequest := 
            {
                initialUE_Identity := (c_UE_IdDefIMSI, c_UE_IdDefTMSI, c_UE_IdDefP_TMSI)            }
        }
    };

    /* Defined in TS 34.108 clause 9. */
    template UL_CCCH_Message cbr_108_RRC_ConnReq(template EstablishmentCause p_EstCause) := 
    {
        integrityCheckInfo := omit,
        message_ := {rrcConnectionRequest := 
        {
            initialUE_Identity := ({imsi := ?},{tmsi_and_LAI := ?},{p_TMSI_and_RAI := ?},{imei := ?}),
            establishmentCause := p_EstCause,
            protocolErrorIndicator := noError,
            measuredResultsOnRACH :=  * ,
            v3d0NonCriticalExtensions :=  * 
        }
}
    };


cdr_RRC_ConnReqUE_Id will modify only initialUE_Identity, leaving the rest of the fields intact.



With "implicit omit" though ,

	        measuredResultsOnRACH :=  * ,
            v3d0NonCriticalExtensions :=  * 


will change to

			measuredResultsOnRACH :=  omit ,
            v3d0NonCriticalExtensions :=  omit 



as instructed by omission; subsequently the comparison between e.g. v3d0NonCriticalExtensions (having some value in both cbr_108_RRC_ConnReq_toMatchSameImsi and cbr_108_RRC_ConnReq_toMatch) and omit will fail:


15:59:59.078143 .message_.rrcConnectionRequest.v3d0NonCriticalExtensions{
    rRCConnectionRequest_v3d0ext := {
        uESpecificBehaviourInformation1idle := omit
    },
    v4b0NonCriticalExtensions := {
        rrcConnectionRequest_v4b0ext := {
            accessStratumReleaseIndicator := rel_8 (4)
        },
        v590NonCriticalExtensions := {
            rrcConnectionRequest_v590ext := {
                predefinedConfigStatusInfo := false
            },
            v690NonCriticalExtensions := {
                rrcConnectionRequest_v690ext := {
                    ueCapabilityIndication := hsdch_edch (1),
                    measuredResultsOnRACHinterFreq := omit,
                    domainIndicator := {
                        ps_domain := NULL
                    }
                },
                v6b0NonCriticalExtensions := {
                    rrcConnectionRequest_v6b0ext := {
                        mbmsSelectedServices := omit
                    },
                    v6e0NonCriticalExtensions := {
                        rrcConnectionRequest_v6e0ext := {
                            supportForFDPCH := true_value (0)
                        },
                        v770NonCriticalExtensions := {
                            rrcConnectionRequest_v770ext := {
                                ueMobilityStateIndicator := omit,
                                hspdschReception_CellFach := true_value (0),
                                mac_ehsSupport := true_value (0),
                                discontinuousDpcchTransmission := true_value (0)
                            },
                            v7b0NonCriticalExtensions := {
                                rrcConnectionRequest_v7b0ext := {
                                    supportForE_FDPCH := true_value (0)
                                },
                                v860NonCriticalExtensions := {
                                    rrcConnectionRequest_v860ext := {
                                        supportOfCommonEDCH := omit,
                                        multiCellSupport := omit,
                                        pre_redirectionInfo := omit,
                                        supportOfMACiis := omit,
                                        supportOfSPSOperation := omit
                                    },
                                    v7e0NonCriticalExtensions := omit
                                }
                            }
                        }
                    }
                }
            }
        }
    }
} with omit unmatched


I hope this clarifies it.

Best regards
Elemer

Re: modifies keyword not working [message #1733089 is a reply to message #1732982] Tue, 24 May 2016 03:18 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for the clarification.
Re: modifies keyword not working [message #1734405 is a reply to message #1733089] Wed, 08 June 2016 04:54 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

I removed "implicit omit" from all modifies templates and it worked fine. Fields without a value in modifies templates take its value from the parent template.
However, in one situation this approach fails too.
If the field overridden in modifies template is an ASN SEQUENCE and it has some optional fields which are not specified in the modifies template, this results in DTE (send/valueof on not specific template).

For instance:
ASN:
Type1 ::= SEQUENCE {
    i INTEGER OPTIONAL,
    j INTEGER OPTIONAL
}

Type ::= SEQUENCE {
    t  Type1 OPTIONAL,
    n  INTEGER OPTIONAL
}


TTCN:
template Type fillType := {
    n := 0
} with { optional "implicit omit"}

template Type modifyType modifies fillType := {
    t := {
        j := 3
    }
}


Now in the template modifyType I can't use implicit omit as it'll make all the unspecified fields as omit instead of taking them from the fillType template and if I don't specify implicit omit, It'll make the optional field <i> in the field <t> of Type as unspecified instead of omit.

Please suggest some workaround so that the unspecified values in the overridden field becomes omit.

Thanks
Murli
Re: modifies keyword not working [message #1734462 is a reply to message #1734405] Wed, 08 June 2016 14:23 Go to previous messageGo to next message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Murli,

I'm afraid what you want cannot be achieved within the boundaries of the standard. Problem is that along the workflow you don't assign any value to i;
I understand you may want to delay that for some reason, but as soon as you will want to send this template you have to assign a value to it.
What you can do is assign a dummy value, which can be an integer or even omit (!) , in the modifyType, and later overwrite it with any value that is meaningful.

template Type modifyType modifies fillType := {
    t := {
        i :=  omit,
        j := 3
    }
}




I hope this helps somewhat

Best regards
Elemer



Re: modifies keyword not working [message #1734513 is a reply to message #1734462] Thu, 09 June 2016 06:13 Go to previous messageGo to next message
murli sharma is currently offline murli sharmaFriend
Messages: 85
Registered: November 2015
Member
Hi Elemer,

Thanks for the info. I'll have to change all the modifies templates manually, I guess.

Thanks
Murli
Re: modifies keyword not working [message #1734522 is a reply to message #1734513] Thu, 09 June 2016 07:14 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 807
Registered: January 2015
Senior Member
Hi Murli,

you can also use parameterized templates:

template Type modifyType (in template integer p_int)  modifies fillType := {
    t := {
        i:= p_int,
        j := 3
    }
}


and delay setting i until right before sending:

P.send(modifyType(omit))




Best regards
Elemer
Previous Topic:Accelerate your Titan compilation with clang compiler and gold linker
Next Topic:Eclipse Titan statement of compliance
Goto Forum:
  


Current Time: Mon Sep 24 21:20:59 GMT 2018

Powered by FUDForum. Page generated in 0.02240 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top