Skip to main content



      Home
Home » Eclipse Projects » Eclipse Titan » Choosing multiple encoders(How to choose a codec at runtime from ttcn)
Choosing multiple encoders [message #1851356] Mon, 04 April 2022 00:58 Go to next message
Eclipse UserFriend
Hi,

I have a ttcn module with RAW, XML, and JSON encodes, enabled using "with encode" construct. Is there an argument to encvalue function to choose the encoding? How can I switch the encodings from within ttcn code.

Thanks,
Bipin
Re: Choosing multiple encoders [message #1851387 is a reply to message #1851356] Mon, 04 April 2022 10:57 Go to previous messageGo to next message
Eclipse UserFriend
The dynamic_encoding
parameter can be used for choosing the codec to use for values of types with multiple
encodings; the encoding_info/decoding_info parameters are currently ignored.
 encvalue(in template (value) any inpar, 
 in universal charstring encoding_info := "", 
 in universal charstring dynamic_encoding := "") return bitstring


The dynamic_encoding parameter can be "RAW", "JSON" etc.
Re: Choosing multiple encoders [message #1851407 is a reply to message #1851387] Tue, 05 April 2022 03:20 Go to previous message
Eclipse UserFriend
Thanks, It is working.
Previous Topic:TTCN_Location in adapters (C++ code)
Next Topic:Use of octetstring in LENGTHTO
Goto Forum:
  


Current Time: Thu Jul 03 20:24:00 EDT 2025

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

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

Back to the top