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.
NOTE:
This is the only function where the opt_DBusInstance is used as a input / output parameter.
WARNING:
T_DBUS_Util: Don not use any special characters, whitespaces or new lines.
Summary of Contents for TC1
Page 1: ...TC1 User Manual Version of this document V1 00r0 ...
Page 25: ...5 Hardware User Manual 25 374 5 2 2 Block Diagram Variant TC1 WIFI ...
Page 34: ...5 Hardware User Manual 34 374 5 6 Housing Connector Top view and side view Bottom View ...
Page 125: ...7 Teleservice Application Framework User Manual 125 374 TAF overview ...
Page 190: ...7 Teleservice Application Framework User Manual 190 374 How the logger mechanism works ...