Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 04:58 Go to next message
Bipin V is currently offline Bipin VFriend
Messages: 6
Registered: April 2022
Junior Member
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 14:57 Go to previous messageGo to next message
Gábor Szalai is currently offline Gábor SzalaiFriend
Messages: 133
Registered: December 2015
Senior Member
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 07:20 Go to previous message
Bipin V is currently offline Bipin VFriend
Messages: 6
Registered: April 2022
Junior Member
Thanks, It is working.
Previous Topic:TTCN_Location in adapters (C++ code)
Next Topic:Use of octetstring in LENGTHTO
Goto Forum:
  


Current Time: Thu Apr 25 06:22:41 GMT 2024

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

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

Back to the top