EasyManuals Logo

STW TC1 User Manual

STW TC1
374 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #134 background imageLoading...
Page #134 background image
7 Teleservice Application Framework
User Manual 134/374
sprintf(mt_DBUS_util.acn_myStatus, "Run");
sprintf(mt_DBUS_util.acn_myAddInfo, "Example application making use of TAF
components");
// Trigger interval that the ysysd will expect a trigger signal from us in seconds
mt_DBUS_util.s32_myTriginterval = 8;
// In case the watchdog goes off, make the ysysd execute the following bash command for
us
// Ensure to use the entry path to the bash-cmd and redirect its outputs (&>/dev/null)
sprintf(mt_DBUS_util.acn_myCMDOnWatchdog, "/usr/local/bin/signal02.beep &>/dev/null");
// Creates connection and registers application on D-Bus
s32_Retval = dbus_get_on_the_bus(&mt_DBUS_util);
if(s32_Retval != C_NO_ERR)
{
// Error handling
return C_UNKNOWN_ERR;
}
// ...
// Add rules for which messages have to be seen on the D-Bus
dbus_bus_add_match (mt_dbus_util.pt_dbus_conn,
"type='signal',interface='stw.taf.broadcast'", NULL);
dbus_connection_flush (mt_dbus_util.pt_dbus_conn);
dbus_bus_add_match (mt_dbus_util.pt_dbus_conn,
"type='method',interface='stw.taf.ysysd'", NULL);
dbus_connection_flush (mt_dbus_util.pt_dbus_conn);
// ...
/* More initialization steps */
// ...
/* Start main loop */
while (1)
{
// Trigger the watchdog every 1 seconds
(void) usleep (1000);
}
return 0;
}
7.3.3.3 dbus_get_on_the_bus
Function Description
sint32 dbus_get_on_the_bus (T_DBUS_Util * const opt_DBusInstance)
Creates a connection to the D-Bus and registers the application.This function finishes the initialization of the
opt_DBusInstance instance. Make sure that all members of this structure are properly set before calling this
function.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the STW TC1 and is the answer not in the manual?

STW TC1 Specifications

General IconGeneral
BrandSTW
ModelTC1
CategoryController
LanguageEnglish