7 Teleservice Application Framework
User Manual 236/374
7.3.9 Network
Header file: "Network_handler.h"
7.3.9.1 Introduction
The ynetwork daemon provides functions to manage the internet connectivity automatically. Via D-Bus the
ynetworkd can be switched from connected to disconnected. It is also possible to get the actual connected
interface.
The basic behavior of the ynetworkd is configurable via the ynetworkd configuration file. In the configuration file
it's possible to select network interfaces which shall be used to get online. There is also the opportunity to
assign priorities to the interfaces. Interfaces with higher priority can't be interrupted from interfaces with a lower
priority. For the chosen interfaces, timings and general behaviors can be configured. It's also possible to switch
between different online verification mechanisms.
For receiving network notifications automatically in your application, refer to the TAF library function
dbus_initialize_request_callbacks (see "dbus_initialize_request_callbacks" on page 144).
7.3.9.2 ynetworkd_get_connected_interface
Function Description
sint32 ynetworkd_get_connected_interface (const T_DBUS_Util *const opt_DBusInstance, charn *
const opcn_ConnectedInterface, const uint8 ou8_BufferSize)
The function returns the name of the actual connected interface.
Information Flow
Input Information
holds all D-Bus information
MIN_NETWORK_CON_INTERFACE
.. uint8
includes the buffer size of the connected
interface
Structure T_DBUS_Util
typedef struct
{
DBusConnection* pt_dbus_conn; // D-BUS connection instance
charn acn_myNameString[128]; // Name of the application, Don't use any
special
// characters, white spaces or new lines!
charn acn_myVersion[128]; // Additional value (for HELLO) signal (opt.)
charn acn_myStatus[128]; // Additional value (for HELLO) signal (opt.)
charn acn_myAddInfo[512]; // Additional value (for HELLO) signal (opt.)
sint32 s32_myTriginterval; // Time interval when the ysysd
// expects to be triggered
charn acn_myCMDOnWatchdog[2048]; // Bash cmd that must be executed
// by the ysysd in case no
// trigger signal occurred in time.