Separate utility functions - header for log and utility.
Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
SET(NNS_EDGE_SRCS
${NNS_EDGE_SRC_DIR}/nnstreamer-edge-common.c
${NNS_EDGE_SRC_DIR}/nnstreamer-edge-internal.c
+ ${NNS_EDGE_SRC_DIR}/nnstreamer-edge-util.c
)
IF(ENABLE_PAHO_MQTT)
* @bug No known bugs except for NYI items
*/
-#define _GNU_SOURCE
-#include <stdio.h>
-
#include "nnstreamer-edge-common.h"
-
-/**
- * @brief Internal util function to get available port number.
- */
-int
-nns_edge_get_available_port (void)
-{
- struct sockaddr_in sin;
- int port = 0, sock;
- socklen_t len = sizeof (struct sockaddr);
-
- sin.sin_family = AF_INET;
- sin.sin_addr.s_addr = INADDR_ANY;
- sin.sin_port = 0;
-
- sock = socket (AF_INET, SOCK_STREAM, 0);
- if (sock < 0) {
- nns_edge_loge ("Failed to get available port, socket creation failure.");
- return 0;
- }
-
- if (bind (sock, (struct sockaddr *) &sin, sizeof (struct sockaddr)) == 0) {
- if (getsockname (sock, (struct sockaddr *) &sin, &len) == 0) {
- port = ntohs (sin.sin_port);
- nns_edge_logi ("Available port number: %d", port);
- } else {
- nns_edge_logw ("Failed to read local socket info.");
- }
- }
- close (sock);
-
- return port;
-}
-
-/**
- * @brief Get host string (host:port). Caller should release returned string using nns_edge_free().
- */
-char *
-nns_edge_get_host_string (const char *host, const int port)
-{
- return nns_edge_strdup_printf ("%s:%d", host, port);
-}
-
-/**
- * @brief Parse string and get host string (host:port).
- */
-void
-nns_edge_parse_host_string (const char *host_str, char **host, int *port)
-{
- char *p = strchr (host_str, ':');
-
- if (p) {
- *host = nns_edge_strndup (host_str, (p - host_str));
- *port = (int) strtoll (p + 1, NULL, 10);
- }
-}
-
-/**
- * @brief Parse string and get port number. Return negative value when failed to get port number.
- */
-int
-nns_edge_parse_port_number (const char *port_str)
-{
- int port;
-
- if (!port_str)
- return -1;
-
- port = (int) strtoll (port_str, NULL, 10);
-
- if (port <= 0 || port > 65535) {
- nns_edge_loge ("Invalid port number %d.", port);
- port = -1;
- }
-
- return port;
-}
-
-/**
- * @brief Free allocated memory.
- */
-void
-nns_edge_free (void *data)
-{
- if (data)
- free (data);
-}
-
-/**
- * @brief Allocate new memory and copy bytes.
- * @note Caller should release newly allocated memory using nns_edge_free().
- */
-void *
-nns_edge_memdup (const void *data, size_t size)
-{
- void *mem = NULL;
-
- if (data && size > 0) {
- mem = malloc (size);
-
- if (mem) {
- memcpy (mem, data, size);
- } else {
- nns_edge_loge ("Failed to allocate memory (%zd).", size);
- }
- }
-
- return mem;
-}
-
-/**
- * @brief Allocate new memory and copy string.
- * @note Caller should release newly allocated string using nns_edge_free().
- */
-char *
-nns_edge_strdup (const char *str)
-{
- char *new_str = NULL;
-
- if (str)
- new_str = nns_edge_strndup (str, strlen (str));
-
- return new_str;
-}
-
-/**
- * @brief Allocate new memory and copy bytes of string.
- * @note Caller should release newly allocated string using nns_edge_free().
- */
-char *
-nns_edge_strndup (const char *str, size_t len)
-{
- char *new_str = NULL;
-
- if (str) {
- new_str = (char *) malloc (len + 1);
-
- if (new_str) {
- strncpy (new_str, str, len);
- new_str[len] = '\0';
- } else {
- nns_edge_loge ("Failed to allocate memory (%zd).", len + 1);
- }
- }
-
- return new_str;
-}
-
-/**
- * @brief Allocate new memory and print formatted string.
- * @note Caller should release newly allocated string using nns_edge_free().
- */
-char *
-nns_edge_strdup_printf (const char *format, ...)
-{
- char *new_str = NULL;
- va_list args;
- int len;
-
- va_start (args, format);
- len = vasprintf (&new_str, format, args);
- if (len < 0)
- new_str = NULL;
- va_end (args);
-
- return new_str;
-}
+#include "nnstreamer-edge-log.h"
+#include "nnstreamer-edge-util.h"
/**
* @brief Internal function to find node in the list.
* @author Gichan Jang <gichan2.jang@samsung.com>
* @bug No known bugs except for NYI items
* @note This file is internal header for nnstreamer edge utils. DO NOT export this file.
+ * @todo Rename this to nnstreamer-edge-meta after separating util functions.
*/
#ifndef __NNSTREAMER_EDGE_COMMON_H__
#define __NNSTREAMER_EDGE_COMMON_H__
#include <glib.h> /** @todo remove glib */
-#include <fcntl.h>
-#include <netinet/tcp.h>
-#include <netinet/in.h>
-#include <pthread.h>
-#include <unistd.h>
#include "nnstreamer-edge.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
-/**
- * @brief Utility to silence unused parameter warning for intentionally unused parameters (e.g., callback functions of a framework)
- */
-#ifndef UNUSED
-#define UNUSED(expr) do { (void)(expr); } while (0)
-#endif
-
-#define STR_IS_VALID(s) ((s) && (s)[0] != '\0')
-#define SAFE_FREE(p) do { if (p) { free (p); (p) = NULL; } } while (0)
-
-#define NNS_EDGE_MAGIC 0xfeedfeed
-#define NNS_EDGE_MAGIC_DEAD 0xdeaddead
-#define NNS_EDGE_MAGIC_IS_VALID(h) ((h) && (h)->magic == NNS_EDGE_MAGIC)
-
-#define nns_edge_lock_init(h) do { pthread_mutex_init (&(h)->lock, NULL); } while (0)
-#define nns_edge_lock_destroy(h) do { pthread_mutex_destroy (&(h)->lock); } while (0)
-#define nns_edge_lock(h) do { pthread_mutex_lock (&(h)->lock); } while (0)
-#define nns_edge_unlock(h) do { pthread_mutex_unlock (&(h)->lock); } while (0)
-
typedef void *nns_edge_broker_h;
/**
nns_edge_raw_data_s data;
} nns_edge_event_s;
-#define TAG_NAME "nnstreamer-edge"
-
-#if defined(__TIZEN__)
-#include <dlog.h>
-
-#define nns_edge_logd(...) dlog_print (DLOG_DEBUG, TAG_NAME, __VA_ARGS__)
-#define nns_edge_logi(...) dlog_print (DLOG_INFO, TAG_NAME, __VA_ARGS__)
-#define nns_edge_logw(...) dlog_print (DLOG_WARN, TAG_NAME, __VA_ARGS__)
-#define nns_edge_loge(...) dlog_print (DLOG_ERROR, TAG_NAME, __VA_ARGS__)
-#define nns_edge_logf(...) dlog_print (DLOG_FATAL, TAG_NAME, __VA_ARGS__)
-#elif defined(__ANDROID__)
-#include <android/log.h>
-
-#define nns_edge_logd(...) __android_log_print (ANDROID_LOG_DEBUG, TAG_NAME, __VA_ARGS__)
-#define nns_edge_logi(...) __android_log_print (ANDROID_LOG_INFO, TAG_NAME, __VA_ARGS__)
-#define nns_edge_logw(...) __android_log_print (ANDROID_LOG_WARN, TAG_NAME, __VA_ARGS__)
-#define nns_edge_loge(...) __android_log_print (ANDROID_LOG_ERROR, TAG_NAME, __VA_ARGS__)
-#define nns_edge_logf(...) __android_log_print (ANDROID_LOG_FATAL, TAG_NAME, __VA_ARGS__)
-#else
-/**
- * @brief Internal enumeration for log message.
- */
-typedef enum {
- NE_LOG_DEBUG = 0,
- NE_LOG_INFO,
- NE_LOG_WARNING,
- NE_LOG_ERROR,
- NE_LOG_FATAL,
- NE_LOG_NONE
-} nns_edge_log_level_e;
-
-/**
- * @brief Internal util function to print log message.
- */
-static inline void
-nns_edge_print_log (nns_edge_log_level_e level, const char *fmt, ...)
-{
- const char *level_str[] = {
- [NE_LOG_DEBUG] = "DEBUG",
- [NE_LOG_INFO] = "INFO",
- [NE_LOG_WARNING] = "WARNING",
- [NE_LOG_ERROR] = "ERROR",
- [NE_LOG_FATAL] = "FATAL",
- [NE_LOG_NONE] = "DEBUG",
- };
-
- va_list args;
-
- /** @todo expand log util and handle log level (debug, release) */
- va_start (args, fmt);
-
- printf ("[%s][%s] ", level_str[level], TAG_NAME);
- vprintf (fmt, args);
- printf ("\n");
-
- va_end (args);
-}
-
-#define nns_edge_logi(...) nns_edge_print_log (NE_LOG_INFO, __VA_ARGS__)
-#define nns_edge_logw(...) nns_edge_print_log (NE_LOG_WARNING, __VA_ARGS__)
-#define nns_edge_loge(...) nns_edge_print_log (NE_LOG_ERROR, __VA_ARGS__)
-#define nns_edge_logd(...) nns_edge_print_log (NE_LOG_DEBUG, __VA_ARGS__)
-#define nns_edge_logf(...) nns_edge_print_log (NE_LOG_FATAL, __VA_ARGS__)
-#endif
-
-/**
- * @brief Internal util function to get available port number.
- */
-int nns_edge_get_available_port (void);
-
-/**
- * @brief Get host string (host:port). Caller should release returned string using nns_edge_free().
- */
-char *nns_edge_get_host_string (const char *host, const int port);
-
-/**
- * @brief Parse string and get host string (host:port).
- */
-void nns_edge_parse_host_string (const char *host_str, char **host, int *port);
-
-/**
- * @brief Parse string and get port number. Return negative value when failed to get port number.
- */
-int nns_edge_parse_port_number (const char *port_str);
-
-/**
- * @brief Free allocated memory.
- */
-void nns_edge_free (void *data);
-
-/**
- * @brief Allocate new memory and copy bytes.
- * @note Caller should release newly allocated memory using nns_edge_free().
- */
-void *nns_edge_memdup (const void *data, size_t size);
-
-/**
- * @brief Allocate new memory and copy string.
- * @note Caller should release newly allocated string using nns_edge_free().
- */
-char *nns_edge_strdup (const char *str);
-
-/**
- * @brief Allocate new memory and copy bytes of string.
- * @note Caller should release newly allocated string using nns_edge_free().
- */
-char *nns_edge_strndup (const char *str, size_t len);
-
-/**
- * @brief Allocate new memory and print formatted string.
- * @note Caller should release newly allocated string using nns_edge_free().
- */
-char *nns_edge_strdup_printf (const char *format, ...);
-
/**
* @brief Internal function to initialize metadata structure.
*/
#include <netdb.h>
#include <sys/poll.h>
-#include "nnstreamer-edge-common.h"
+#include "nnstreamer-edge-log.h"
+#include "nnstreamer-edge-util.h"
#include "nnstreamer-edge-internal.h"
#define N_BACKLOG 10
--- /dev/null
+/* SPDX-License-Identifier: Apache-2.0 */
+/**
+ * Copyright (C) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+ *
+ * @file nnstreamer-edge-log.h
+ * @date 24 August 2022
+ * @brief Log util.
+ * @see https://github.com/nnstreamer/nnstreamer-edge
+ * @author Jaeyun Jung <jy1210.jung@samsung.com>
+ * @note This file is internal header for nnstreamer-edge. DO NOT export this file.
+ */
+
+#ifndef __NNSTREAMER_EDGE_LOG_H__
+#define __NNSTREAMER_EDGE_LOG_H__
+
+#include <stdio.h>
+#include <stdarg.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+#define TAG_NAME "nnstreamer-edge"
+
+#if defined(__TIZEN__)
+#include <dlog.h>
+
+#define nns_edge_logd(...) dlog_print (DLOG_DEBUG, TAG_NAME, __VA_ARGS__)
+#define nns_edge_logi(...) dlog_print (DLOG_INFO, TAG_NAME, __VA_ARGS__)
+#define nns_edge_logw(...) dlog_print (DLOG_WARN, TAG_NAME, __VA_ARGS__)
+#define nns_edge_loge(...) dlog_print (DLOG_ERROR, TAG_NAME, __VA_ARGS__)
+#define nns_edge_logf(...) dlog_print (DLOG_FATAL, TAG_NAME, __VA_ARGS__)
+#elif defined(__ANDROID__)
+#include <android/log.h>
+
+#define nns_edge_logd(...) __android_log_print (ANDROID_LOG_DEBUG, TAG_NAME, __VA_ARGS__)
+#define nns_edge_logi(...) __android_log_print (ANDROID_LOG_INFO, TAG_NAME, __VA_ARGS__)
+#define nns_edge_logw(...) __android_log_print (ANDROID_LOG_WARN, TAG_NAME, __VA_ARGS__)
+#define nns_edge_loge(...) __android_log_print (ANDROID_LOG_ERROR, TAG_NAME, __VA_ARGS__)
+#define nns_edge_logf(...) __android_log_print (ANDROID_LOG_FATAL, TAG_NAME, __VA_ARGS__)
+#else
+/**
+ * @brief Internal enumeration for log message.
+ */
+typedef enum {
+ NE_LOG_DEBUG = 0,
+ NE_LOG_INFO,
+ NE_LOG_WARNING,
+ NE_LOG_ERROR,
+ NE_LOG_FATAL,
+ NE_LOG_NONE
+} nns_edge_log_level_e;
+
+/**
+ * @brief Internal util function to print log message.
+ */
+static inline void
+nns_edge_print_log (nns_edge_log_level_e level, const char *fmt, ...)
+{
+ const char *level_str[] = {
+ [NE_LOG_DEBUG] = "DEBUG",
+ [NE_LOG_INFO] = "INFO",
+ [NE_LOG_WARNING] = "WARNING",
+ [NE_LOG_ERROR] = "ERROR",
+ [NE_LOG_FATAL] = "FATAL",
+ [NE_LOG_NONE] = "DEBUG",
+ };
+
+ va_list args;
+
+ /** @todo expand log util and handle log level (debug, release) */
+ va_start (args, fmt);
+
+ printf ("[%s][%s] ", level_str[level], TAG_NAME);
+ vprintf (fmt, args);
+ printf ("\n");
+
+ va_end (args);
+}
+
+#define nns_edge_logi(...) nns_edge_print_log (NE_LOG_INFO, __VA_ARGS__)
+#define nns_edge_logw(...) nns_edge_print_log (NE_LOG_WARNING, __VA_ARGS__)
+#define nns_edge_loge(...) nns_edge_print_log (NE_LOG_ERROR, __VA_ARGS__)
+#define nns_edge_logd(...) nns_edge_print_log (NE_LOG_DEBUG, __VA_ARGS__)
+#define nns_edge_logf(...) nns_edge_print_log (NE_LOG_FATAL, __VA_ARGS__)
+#endif
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* __NNSTREAMER_EDGE_LOG_H__ */
#error "This file can be built with Paho MQTT library."
#endif
-#include <unistd.h>
#include <MQTTAsync.h>
-#include "nnstreamer-edge-common.h"
#include "nnstreamer-edge-internal.h"
+#include "nnstreamer-edge-log.h"
+#include "nnstreamer-edge-util.h"
/**
* @brief Data structure for mqtt broker handle.
UNUSED (topic);
UNUSED (topic_len);
- UNUSED (message);
eh = (nns_edge_handle_s *) context;
if (!NNS_EDGE_MAGIC_IS_VALID (eh) || !eh->broker_h) {
--- /dev/null
+/* SPDX-License-Identifier: Apache-2.0 */
+/**
+ * Copyright (C) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+ *
+ * @file nnstreamer-edge-util.c
+ * @date 24 August 2022
+ * @brief Utility functions.
+ * @see https://github.com/nnstreamer/nnstreamer-edge
+ * @author Jaeyun Jung <jy1210.jung@samsung.com>
+ */
+
+#define _GNU_SOURCE
+#include <stdio.h>
+
+#include "nnstreamer-edge-log.h"
+#include "nnstreamer-edge-util.h"
+
+/**
+ * @brief Internal util function to get available port number.
+ */
+int
+nns_edge_get_available_port (void)
+{
+ struct sockaddr_in sin;
+ int port = 0, sock;
+ socklen_t len = sizeof (struct sockaddr);
+
+ sin.sin_family = AF_INET;
+ sin.sin_addr.s_addr = INADDR_ANY;
+ sin.sin_port = 0;
+
+ sock = socket (AF_INET, SOCK_STREAM, 0);
+ if (sock < 0) {
+ nns_edge_loge ("Failed to get available port, socket creation failure.");
+ return 0;
+ }
+
+ if (bind (sock, (struct sockaddr *) &sin, sizeof (struct sockaddr)) == 0) {
+ if (getsockname (sock, (struct sockaddr *) &sin, &len) == 0) {
+ port = ntohs (sin.sin_port);
+ nns_edge_logi ("Available port number: %d", port);
+ } else {
+ nns_edge_logw ("Failed to read local socket info.");
+ }
+ }
+ close (sock);
+
+ return port;
+}
+
+/**
+ * @brief Get host string (host:port). Caller should release returned string using nns_edge_free().
+ */
+char *
+nns_edge_get_host_string (const char *host, const int port)
+{
+ return nns_edge_strdup_printf ("%s:%d", host, port);
+}
+
+/**
+ * @brief Parse string and get host string (host:port).
+ */
+void
+nns_edge_parse_host_string (const char *host_str, char **host, int *port)
+{
+ char *p = strchr (host_str, ':');
+
+ if (p) {
+ *host = nns_edge_strndup (host_str, (p - host_str));
+ *port = (int) strtoll (p + 1, NULL, 10);
+ }
+}
+
+/**
+ * @brief Parse string and get port number. Return negative value when failed to get port number.
+ */
+int
+nns_edge_parse_port_number (const char *port_str)
+{
+ int port;
+
+ if (!port_str)
+ return -1;
+
+ port = (int) strtoll (port_str, NULL, 10);
+
+ if (port <= 0 || port > 65535) {
+ nns_edge_loge ("Invalid port number %d.", port);
+ port = -1;
+ }
+
+ return port;
+}
+
+/**
+ * @brief Free allocated memory.
+ */
+void
+nns_edge_free (void *data)
+{
+ if (data)
+ free (data);
+}
+
+/**
+ * @brief Allocate new memory and copy bytes.
+ * @note Caller should release newly allocated memory using nns_edge_free().
+ */
+void *
+nns_edge_memdup (const void *data, size_t size)
+{
+ void *mem = NULL;
+
+ if (data && size > 0) {
+ mem = malloc (size);
+
+ if (mem) {
+ memcpy (mem, data, size);
+ } else {
+ nns_edge_loge ("Failed to allocate memory (%zd).", size);
+ }
+ }
+
+ return mem;
+}
+
+/**
+ * @brief Allocate new memory and copy string.
+ * @note Caller should release newly allocated string using nns_edge_free().
+ */
+char *
+nns_edge_strdup (const char *str)
+{
+ char *new_str = NULL;
+
+ if (str)
+ new_str = nns_edge_strndup (str, strlen (str));
+
+ return new_str;
+}
+
+/**
+ * @brief Allocate new memory and copy bytes of string.
+ * @note Caller should release newly allocated string using nns_edge_free().
+ */
+char *
+nns_edge_strndup (const char *str, size_t len)
+{
+ char *new_str = NULL;
+
+ if (str) {
+ new_str = (char *) malloc (len + 1);
+
+ if (new_str) {
+ strncpy (new_str, str, len);
+ new_str[len] = '\0';
+ } else {
+ nns_edge_loge ("Failed to allocate memory (%zd).", len + 1);
+ }
+ }
+
+ return new_str;
+}
+
+/**
+ * @brief Allocate new memory and print formatted string.
+ * @note Caller should release newly allocated string using nns_edge_free().
+ */
+char *
+nns_edge_strdup_printf (const char *format, ...)
+{
+ char *new_str = NULL;
+ va_list args;
+ int len;
+
+ va_start (args, format);
+ len = vasprintf (&new_str, format, args);
+ if (len < 0)
+ new_str = NULL;
+ va_end (args);
+
+ return new_str;
+}
--- /dev/null
+/* SPDX-License-Identifier: Apache-2.0 */
+/**
+ * Copyright (C) 2022 Samsung Electronics Co., Ltd. All Rights Reserved.
+ *
+ * @file nnstreamer-edge-util.h
+ * @date 24 August 2022
+ * @brief Utility functions.
+ * @see https://github.com/nnstreamer/nnstreamer-edge
+ * @author Jaeyun Jung <jy1210.jung@samsung.com>
+ * @note This file is internal header for nnstreamer-edge. DO NOT export this file.
+ */
+
+#ifndef __NNSTREAMER_EDGE_UTIL_H__
+#define __NNSTREAMER_EDGE_UTIL_H__
+
+#include <netinet/tcp.h>
+#include <netinet/in.h>
+#include <pthread.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/**
+ * @brief Utility to silence unused parameter warning for intentionally unused parameters (e.g., callback functions of a framework)
+ */
+#ifndef UNUSED
+#define UNUSED(expr) do { (void)(expr); } while (0)
+#endif
+
+#define STR_IS_VALID(s) ((s) && (s)[0] != '\0')
+#define SAFE_FREE(p) do { if (p) { free (p); (p) = NULL; } } while (0)
+
+#define NNS_EDGE_MAGIC 0xfeedfeed
+#define NNS_EDGE_MAGIC_DEAD 0xdeaddead
+#define NNS_EDGE_MAGIC_IS_VALID(h) ((h) && (h)->magic == NNS_EDGE_MAGIC)
+
+#define nns_edge_lock_init(h) do { pthread_mutex_init (&(h)->lock, NULL); } while (0)
+#define nns_edge_lock_destroy(h) do { pthread_mutex_destroy (&(h)->lock); } while (0)
+#define nns_edge_lock(h) do { pthread_mutex_lock (&(h)->lock); } while (0)
+#define nns_edge_unlock(h) do { pthread_mutex_unlock (&(h)->lock); } while (0)
+
+/**
+ * @brief Get available port number.
+ */
+int nns_edge_get_available_port (void);
+
+/**
+ * @brief Get host string (host:port). Caller should release returned string using nns_edge_free().
+ */
+char *nns_edge_get_host_string (const char *host, const int port);
+
+/**
+ * @brief Parse string and get host string (host:port).
+ */
+void nns_edge_parse_host_string (const char *host_str, char **host, int *port);
+
+/**
+ * @brief Parse string and get port number. Return negative value when failed to get port number.
+ */
+int nns_edge_parse_port_number (const char *port_str);
+
+/**
+ * @brief Free allocated memory.
+ */
+void nns_edge_free (void *data);
+
+/**
+ * @brief Allocate new memory and copy bytes.
+ * @note Caller should release newly allocated memory using nns_edge_free().
+ */
+void *nns_edge_memdup (const void *data, size_t size);
+
+/**
+ * @brief Allocate new memory and copy string.
+ * @note Caller should release newly allocated string using nns_edge_free().
+ */
+char *nns_edge_strdup (const char *str);
+
+/**
+ * @brief Allocate new memory and copy bytes of string.
+ * @note Caller should release newly allocated string using nns_edge_free().
+ */
+char *nns_edge_strndup (const char *str, size_t len);
+
+/**
+ * @brief Allocate new memory and print formatted string.
+ * @note Caller should release newly allocated string using nns_edge_free().
+ */
+char *nns_edge_strdup_printf (const char *format, ...);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* __NNSTREAMER_EDGE_UTIL_H__ */
#include "nnstreamer-edge.h"\r
#include "nnstreamer-edge-common.h"\r
#include "nnstreamer-edge-internal.h"\r
+#include "nnstreamer-edge-log.h"\r
+#include "nnstreamer-edge-util.h"\r
\r
/**\r
* @brief Data struct for unittest.\r