Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » How to reference union value in another module?
How to reference union value in another module? [message #1814401] Wed, 11 September 2019 03:46 Go to next message
Sean Kuo is currently offline Sean KuoFriend
Messages: 28
Registered: August 2019
Junior Member
Hi everyone,

Module TS29518_Namf_Communication_simplified is imported by my main ttcn.
I'm implement a template for this module like below.
template UeContextTransferReqData t_jsonTemplate_send_test1:=
{
    reason:=0,
    regRequest:=
    {
        n1MessageClass:=0,
        n1MessageContent:="mysteriousContentId",
        nfId:=?
    },
    //supportedFeatures (pattern "^[A-Fa-f0-9]*$")
    supportedFeatures:="ghijklmnopqrstuvwxyz$"
}


and I got this error:
REST_demo.ttcn: In TTCN-3 module `REST_demo':
 REST_demo.ttcn:96.1-107.1: In template definition `t_jsonTemplate_send_test1':
  REST_demo.ttcn:98.13: In template for set field `reason':
   REST_demo.ttcn:98.13: error: union value was expected for type `@TS29518_Namf_Communication_simplified.TransferReason'


So I changed it into
reason:=TS29518_Namf_Communication_simplified.TransferReason.TransferReason_enum.INIT_REG,


and the error became
REST_demo.ttcn:98.13-93: error: Reference to a value was expected instead of type `@TS29518_Namf_Communication_simplified.TransferReason'


Does anyone have any hint for this error?

---update---

Lucky me, figured it out.
It should be like this:
reason:=
    {
        enum_val:=INIT_REG
    },


Best regards

Sean

[Updated on: Wed, 11 September 2019 03:57]

Report message to a moderator

Re: How to reference union value in another module? [message #1814405 is a reply to message #1814401] Wed, 11 September 2019 05:19 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
:)
Previous Topic:Support for HTTP/2 in Eclipse Titan
Next Topic: Support for HTTP/2 in Eclipse Titan- with a twist
Goto Forum:
  


Current Time: Thu Apr 25 17:12:31 GMT 2024

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

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

Back to the top