-
Notifications
You must be signed in to change notification settings - Fork 21
RDK-60318 [POC][T2] Evaluate Rbus IPC Alternatives for T2 Component Integration #248
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
base: develop
Are you sure you want to change the base?
Changes from 12 commits
ac8a292
e66495d
432070d
313d69b
cf44dad
8dd2ffe
fbc6847
14a9c3d
787397a
adfa20c
e5c84d8
e187146
08d9433
31fbac5
0eef33e
f15b73c
b847138
b1e8760
6c4202c
d15e625
3f8f32f
318c40f
837c4ab
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -27,7 +27,7 @@ autoreconf --install | |||||||||||||||||||||
| # FLags to print compiler warnings | ||||||||||||||||||||||
| DEBUG_CFLAGS="-Wall -Werror -Wextra" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| export CFLAGS=" ${DEBUG_CFLAGS} -I${INSTALL_DIR}/include/rtmessage -I${INSTALL_DIR}/include/msgpack -I${INSTALL_DIR}/include/rbus -I${INSTALL_DIR}/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/local/include -DFEATURE_SUPPORT_WEBCONFIG -DRDK_LOGGER -DPERSIST_LOG_MON_REF -DDCMAGENT" | ||||||||||||||||||||||
| export CFLAGS=" ${DEBUG_CFLAGS} -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/dbus-1.0 -I${INSTALL_DIR}/include/rtmessage -I${INSTALL_DIR}/include/msgpack -I${INSTALL_DIR}/include/rbus -I${INSTALL_DIR}/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/local/include -DFEATURE_SUPPORT_WEBCONFIG -DRDK_LOGGER -DPERSIST_LOG_MON_REF -DDCMAGENT" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
| export LDFLAGS="-L/usr/lib/x86_64-linux-gnu -lglib-2.0" | ||||||||||||||||||||||
|
|
||||||||||||||||||||||
|
Comment on lines
+30
to
33
|
||||||||||||||||||||||
| export CFLAGS=" ${DEBUG_CFLAGS} -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/dbus-1.0 -I${INSTALL_DIR}/include/rtmessage -I${INSTALL_DIR}/include/msgpack -I${INSTALL_DIR}/include/rbus -I${INSTALL_DIR}/include -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/local/include -DFEATURE_SUPPORT_WEBCONFIG -DRDK_LOGGER -DPERSIST_LOG_MON_REF -DDCMAGENT" | |
| export LDFLAGS="-L/usr/lib/x86_64-linux-gnu -lglib-2.0" | |
| DBUS_CFLAGS="$(pkg-config --cflags dbus-1 2>/dev/null || echo '-I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/dbus-1.0')" | |
| GLIB_CFLAGS="$(pkg-config --cflags glib-2.0 2>/dev/null || echo '-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include')" | |
| export CFLAGS=" ${DEBUG_CFLAGS} ${DBUS_CFLAGS} ${GLIB_CFLAGS} -I${INSTALL_DIR}/include/rtmessage -I${INSTALL_DIR}/include/msgpack -I${INSTALL_DIR}/include/rbus -I${INSTALL_DIR}/include -I/usr/local/include -DFEATURE_SUPPORT_WEBCONFIG -DRDK_LOGGER -DPERSIST_LOG_MON_REF -DDCMAGENT" | |
| GLIB_LDFLAGS="$(pkg-config --libs glib-2.0 2>/dev/null || echo '-L/usr/lib/x86_64-linux-gnu -lglib-2.0')" | |
| export LDFLAGS="${GLIB_LDFLAGS}" |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -20,9 +20,9 @@ AM_CFLAGS = | |||||
|
|
||||||
| lib_LTLIBRARIES = libccspinterface.la | ||||||
|
|
||||||
| libccspinterface_la_SOURCES = busInterface.c rbusInterface.c | ||||||
| libccspinterface_la_SOURCES = busInterface.c rbusInterface.c dbusInterface.c | ||||||
|
||||||
| libccspinterface_la_SOURCES = busInterface.c rbusInterface.c dbusInterface.c | |
| libccspinterface_la_SOURCES = busInterface.c rbusInterface.c |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -29,6 +29,7 @@ | |||||||||||||||||||||||||||||||||||||||||||||
| #endif | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| #include "rbusInterface.h" | ||||||||||||||||||||||||||||||||||||||||||||||
| #include "dbusInterface.h" | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| static bool isRbus = false ; | ||||||||||||||||||||||||||||||||||||||||||||||
| static bool isBusInit = false ; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
@@ -59,6 +60,15 @@ static bool busInit( ) | |||||||||||||||||||||||||||||||||||||||||||||
| T2Debug("%s --RBUS mode is active \n", __FUNCTION__); //CID 158206:Unchecked return value | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| isBusInit = true; | ||||||||||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||||||||||
| if (dBusInterface_Init() == T2ERROR_SUCCESS) | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| T2Debug("%s --DBUS mode is active \n", __FUNCTION__); //CID 158206:Unchecked return value | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
| else | ||||||||||||||||||||||||||||||||||||||||||||||
| { | ||||||||||||||||||||||||||||||||||||||||||||||
| T2Error("%s --DBUS init failed \n", __FUNCTION__); | ||||||||||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||||||||||
|
Comment on lines
61
to
+71
|
||||||||||||||||||||||||||||||||||||||||||||||
| isBusInit = true; | |
| if (dBusInterface_Init() == T2ERROR_SUCCESS) | |
| { | |
| T2Debug("%s --DBUS mode is active \n", __FUNCTION__); //CID 158206:Unchecked return value | |
| } | |
| else | |
| { | |
| T2Error("%s --DBUS init failed \n", __FUNCTION__); | |
| } | |
| else | |
| { | |
| if (dBusInterface_Init() == T2ERROR_SUCCESS) | |
| { | |
| T2Debug("%s --DBUS mode is active \n", __FUNCTION__); //CID 158206:Unchecked return value | |
| } | |
| else | |
| { | |
| T2Error("%s --DBUS init failed \n", __FUNCTION__); | |
| } | |
| } | |
| isBusInit = true; |
Copilot
AI
Jan 29, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Design issue: D-Bus interface is always initialized regardless of whether RBUS is available or enabled. This means both bus systems are running simultaneously, which wastes resources and can cause conflicts. The D-Bus initialization should only occur when RBUS is not available, implementing a proper fallback mechanism.
Copilot
AI
Jan 27, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unconditional D-Bus event listener registration: The D-Bus event listener is always registered (line 137) regardless of which bus mode is active. This is called before checking isRbus, meaning D-Bus listener will be registered even in RBUS mode. If this is intentional for dual-bus support, it should be documented. Otherwise, it should be conditional.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded D-Bus include paths are not portable across different Linux distributions and architectures. The path
/usr/lib/x86_64-linux-gnu/dbus-1.0/includeis specific to x86_64 Debian/Ubuntu systems. Use pkg-config to detect D-Bus include paths:pkg-config --cflags dbus-1.