Utilities#

Functions#

void

Waiting for the connection.

void

Connect and wait for connection.

Macros#

#define
exit(exitcode)

Exit from thread (wrapper)

#define
msleep(milis)

Milisec sleep (wrapper)

#define
assert_res(val, message)

Assert POSIX API result with thread exit.

Function Documentation#

app_wisun_wait_for_connection#

void app_wisun_wait_for_connection (void)

Waiting for the connection.

Parameters
N/A

This function doesn't call the app_wisun_network_connect() function. The function provides a delay loop with optional heart beat printing till the connection state has not been changed.


Definition at line 100 of file /mnt/raid/workspaces/ws.zJeaRLJo0/overlay/super/app/wisun/component/app_core/sl_wisun_app_util.h

app_wisun_connect_and_wait#

void app_wisun_connect_and_wait (void)

Connect and wait for connection.

Parameters
N/A

The function calls app_wisun_network_connect() function and app_wisun_wait_for_connection() function. It can be useful at the begining of application thread.


Definition at line 108 of file /mnt/raid/workspaces/ws.zJeaRLJo0/overlay/super/app/wisun/component/app_core/sl_wisun_app_util.h

Macro Definition Documentation#

exit#

#define exit
Value:
do { \
printf("[%s] Exit: %d\n", \
osThreadGetName(osThreadGetId()), (exitcode)); \
osThreadTerminate(osThreadGetId()); \
} while (0)

Exit from thread (wrapper)


Definition at line 60 of file /mnt/raid/workspaces/ws.zJeaRLJo0/overlay/super/app/wisun/component/app_core/sl_wisun_app_util.h

msleep#

#define msleep
Value:
do { \
osDelay((milis)); \
} while (0)

Milisec sleep (wrapper)


Definition at line 70 of file /mnt/raid/workspaces/ws.zJeaRLJo0/overlay/super/app/wisun/component/app_core/sl_wisun_app_util.h

assert_res#

#define assert_res
Value:
do { \
printf("%s [%ld] %s.\n", message, (int32_t)val, (val == -1) ? "error" : "done"); \
if ((val) == -1) { \
exit(-1); \
} \
} while (0)

Assert POSIX API result with thread exit.


Definition at line 78 of file /mnt/raid/workspaces/ws.zJeaRLJo0/overlay/super/app/wisun/component/app_core/sl_wisun_app_util.h