platform/upstream/nnstreamer-edge.git
10 months ago[Spec] Disable mqtt option for DA products accepted/tizen_7.0_unified tizen_7.0 accepted/tizen/7.0/unified/20240605.155448
Sangjung Woo [Mon, 27 May 2024 06:59:21 +0000 (15:59 +0900)]
[Spec] Disable mqtt option for DA products

This patch disables the mqtt option in the case of DA products.

Signed-off-by: Sangjung Woo <sangjung.woo@samsung.com>
11 months ago[spec] Fix lcov options for different Tizen/lcov versions accepted/tizen_8.0_unified tizen_8.0 accepted/tizen/7.0/unified/20240509.012438 accepted/tizen/8.0/unified/20240507.165648 accepted/tizen/unified/20240503.115758 accepted/tizen/unified/dev/20240620.010950 accepted/tizen/unified/toolchain/20240508.012357 accepted/tizen/unified/x/20240507.050944 accepted/tizen/unified/x/asan/20240625.091934
Yongjoo Ahn [Tue, 30 Apr 2024 06:43:32 +0000 (15:43 +0900)]
[spec] Fix lcov options for different Tizen/lcov versions

- Set proper lcov options w.r.t. Tizen/lcov versions.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
12 months ago[common] Let edge wait listener thread to be started. sandbox/sangjung/tizen_7_backport accepted/tizen/7.0/unified/20240426.015347 accepted/tizen/8.0/unified/20240424.115823 accepted/tizen/unified/20240425.114316 accepted/tizen/unified/toolchain/20240427.045726 accepted/tizen/unified/x/20240426.050336
Yongjoo Ahn [Tue, 16 Apr 2024 08:59:59 +0000 (17:59 +0900)]
[common] Let edge wait listener thread to be started.

- Let the edge wait listener_thread to be properly started.
- This fix occasional hangs when nns_edge_release_handle called.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
12 months ago[Github] Add issue and pull request templates accepted/tizen/unified/20240402.061259 accepted/tizen/unified/x/20240402.093406
seungha son [Thu, 28 Mar 2024 02:16:56 +0000 (11:16 +0900)]
[Github] Add issue and pull request templates

 This PR is to create a templates to autemate issue and PR process.
 Issue and PR templates still use the format of the parent project, nnstreamer, for uniformity.
 (https://github.com/nnstreamer/nnstreamer/tree/main/.github)

Signed-off-by: seungha son <seungha.son@samsung.com>
12 months ago[Edge] Add checking return value
seungha son [Thu, 28 Mar 2024 03:29:04 +0000 (12:29 +0900)]
[Edge] Add checking return value

 In _nns_edge_transfer_data(), there is no checking return value.
 It is difficult to check when a problem occurs during the data transmission process,
 so check return values and add logs when problems occur.

Signed-off-by: seungha son <seungha.son@samsung.com>
13 months ago[Tizen] Fix gcov build error accepted/tizen/unified/20240319.141110 accepted/tizen/unified/20240319.154850 accepted/tizen/unified/20240326.105104 accepted/tizen/unified/x/20240320.132902 accepted/tizen/unified/x/20240327.044847
gichan2-jang [Tue, 19 Mar 2024 01:33:01 +0000 (10:33 +0900)]
[Tizen] Fix gcov build error

Due to the lcov 2.0 upgrade, the warning is changed to error so the gcov build fails.
Ignore this case. (Tizen PM guide)

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
13 months ago[AITT] Remove AITT
gichan2-jang [Mon, 11 Mar 2024 09:42:56 +0000 (18:42 +0900)]
[AITT] Remove AITT

Remove AITT connection from nnstreamer-edge because AITT is removed from Tizen platform.
* Remove nnstreamer-edge-aitt.c later.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
13 months agogithub-action/gbs: Build nnstreamer-edge based all architecture accepted/tizen/unified/20240319.020738 accepted/tizen/unified/x/20240320.055257
linuxias [Tue, 27 Feb 2024 14:10:52 +0000 (23:10 +0900)]
github-action/gbs: Build nnstreamer-edge based all architecture

 Current, build only x86-64 architecture. This patch is to support
 to build x86_64, i586, armv7l aarch64 architecture

Signed-off-by: linuxias <linuxias@gmail.com>
14 months ago[MQTT] clearly set null when closing connection
Jaeyun Jung [Mon, 5 Feb 2024 09:43:06 +0000 (18:43 +0900)]
[MQTT] clearly set null when closing connection

Clearly set connection state and handle when closing MQTT connection.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[Build] nns-edge version info accepted/tizen_unified_riscv accepted/tizen/unified/20240105.012957 accepted/tizen/unified/20240119.154759 accepted/tizen/unified/riscv/20240105.060117
Jaeyun Jung [Thu, 7 Dec 2023 12:06:20 +0000 (21:06 +0900)]
[Build] nns-edge version info

Update build script to set version info.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[bugfix] Modify dlog output code
hyunil park [Wed, 18 Oct 2023 05:16:54 +0000 (14:16 +0900)]
[bugfix] Modify dlog output code

When outputting dlog using dlogutil in Tizen, garbage values are output
in the format starting with %

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
16 months ago[Common] wait for thread with lock accepted/tizen/unified/20231213.162138 accepted/tizen/unified/riscv/20231215.050244
Jaeyun Jung [Fri, 1 Dec 2023 09:04:40 +0000 (18:04 +0900)]
[Common] wait for thread with lock

Add lock to wait for creating new thread for data transfer.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[CodeClean] cleanup unnecessary line
Jaeyun Jung [Fri, 1 Dec 2023 09:03:03 +0000 (18:03 +0900)]
[CodeClean] cleanup unnecessary line

Code clean, update log message and remove unnecessary line.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
16 months ago[AITT] find library using pkgconfig
Jaeyun Jung [Mon, 4 Dec 2023 09:15:37 +0000 (18:15 +0900)]
[AITT] find library using pkgconfig

Use pkgconfig to find AITT library.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Common] max memories in nns-edge
Jaeyun Jung [Mon, 6 Nov 2023 09:02:25 +0000 (18:02 +0900)]
[Common] max memories in nns-edge

nnstreamer now supports max 256 tensors in the buffer.
Increase max memories in nnstreamer-edge handle.

TODO:
We will fix the util functions in edge elements of nnstreamer, to handle memories in gst-buffer.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
17 months ago[Hybrid] Reconnect to available node
gichan2-jang [Tue, 31 Oct 2023 08:22:06 +0000 (17:22 +0900)]
[Hybrid] Reconnect to available node

If current connection is lost, find availabe node and reconnect.
Previously, This recovery work is done by user application.
Let's make the users don't care about this work when using MQTT-HYBRID.

*edgesrc and tensor_query_* should be updated after this change.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
17 months ago[Edge] Add cond for nns_edge_handle accepted/tizen/unified/20231110.172145
Yongjoo Ahn [Fri, 27 Oct 2023 10:28:02 +0000 (19:28 +0900)]
[Edge] Add cond for nns_edge_handle

- Add a pthread_cond for nns_edge_handle. And let the start method wait
  for the cond to be signaled by send_thread.
- This prevents some race conditions when APIs are used while
  send_thread is not yet started.

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
18 months ago[bugfix] Set available port when user set port to '0'
hyunil park [Wed, 18 Oct 2023 00:50:53 +0000 (09:50 +0900)]
[bugfix] Set available port when user set port to '0'

- set available port when user set port to '0'
- ml service api set '0' as the default port if the port isn't set
  but '0' is an invalid port

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
18 months ago[Test] Add queue fixture class
linuxias [Fri, 13 Oct 2023 01:43:24 +0000 (10:43 +0900)]
[Test] Add queue fixture class

 nns_edge_queue_h handle is always used tests related queue.
 Using the fixture provided by gtest, the redundant code is
 eliminated by separating repetitive tasks of allocating and
 releasing queue handles.

Signed-off-by: linuxias <linuxias@gmail.com>
18 months ago[Queue] Unify return format to nns_edge_error_e
linuxias [Mon, 9 Oct 2023 20:47:34 +0000 (05:47 +0900)]
[Queue] Unify return format to nns_edge_error_e

 The return type is changed from boolean to nns_edge_error_e type
 in the same way as other modules. These changes provide uniformity
 when using APIs, reducing confusion for developers.

Signed-off-by: linuxias <linuxias@gmail.com>
19 months ago[Edge] Add metadata creation exception handling
seungha son [Fri, 22 Sep 2023 04:23:34 +0000 (13:23 +0900)]
[Edge] Add metadata creation exception handling

 It is necessary to consider the case of failing to generate Metadata
 when creating the Edge handle. It is not good to deliver Edge handles
 that have not been created normally to the user.

Signed-off-by: seungha son <linuxias@gmail.com>
19 months ago[Edge] Remove '[DEBUG]' log format string
seungha son [Fri, 22 Sep 2023 05:03:54 +0000 (14:03 +0900)]
[Edge] Remove '[DEBUG]' log format string

 [DEBUG] string is unnecessary, nns_edge_logd() function
 display DEBUG log level with log.

Signed-off-by: seungha son <linuxias@gmail.com>
19 months ago[AITT] Add publish_full
gichan2-jang [Fri, 15 Sep 2023 07:46:44 +0000 (16:46 +0900)]
[AITT] Add publish_full

 - Add publish_full
 - Set default protocol as AITT_TCP

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
19 months ago[Release] start impl for next release
Jaeyun Jung [Fri, 15 Sep 2023 09:35:46 +0000 (18:35 +0900)]
[Release] start impl for next release

Update version, start implementation for next release.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
19 months ago[CodeClean] validate str param sandbox/sangjung/tizen_8_backup accepted/tizen/8.0/unified/20231005.095249 accepted/tizen/unified/20230915.160553 tizen_8.0_m2_release
Jaeyun Jung [Fri, 15 Sep 2023 04:55:09 +0000 (13:55 +0900)]
[CodeClean] validate str param

Code clean, macro to check input param.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
19 months ago[AITT] set/get option for AITT
gichan2-jang [Wed, 13 Sep 2023 08:07:09 +0000 (17:07 +0900)]
[AITT] set/get option for AITT

 - Add set/get option of AITT.
 - Add releated unittests.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
create aitt handle with edge handle

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
19 months ago[Release] update version accepted/tizen/unified/20230912.171646
Jaeyun Jung [Tue, 12 Sep 2023 03:39:43 +0000 (12:39 +0900)]
[Release] update version

Update version to 0.2.4, Tizen M2 release.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
19 months ago[Cmd] version info in buffer accepted/tizen/unified/20230907.175335
Jaeyun Jung [Thu, 7 Sep 2023 06:58:41 +0000 (15:58 +0900)]
[Cmd] version info in buffer

Add version info while sending and receiving buffer between edge connection.

TODO:
Now max memories in edge-data is 16. Check the limit when updating this definition.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
19 months ago[MQTT] function to clear retained msg
Jaeyun Jung [Thu, 7 Sep 2023 07:10:27 +0000 (16:10 +0900)]
[MQTT] function to clear retained msg

Add function to clear retained message, and set wait-time interval.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
19 months ago[MQTT] Wait until removing the retained message.
gichan2-jang [Wed, 16 Aug 2023 09:29:30 +0000 (18:29 +0900)]
[MQTT] Wait until removing the retained message.

Change to wait until removing the retained message.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
19 months ago[Util] macro to wait condition accepted/tizen/unified/20230830.170545
Jaeyun Jung [Mon, 21 Aug 2023 08:54:37 +0000 (17:54 +0900)]
[Util] macro to wait condition

Update macro to wait timed-out condition.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
20 months ago[Tag] fix doxygen error
Jaeyun Jung [Mon, 21 Aug 2023 08:14:48 +0000 (17:14 +0900)]
[Tag] fix doxygen error

Code clean, fix indent and doxygen error from CI.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
20 months ago[MQTT] update handle name
Jaeyun Jung [Mon, 21 Aug 2023 08:09:41 +0000 (17:09 +0900)]
[MQTT] update handle name

Code clean, update param name - broker handle.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
20 months ago[Util] function to get version accepted/tizen/unified/20230818.183541
Jaeyun Jung [Mon, 14 Aug 2023 10:46:49 +0000 (19:46 +0900)]
[Util] function to get version

Add util function to get the version of nnstreamer-edge.

TODO:
Add version info while sending or receiving data between the connected devices.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
20 months ago[Data] Add data and info clear function
gichan2-jang [Mon, 14 Aug 2023 07:34:22 +0000 (16:34 +0900)]
[Data] Add data and info clear function

Add function to clear raw data and info of edge data.
This does not release the edge data handle.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
20 months ago[Cmd] use fixed size in cmd struct
Jaeyun Jung [Mon, 14 Aug 2023 10:50:57 +0000 (19:50 +0900)]
[Cmd] use fixed size in cmd struct

Internal fix to set fixed size of edge-cmd struct.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
20 months ago[CodeClean] fix typo
Jaeyun Jung [Fri, 4 Aug 2023 11:34:31 +0000 (20:34 +0900)]
[CodeClean] fix typo

Code clean, fix typo in edge header.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
20 months ago[Build] install path for header
Jaeyun Jung [Fri, 4 Aug 2023 09:44:28 +0000 (18:44 +0900)]
[Build] install path for header

Update install path of nns-edge header.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
21 months ago[README] Modify guidelines for Build and Run test accepted/tizen/unified/20230727.173054
hyunil park [Wed, 12 Jul 2023 05:01:52 +0000 (14:01 +0900)]
[README] Modify guidelines for Build and Run test

When the user builds nnstreamer-edge directly, pkgconfig is installed in the "/" path.
Therefore, -DCMAKE_INSTALL_LIBDIR must be set together.

Signed-off-by: hyunil park <hyunil46.park@samsung.com>
21 months agoAdd connection check API
gichan2-jang [Fri, 14 Jul 2023 00:47:58 +0000 (09:47 +0900)]
Add connection check API

Adds API that checks the connection of given edge handle.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
22 months ago[Test] negative case to set mqtt event accepted/tizen/unified/20230628.023658
Jaeyun Jung [Tue, 13 Jun 2023 09:38:21 +0000 (18:38 +0900)]
[Test] negative case to set mqtt event

Add negative test of set-event in mqtt impl.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
22 months ago[Build] start devel of 0.2.3
Jaeyun Jung [Tue, 13 Jun 2023 08:57:08 +0000 (17:57 +0900)]
[Build] start devel of 0.2.3

Update version, devel v2.3.0 for Tizen 8.0.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
22 months agoRelease of 0.2.2, LTS for TizenRT sandbox/sangjung/tizen_7_backup accepted/tizen/7.0/unified/20230621.051154 accepted/tizen/unified/20230609.163739
gichan2-jang [Fri, 2 Jun 2023 03:48:28 +0000 (12:48 +0900)]
Release of 0.2.2, LTS for TizenRT

This is new LTS release for TizenRT.

Signed-off-by: gichan2-jang <gichan2.jang@samsung.com>
23 months ago[CodeClean] remove unnecessary code
Jaeyun Jung [Tue, 2 May 2023 07:51:28 +0000 (16:51 +0900)]
[CodeClean] remove unnecessary code

Code clean, fix indent and remove unnecessary lines.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
2 years ago[Tizen] Exclude test files for SAM
gichan [Mon, 24 Apr 2023 05:52:39 +0000 (14:52 +0900)]
[Tizen] Exclude test files for SAM

Exclude test files for SAM

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Socket] use getaddrinfo to fill socketaddr accepted/tizen/unified/20230424.185346
Jaeyun Jung [Fri, 21 Apr 2023 08:12:58 +0000 (17:12 +0900)]
[Socket] use getaddrinfo to fill socketaddr

Fix svace issue. The function gethostbyname is unsafe function, use getaddrinfo instead.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
2 years ago[Build] Move NNS_EDGE_LIB_NAME variable to root CMakeLists.txt
Seungha Son [Thu, 6 Apr 2023 15:16:31 +0000 (00:16 +0900)]
[Build] Move NNS_EDGE_LIB_NAME variable to root CMakeLists.txt

 Move the NNS_EDGE_LIB_NAME variable from the src/CMakeLists.txt to
 CMakeLists.txt in the root directory.
 Since the nnstreamer-edge value is also referenced in the
 tests/CMakeLists.txt file, change the variable to use in common to
 minimize human errors.

Signed-off-by: Seungha Son <linuxias@gmail.com>
2 years ago[Edge] Remove unnecessary pthread attribute. accepted/tizen/unified/20230413.123719
gichan [Thu, 6 Apr 2023 09:37:39 +0000 (18:37 +0900)]
[Edge] Remove unnecessary pthread attribute.

'JOINABLE' is the default atribute of the pthread, so remove the attribute.
 *note: Some TizenRT board don't support this option.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Edge] Initialize caps
gichan [Tue, 4 Apr 2023 02:02:51 +0000 (11:02 +0900)]
[Edge] Initialize caps

Initialize caps when creating edge handler.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[MQTT] Change timeout for getting message from mqtt broker
gichan [Tue, 4 Apr 2023 01:59:07 +0000 (10:59 +0900)]
[MQTT] Change timeout for getting message from mqtt broker

Change timeout for getting message from mqtt broker.
 default timeout: 0 (infinite timeout)

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Git] Add ignore list related with CMake
Seungha Son [Sat, 1 Apr 2023 15:32:14 +0000 (00:32 +0900)]
[Git] Add ignore list related with CMake

 This patch is to ignore cmake related files generated after the build.

Signed-off-by: Seungha Son <linuxias@gmail.com>
2 years ago[Test] fix memory leak
Seungha Son [Sat, 1 Apr 2023 15:54:29 +0000 (00:54 +0900)]
[Test] fix memory leak

 When running the test, the memory is not released,
 fx the memory-leak by releasing the memory before the end of the test.

Signed-off-by: Seungha Son <linuxias@gmail.com>
2 years ago[README] Add quick start guide
gichan [Wed, 29 Mar 2023 06:41:13 +0000 (15:41 +0900)]
[README] Add quick start guide

Add quick start guide
 - install nnstreamer-edge via ppa
 - build and run unit tests

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[CodeClean] fix res leak case accepted/tizen/unified/20230321.123157
Jaeyun Jung [Mon, 20 Mar 2023 09:01:45 +0000 (18:01 +0900)]
[CodeClean] fix res leak case

Fix svace issues, handle res leak.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
2 years ago[CodeClean] handle error case
Jaeyun Jung [Mon, 20 Mar 2023 05:08:14 +0000 (14:08 +0900)]
[CodeClean] handle error case

Handle error case, add line comment and fix build error.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
2 years ago[Api] flag to check state - started
Jaeyun Jung [Mon, 20 Mar 2023 05:00:57 +0000 (14:00 +0900)]
[Api] flag to check state - started

Add internal flag to check edge-handle is started.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
2 years ago[Connection] remove conn-type udp
Jaeyun Jung [Mon, 20 Mar 2023 04:56:53 +0000 (13:56 +0900)]
[Connection] remove conn-type udp

Remove enum - UDP connection, nnstreamer-edge handles TCP connection only.

Signed-off-by: Jaeyun Jung <jy1210.jung@samsung.com>
2 years ago[MQTT] Support MQTT direct data transmission
gichan [Mon, 13 Mar 2023 07:44:23 +0000 (16:44 +0900)]
[MQTT] Support MQTT direct data transmission

 - Support MQTT direct data transmission.
 - Add unit test for mqtt

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[TizenRT] Remove object file when cleaning
gichan [Tue, 14 Mar 2023 08:39:30 +0000 (17:39 +0900)]
[TizenRT] Remove object file when cleaning

Remove object files that are the result of TizenRT build when cleaning.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[MQTT] Change queue name
gichan [Mon, 13 Mar 2023 07:45:27 +0000 (16:45 +0900)]
[MQTT] Change queue name

Change queue name from server_list to message_queue.
Change to general name to handle not only server information but also the raw data.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Queue] clear data when releasing the queue accepted/tizen/unified/20230118.172041
Jaeyun [Thu, 12 Jan 2023 16:17:04 +0000 (01:17 +0900)]
[Queue] clear data when releasing the queue

Code clean, remove duplicated code to clear data.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years agoChange queue of the sending thread
gichan [Wed, 4 Jan 2023 05:45:48 +0000 (14:45 +0900)]
Change queue of the sending thread

 - Release send queue after the send thread is finished.
 - Add new function to clear the data in the queue.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years agoSafe momory free
gichan [Tue, 3 Jan 2023 07:38:09 +0000 (16:38 +0900)]
Safe momory free

Set NULL after release the memory.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Common] fix ret code after creating a thread
Jaeyun [Tue, 3 Jan 2023 09:17:31 +0000 (18:17 +0900)]
[Common] fix ret code after creating a thread

Fix returned code after creating a thread.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Connect] flag to check sending thread
Jaeyun [Tue, 3 Jan 2023 10:33:00 +0000 (19:33 +0900)]
[Connect] flag to check sending thread

1. Add flag to check sending thread.
2. Init data ptr and size in the queue.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Data] util to check serialized data accepted/tizen/unified/20221226.070011
Jaeyun [Tue, 6 Dec 2022 11:00:29 +0000 (20:00 +0900)]
[Data] util to check serialized data

Add util function to check serialized data ptr.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Build] build option tizen
Jaeyun [Thu, 20 Oct 2022 08:29:51 +0000 (17:29 +0900)]
[Build] build option tizen

Add flag - build on Tizen and add dependency to dlog.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[MQTT/temporal] Change log level
gichan [Wed, 7 Dec 2022 06:16:31 +0000 (15:16 +0900)]
[MQTT/temporal] Change log level

Change log level fron info to debug.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[CodeClean/Handle] internal struct for handle
Jaeyun [Mon, 5 Dec 2022 11:21:39 +0000 (20:21 +0900)]
[CodeClean/Handle] internal struct for handle

Code clean, move definition for internal data struct and cleanup headers.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Test] remove unnecessary info
Jaeyun [Tue, 6 Dec 2022 09:18:27 +0000 (18:18 +0900)]
[Test] remove unnecessary info

Code clean, remove unnecessary host info to run mqtt connection.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Handle] macro to check handle
Jaeyun [Mon, 5 Dec 2022 10:40:11 +0000 (19:40 +0900)]
[Handle] macro to check handle

Macro to check handle in nns-edge.
The magic key would be changed when a handle is destroyed. If handle is not valid, its mutex lock is also invalid.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[AITT] separate handle
Jaeyun [Fri, 2 Dec 2022 09:09:12 +0000 (18:09 +0900)]
[AITT] separate handle

Separate AITT handle and update related code, to remove dependency to nns-edge handle.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[CodeClean/Queue] handle data size
Jaeyun [Tue, 22 Nov 2022 10:38:28 +0000 (19:38 +0900)]
[CodeClean/Queue] handle data size

Code clean, prepare next PR. Handle data size of queue.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[CodeClean/MQTT] broker handle
Jaeyun [Mon, 21 Nov 2022 10:20:01 +0000 (19:20 +0900)]
[CodeClean/MQTT] broker handle

Code clean, add broker handle and revise MQTT functions.
This will remove dependency to edge-handle in MQTT impl.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[CodeClean/Event] util to invoke event
Jaeyun [Fri, 2 Dec 2022 06:16:05 +0000 (15:16 +0900)]
[CodeClean/Event] util to invoke event

Add util function to invoke edge-event callback.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[CodeClean/Data] param to deserialize edge-data
Jaeyun [Fri, 2 Dec 2022 03:27:22 +0000 (12:27 +0900)]
[CodeClean/Data] param to deserialize edge-data

Code clean,
1. handle data size to deserailze edge data.
2. Fix typo and revise testcases.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[CodeClean/AITT] unnecessary aitt handle type
Jaeyun [Thu, 1 Dec 2022 10:01:58 +0000 (19:01 +0900)]
[CodeClean/AITT] unnecessary aitt handle type

Code clean,
1. change aitt-handle (handle in aitt header)
2. update log message

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[CodeClean] error case in mosquitto impl
Jaeyun [Wed, 2 Nov 2022 01:33:40 +0000 (10:33 +0900)]
[CodeClean] error case in mosquitto impl

Code clean, handle error case if failed to create mosquitto handle.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Util] util function to allocate memory
Jaeyun [Fri, 18 Nov 2022 09:10:39 +0000 (18:10 +0900)]
[Util] util function to allocate memory

Fix svace issue - size limit to allocate memory.

Add util function for mem allocation, checking max size before calling malloc.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Data] wrapper function to release data handle
Jaeyun [Tue, 1 Nov 2022 02:28:53 +0000 (11:28 +0900)]
[Data] wrapper function to release data handle

Code clean, add wrapper function to release edge-data handle.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[CodeClean] invalid arg type
Jaeyun [Fri, 18 Nov 2022 08:20:27 +0000 (17:20 +0900)]
[CodeClean] invalid arg type

Fix svace issue, size_t in nns-edge was changed to unsigned int 64. Fix invalid arg type to print log.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[AITT] fix param type accepted/tizen/unified/20221115.172904
Jaeyun [Wed, 9 Nov 2022 11:40:59 +0000 (20:40 +0900)]
[AITT] fix param type

Fix build error, AITT updated param type in subsribe callback.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[build] Add nnstreamer-edge-log.c to android build
Yongjoo Ahn [Thu, 10 Nov 2022 09:44:01 +0000 (18:44 +0900)]
[build] Add nnstreamer-edge-log.c to android build

- Add the source file to the source list in Android.mk

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[build] Add DEBUG macro value as 0 if it is not defined
Yongjoo Ahn [Thu, 10 Nov 2022 09:43:07 +0000 (18:43 +0900)]
[build] Add DEBUG macro value as 0 if it is not defined

- Add DEBUG macro value as 0 if it is not defined before

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years agoCMake: FATAL_ERROR should not be in message string.
MyungJoo Ham [Wed, 2 Nov 2022 09:43:39 +0000 (18:43 +0900)]
CMake: FATAL_ERROR should not be in message string.

It should be given as the optional mode argument.
Refer to https://cmake.org/cmake/help/v3.0/command/message.html

Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
2 years ago[Queue] fix mem leak case
Jaeyun [Tue, 1 Nov 2022 02:25:54 +0000 (11:25 +0900)]
[Queue] fix mem leak case

Code clean,
1. fix mem leak case - max buffer in queue.
2. use common destroy callback.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[README] Add daily build badge
gichan [Wed, 2 Nov 2022 06:49:52 +0000 (15:49 +0900)]
[README] Add daily build badge

Add dailt build badge
 - target: tizen, tizenRT, ubuntu

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Test] invalid function in aitt test
Jaeyun [Wed, 2 Nov 2022 07:06:39 +0000 (16:06 +0900)]
[Test] invalid function in aitt test

Fix invalid function in aitt testcase.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[CodeClean] unnecessary cond
Jaeyun [Tue, 1 Nov 2022 02:27:22 +0000 (11:27 +0900)]
[CodeClean] unnecessary cond

Code clean, remove unnecessary condition and fix var type.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[TizenRT] Build mqtt-hybrid on TizenRT
gichan [Thu, 27 Oct 2022 03:05:43 +0000 (12:05 +0900)]
[TizenRT] Build mqtt-hybrid on TizenRT

 - Build mqtt-hybrid on TizenRT.
 - exclude qemu/build_test and mxrt1050-evk/loadable_elf_apps since they
are not supporting mqtt feature.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[MQTT] Change mqtt lib priority
gichan [Tue, 25 Oct 2022 07:04:18 +0000 (16:04 +0900)]
[MQTT] Change mqtt lib priority

Change mosquitto lib to have a higher priority than paho-mqtt-c lib.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Queue] leaky option
Jaeyun [Wed, 19 Oct 2022 07:16:51 +0000 (16:16 +0900)]
[Queue] leaky option

Add leaky option in nns-edge queue.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[build] Add android.mk file for Android build
Yongjoo Ahn [Mon, 17 Oct 2022 07:49:51 +0000 (16:49 +0900)]
[build] Add android.mk file for Android build

- Add `android.mk` file for NNStreamer Android build

Signed-off-by: Yongjoo Ahn <yongjoo1.ahn@samsung.com>
2 years ago[MQTT] Implement mqtt using mosquitto lib
gichan [Mon, 17 Oct 2022 09:41:50 +0000 (18:41 +0900)]
[MQTT] Implement mqtt using mosquitto lib

Implement mqtt using moosquitto lib.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Log] set log level
Jaeyun [Thu, 20 Oct 2022 08:39:37 +0000 (17:39 +0900)]
[Log] set log level

Add new function to set log level.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years agoFixate the data size
gichan [Thu, 13 Oct 2022 02:40:45 +0000 (11:40 +0900)]
Fixate the data size

An error occurs in the communication because of different data sizes in the 32-bit and the 64-bit systems. Fixate the data size.
The type of size variable is set to 64bit as the default.

Tested using 32bit Tizen TV and 64bit Ubuntu.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years agoFix build error in Tizen tv profile.
gichan [Wed, 12 Oct 2022 03:05:18 +0000 (12:05 +0900)]
Fix build error in Tizen tv profile.

Fix build error in Tizen tv profile.
 - Fix incompatible variable and function types.

Signed-off-by: gichan <gichan2.jang@samsung.com>
2 years ago[Doxygen] add missed tag
Jaeyun [Thu, 13 Oct 2022 09:12:21 +0000 (18:12 +0900)]
[Doxygen] add missed tag

Fix doxygen error, add missed tag (bug).

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[Queue] limit in data queue
Jaeyun [Thu, 13 Oct 2022 09:06:37 +0000 (18:06 +0900)]
[Queue] limit in data queue

Set max number in queue when sending data to other node.

Signed-off-by: Jaeyun <jy1210.jung@samsung.com>
2 years ago[MQTT] Separate MQTT implementation
gichan [Fri, 14 Oct 2022 02:11:22 +0000 (11:11 +0900)]
[MQTT] Separate MQTT implementation

Separate implementation for MQTT into paho-mqtt-c and mosquitto.
Let's use mosquitto lib in environments where the paho lib is not supported, such as tizenRT.

Signed-off-by: gichan <gichan2.jang@samsung.com>