High Performance OPC UA Server SDK  1.6.0.338
platform

General platform specfic defines and initialization/cleanup for platform layer. More...

Macros

#define UA_BV(x)   (1 << (x))
 Bit shift macro. More...
 
#define UA_PANIC(msg)   ua_p_platform_panic(msg, __FILE__, __LINE__)
 Panic for stopping applications in fatal error scenarios.
 
#define UA_TEST_ASSERT(condition, msg)
 This maro is only used for testing and not in production. More...
 

Functions

PLATFORM_EXPORT int ua_platform_init (void)
 Initialize the platform layer. More...
 
PLATFORM_EXPORT int ua_platform_cleanup (void)
 Cleanup the platform layer. More...
 
PLATFORM_EXPORT char * ua_trim (char *text)
 Removes whitespace from the beginning and end of the string. More...
 
PLATFORM_EXPORT char * ua_unquote (char *text)
 Removes quotes from string. More...
 
PLATFORM_EXPORT char * ua_trim_and_unquote (char *text)
 This function trims and unquotes the given string. More...
 

Detailed Description

General platform specfic defines and initialization/cleanup for platform layer.

Macro Definition Documentation

◆ UA_BV

#define UA_BV (   x)    (1 << (x))

Bit shift macro.

◆ UA_TEST_ASSERT

#define UA_TEST_ASSERT (   condition,
  msg 
)

This maro is only used for testing and not in production.

It stops the code in certain situations using abort() also when compiled in release mode. In production this macro will be an emtpty define. It can be enabled by compiling with PLATFORM_ENABLE_TEST_ASSERT=on.

Function Documentation

◆ ua_platform_cleanup()

PLATFORM_EXPORT int ua_platform_cleanup ( void  )

Cleanup the platform layer.

Returns
Zero on success or errorcode on failure.

◆ ua_platform_init()

PLATFORM_EXPORT int ua_platform_init ( void  )

Initialize the platform layer.

Returns
Zero on success or errorcode on failure.

◆ ua_trim()

PLATFORM_EXPORT char* ua_trim ( char *  text)

Removes whitespace from the beginning and end of the string.

Parameters
textString pointer. This gets modified.
Returns
Pointer to new start of the string.

◆ ua_trim_and_unquote()

PLATFORM_EXPORT char* ua_trim_and_unquote ( char *  text)

This function trims and unquotes the given string.

See also
ua_trim
ua_unquote
Parameters
textString to modify.
Returns
Transformed string.

◆ ua_unquote()

PLATFORM_EXPORT char* ua_unquote ( char *  text)

Removes quotes from string.

Only if the first and last character is a '"', then this will be removed. For this reason the string should be trimmed already.

See also
ua_trim_and_unquote
Parameters
textString to modify.
Returns
Transformed string.