Skip to content

Feature/l2configure - Test purpose #109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 50 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
347ba1b
Update configure.ac
Abhinavpv28 Mar 29, 2025
a722243
Update cov_build.sh
Abhinavpv28 Mar 29, 2025
9c2f40b
Update configure.ac
Abhinavpv28 Mar 29, 2025
b9eb076
Update configure.ac
Abhinavpv28 Mar 29, 2025
479ddd0
Update cov_build.sh
Abhinavpv28 Mar 29, 2025
104b734
Update rrdInterface.h
Abhinavpv28 Mar 29, 2025
5b908e6
Update rrdInterface.c
Abhinavpv28 Mar 29, 2025
b6b2c24
Update cov_build.sh
Abhinavpv28 Apr 4, 2025
ae719b8
Update rrdInterface.h
Abhinavpv28 Apr 4, 2025
043fea8
Update rrdInterface.c
Abhinavpv28 Apr 4, 2025
9f476a0
Update rrdInterface.c
Abhinavpv28 Apr 5, 2025
de34b27
Update rrdRbus.h
Abhinavpv28 Apr 5, 2025
43a7594
Update rrdInterface.h
Abhinavpv28 Apr 5, 2025
6f350c2
Update rrdInterface.c
Abhinavpv28 Apr 5, 2025
1ebecd6
Update rrdInterface.c
Abhinavpv28 Apr 7, 2025
f2ebc01
Update rrdRbus.h
Abhinavpv28 Apr 7, 2025
71713df
Update rrdInterface.c
Abhinavpv28 Apr 7, 2025
cd83731
Update rrdInterface.h
Abhinavpv28 Apr 7, 2025
41025c8
Update rrdInterface.c
Abhinavpv28 Apr 8, 2025
d711f09
Update rrdInterface.h
Abhinavpv28 Apr 8, 2025
0307ec9
Update rrdInterface.c
Abhinavpv28 Apr 8, 2025
88d26c9
Update rrdInterface.h
Abhinavpv28 Apr 10, 2025
2e7930a
Update rrdInterface.h
Abhinavpv28 Apr 10, 2025
5fc33af
Update rrdInterface.c
Abhinavpv28 Apr 10, 2025
5ed42dc
Update rrdInterface.h
Abhinavpv28 Apr 10, 2025
52a8c62
Update rrdInterface.c
Abhinavpv28 Apr 10, 2025
01b2c64
Update rrdInterface.h
Abhinavpv28 Apr 10, 2025
6e30ed9
Update rrdInterface.c
Abhinavpv28 Apr 10, 2025
755ea5f
Update rrdInterface.c
Abhinavpv28 Apr 10, 2025
fc6005d
Update configure.ac
Abhinavpv28 Apr 11, 2025
1222fbe
Update rrdInterface.h
Abhinavpv28 Apr 11, 2025
104cf9d
Update rrdInterface.h
Abhinavpv28 Apr 11, 2025
c8d0337
Update configure.ac
Abhinavpv28 Apr 11, 2025
69a8a45
Update configure.ac
Abhinavpv28 Apr 11, 2025
0f97831
Update cov_build.sh
Abhinavpv28 Apr 11, 2025
ce410c3
Update rrdInterface.h
Abhinavpv28 Apr 11, 2025
c519841
Update configure.ac
Abhinavpv28 Apr 11, 2025
690e5d3
Update configure.ac
Abhinavpv28 Apr 11, 2025
7221b5e
Update configure.ac
Abhinavpv28 Apr 11, 2025
3f7f280
Update rrdInterface.c
Abhinavpv28 Apr 11, 2025
c239f3a
Update rrdInterface.c
Abhinavpv28 Apr 11, 2025
a4b5c4a
Update rrdInterface.h
Abhinavpv28 Apr 11, 2025
a5ad8dd
Update rrdRbus.h
Abhinavpv28 Apr 11, 2025
24d2921
Update rrdInterface.c
Abhinavpv28 Apr 11, 2025
f8661e4
Update rrdInterface.c
Abhinavpv28 Apr 11, 2025
395ecaa
Update rrdRbus.h
Abhinavpv28 Apr 11, 2025
bbe93e8
Update rrdInterface.c
Abhinavpv28 Apr 11, 2025
851b330
Update rrdInterface.c
Abhinavpv28 Apr 11, 2025
1c72a0b
Update rrdInterface.c
Abhinavpv28 Apr 11, 2025
eded48e
Update rrdInterface.c
Abhinavpv28 Apr 11, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 49 additions & 7 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ AC_INIT([remote-debugger], [1.0], [[email protected]])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
GTEST_ENABLE_FLAG = ""

AC_ARG_ENABLE([gtestapp],
AS_HELP_STRING([--enable-gtestapp],[enable Gtest support (default is no)]),
[
Expand All @@ -39,11 +38,47 @@ AC_ARG_ENABLE([gtestapp],
[echo "Gtestapp is disabled"])
AM_CONDITIONAL([WITH_GTEST_SUPPORT], [test x$GTEST_SUPPORT_ENABLED = xtrue])

AC_CONFIG_FILES([Makefile
src/Makefile])
AC_ARG_ENABLE([wifi],
AS_HELP_STRING([--enable-wifi],[enable WiFi profile (default is no)]),
[
case "${enableval}" in
yes) WIFI_PROFILE_ENABLE=true
WIFI_PROFILE_FLAG="-DUSE_WIFI_PROFILE"
#m4_syscmd([test -d src/hostif/profiles/wifi])
#m4_if(m4_sysval,[0],[AC_CONFIG_FILES([src/Makefile])])
m4_if(m4_sysval,[0],[SUBDIRS_WIFI="src"]) ;;
no) WIFI_PROFILE_ENABLE=false AC_MSG_ERROR([wifi profile is disabled]) ;;
*) AC_MSG_ERROR([bad value ${enableval} for --enable-wifi ]) ;;
esac
],
[echo "WiFi profile is disabled"])
L2_SUPPORT_FLAG =""
AC_ARG_ENABLE([l2support],
AS_HELP_STRING([--enable-l2support], [enable L2 support (default is no)]),
[
case "${enableval}" in
yes)
L2_SUPPORT_ENABLED=true
L2_ENABLE_FLAG="-DL2_SUPPORT"
# AC_CONFIG_FILES([Makefile src/Makefile])
;;
no)
L2_SUPPORT_ENABLED=false
;;
*)
AC_MSG_ERROR([bad value ${enableval} for --enable-l2support])
;;
esac
],
[echo "L2 support is disabled"])
AC_SUBST(L2_ENABLE_FLAG)
AM_CONDITIONAL([WITH_L2_SUPPORT], [test x$L2_SUPPORT_ENABLED = xtrue])
# Config Source files.
AC_CONFIG_SRCDIR([src/rrdMain.c])
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_MACRO_DIR([m4])

# Checks for programs.
AC_PROG_CC
AC_PROG_CXX
Expand All @@ -52,15 +87,13 @@ AM_PROG_LIBTOOL(libtool)

# Checks for libraries.
PKG_CHECK_MODULES([CJSON],[libcjson >= 1.7.0])

# Checks for header files.
AC_CHECK_HEADERS([stdio.h string.h unistd.h stdlib.h])

# Checks for typedefs, structures, and compiler characteristics.
AC_TYPE_SIZE_T

AC_CONFIG_FILES([Makefile
src/Makefile])
#AC_CONFIG_FILES([Makefile
# src/Makefile])

# IARMBus Support
AC_ARG_ENABLE([iarmbusSupport],
Expand All @@ -71,6 +104,15 @@ AC_ARG_ENABLE([iarmbusSupport],
*) AC_MSG_ERROR([bad value ${enableval} for --enable-iarmbusSupport]) ;;
esac],[iarmbusSupport=false])
AM_CONDITIONAL([IARMBUS_ENABLE], [test x$iarmbusSupport = xtrue])

# L2 Support
#AC_ARG_ENABLE([L2Support],
#[ --enable-L2Support Turn on L2 support],
#[case "${enableval}" in
# yes) L2Support=true ;;
# no) L2Support=false ;;
# *) AC_MSG_ERROR([bad value ${enableval} for --enable-L2Support]) ;;
#esac],[L2Support=false])
#AM_CONDITIONAL([L2_ENABLE], [test x$L2Support = xtrue])
AC_SUBST(L2_SUPPORT_ENABLED)
AC_SUBST(GTEST_ENABLE_FLAG)
AC_OUTPUT
6 changes: 3 additions & 3 deletions cov_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fi

cd rfc
autoreconf -i
./configure --enable-rfctool=yes --enable-tr181set=yes
./configure --enable-rfctool=yes --enable-tr181set=yes
cd rfcapi
make librfcapi_la_CPPFLAGS="-I/usr/include/cjson -I/usr/rfc/rfcMgr/gtest/mocks"
make install
Expand Down Expand Up @@ -78,6 +78,6 @@ cp libIARM.h /usr/local/include
cd $WORKDIR
autoreconf -i
autoupdate
./configure --prefix=${INSTALL_DIR} --enable-iarmbusSupport=yes
make remotedebugger_CFLAGS="-I/usr/include/cjson -I/usr/local/include/wdmp-c -I/usr/local/include/rbus -I/usr/local/include -I/usr/local/include/trower-base64 -DIARMBUS_SUPPORT" remotedebugger_LDFLAGS="-L/usr/local/lib -lrdkloggers -lcjson -lrfcapi -lrbus -lmsgpackc -lsecure_wrapper -lwebconfig_framework -lIARMBus -ltr181api -L/usr/local/lib/x86_64-linux-gnu -ltrower-base64 -L/usr/lib/x86_64-linux-gnu"
./configure --prefix=${INSTALL_DIR} --enable-iarmbusSupport=yes --enable-l2support=yes --enable-wifi=yes
make remotedebugger_CFLAGS="-I/usr/include/cjson -I/usr/local/include/wdmp-c -I/usr/local/include/rbus -I/usr/local/include -I/usr/local/include/trower-base64 -DIARMBUS_SUPPORT -DL2_SUPPORT -DUSE_WIFI_PROFILE" remotedebugger_LDFLAGS="-L/usr/local/lib -lrdkloggers -lcjson -lrfcapi -lrbus -lmsgpackc -lsecure_wrapper -lwebconfig_framework -lIARMBus -ltr181api -L/usr/local/lib/x86_64-linux-gnu -ltrower-base64 -L/usr/lib/x86_64-linux-gnu"
make install
30 changes: 20 additions & 10 deletions src/rrdInterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,28 @@ int RRD_subscribe()
subscriptions[1].handler = _remoteDebuggerWebCfgDataEventHandler;
subscriptions[1].userData = NULL;

#ifndef IARMBUS_SUPPORT
subscriptions[2].eventName = RDM_DOWNLOAD_EVENT;
subscriptions[2].filter = NULL;
subscriptions[2].duration = 0;
subscriptions[2].handler = _rdmDownloadEventHandler;
subscriptions[2].userData = NULL;

ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 3, 60);
#ifdef IARMBUS_SUPPORT
#ifdef USE_WIFI_PROFILE
subscriptions[2].eventName = RDM_DOWNLOAD_EVENT1;
subscriptions[2].filter = NULL;
subscriptions[2].duration = 0;
subscriptions[2].handler = _rdmDownloadEventHandler;
subscriptions[2].userData = NULL;
ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 3, 60);
#else
ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 2, 60);
#endif

#else
ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 2, 60);
subscriptions[2].eventName = RDM_DOWNLOAD_EVENT;
subscriptions[2].filter = NULL;
subscriptions[2].duration = 0;
subscriptions[2].handler = _rdmDownloadEventHandler;
subscriptions[2].userData = NULL;
ret = rbusEvent_SubscribeEx(rrdRbusHandle, subscriptions, 3, 60);
#endif
#endif

if(ret != 0)
{
RDK_LOG(RDK_LOG_ERROR, LOG_REMDEBUG, "[%s:%d]: RBUS Event Subscribe for RRD return value is : %s \n ", __FUNCTION__, __LINE__, rbusError_ToString((rbusError_t)ret));
Expand Down Expand Up @@ -250,7 +260,7 @@ void _rdmDownloadEventHandler(rbusHandle_t handle, rbusEvent_t const* event, rbu

(void)(handle);
(void)(subscription);
RDK_LOG(RDK_LOG_INFO, LOG_REMDEBUG, "[%s:%d]: Received event for RDM_DOWNLOAD_EVENT %s \n", __FUNCTION__, __LINE__, RDM_DOWNLOAD_EVENT);
RDK_LOG(RDK_LOG_INFO, LOG_REMDEBUG, "[%s:%d]: Received event for RDM_DOWNLOAD_EVENT \n", __FUNCTION__, __LINE__);
cache = findPresentInCache(pkg_name);
if (cache != NULL)
{
Expand Down
7 changes: 7 additions & 0 deletions src/rrdInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ extern "C"
#define RRD_WEBCFG_FORCE_SYNC "Device.X_RDK_WebConfig.ForceSync"
#define RRD_SET_ISSUE_EVENT "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.IssueType"
#define RRD_WEBCFG_ISSUE_EVENT "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.WebCfgData"
//#ifndef L2_SUPPORT
//#ifdef USE_WIFI_PROFILE
#define RDM_DOWNLOAD_EVENT1 "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.DownloadStatus"
//#define RDM_DOWNLOAD_EVENT "Device.DeviceInfo.X_RDKCENTRAL-COM_RDKDownloadManager.DownloadStatus"
//#else
#define RDM_DOWNLOAD_EVENT "Device.DeviceInfo.X_RDKCENTRAL-COM_RDKDownloadManager.DownloadStatus"
//#define RDM_DOWNLOAD_EVENT "Device.DeviceInfo.X_RDKCENTRAL-COM_RFC.Feature.RDKRemoteDebugger.DownloadStatus"
//#endif
#define RRD_PROCESS_NAME "remotedebugger"
#define RRD_RBUS_TIMEOUT 60

Expand Down
Loading