OpenTTCN/Developer corner/Implementing external functions/Skeletons/C/Utilities.h

From OpenTTCN

Jump to: navigation, search

  OpenTTCN DocZone

  Home | Developer's corner | Knowledge base | Working documents | Documentation | OpenTTCN IDE | Tutorials | Training | How do I | Frequently asked questions | Technical support


Utilities.h


Back to main article >>

#ifndef __OT_EXT_FUNC_EXAMPLE_C_UTILITIES_H__
#define __OT_EXT_FUNC_EXAMPLE_C_UTILITIES_H__

#include <tci/tci.h>

/***************************************************************************
 * TCI-CD-related utility functions.
 */

long tciValueToLong(TciValue value);

void assignLongToTciValue(TciValue dst, long value);

TciValue longToTciValue(long value);

/* Do not forget to free() the null-terminated char* string returned in
 * dst_str. */
void tciValueToCharstring(char** dst_str, long* dst_str_len, TciValue value);

void assignCharstringToTciValue(TciValue dst, const char* value);

TciValue charstringToTciValue(const char* value);

/* Sized charstring does not have to be null-terminated. */
void assignSizedCharstringToTciValue(TciValue dst, const char* value, long len);

TciValue sizedCharstringToTciValue(const char* value, long len);

#endif
Views
Personal tools