OpenTTCN/2.56.0/ANSI C SDK library reference/TCI-CD/tciEncode

From OpenTTCN

Jump to: navigation, search

tciEncode

The tciEncode function is called in the background by the library to request encoding of a TTCN-3 value in abstract from either into encoded frame suitable for direct sending to the SUT, or into internal encoding used by subsequent stages of user-implemented adapter processing subsystem.

BinaryString tciEncode(TciValue value);

Parameters

value

   

TTCN-3 value in abstract form to be encoded.

Return values

Returns the result of encoding as BinaryString.

Remarks

It is strongly recommended to initialize the result variable used as a return value using fragment of code similar to the one below:

BinaryString result;
memset(&result, 0, sizeof(result));

The data field of the result shall be allocated using malloc() call. When the result is returned to the caller, this user-implemented callback function loses ownership of the data pointer, therefore it shall not attempt to deallocate it if it is going to be returned to the caller as a part of the result. The caller will perform deallocation at some convenient unspecified moment of time.

Several copies of this same function call may be running at the same time in several execution threads of the same adapter process, each with its own private copy of function parameters.

Requirements

Header

<tci/tci.h>

Library

openttcn-tsa-mt.lib openttcn-tcd-mt.lib

Compatibility

ETSI ES 201 873-6 (TCI), OpenTTCN ANSI C SDK 2.x and higher

See also

otSetEncoder

Views
Personal tools