gxPL  1.0
Tools, Application and Framework for xPL
Applications

Detailed Description

gxPLApplication is the central element of a xPL application. This class performs all operations to open and close the xPL network, send and receive messages. An application is needed to create devices.

Functions

int gxPLAppClose (gxPLApplication *app)
 Close a gxPLApplication object and release all ressources. More...
 
gxPLConnectType gxPLAppConnectionType (const gxPLApplication *app)
 Connection type. More...
 
int gxPLAppDisableAllDevices (gxPLApplication *app)
 Stop all devices. More...
 
gxPLApplication * gxPLAppOpen (gxPLSetting *setting)
 Opens a new gxPLApplication object. More...
 
int gxPLAppPoll (gxPLApplication *app, int timeout_ms)
 Polling event of an application. More...
 
gxPLSettinggxPLAppSetting (gxPLApplication *app)
 Returns application setting. More...
 

Function Documentation

int gxPLAppClose ( gxPLApplication *  app)

Close a gxPLApplication object and release all ressources.

Parameters
apppointer to a gxPLApplication object
Returns
0, -1 if an error occurs
Examples:
logger/gxpl-logger.c, and sender/gxpl-sender.c.
gxPLConnectType gxPLAppConnectionType ( const gxPLApplication *  app)

Connection type.

Parameters
apppointer to a gxPLApplication object
Returns
the type
int gxPLAppDisableAllDevices ( gxPLApplication *  app)

Stop all devices.

Usually in preparation for shutdown, but that isn't the only possible reason. It is not necessary to call this function before calling gxPLAppClose()

Parameters
app
Returns
gxPLApplication* gxPLAppOpen ( gxPLSetting setting)

Opens a new gxPLApplication object.

Parameters
settingpointer to a configuration, this configuration can be modified by the function to return the actual configuration.
Returns
the object or NULL if error occurs
Examples:
logger/gxpl-logger.c, and sender/gxpl-sender.c.
int gxPLAppPoll ( gxPLApplication *  app,
int  timeout_ms 
)

Polling event of an application.

Parameters
apppointer to a gxPLApplication object
timeout_mswaiting period in ms before output if no event occurs
Returns
0, -1 if an error occurs
Examples:
logger/gxpl-logger.c.
gxPLSetting* gxPLAppSetting ( gxPLApplication *  app)

Returns application setting.

Parameters
apppointer to a gxPLApplication object
Returns
the setting or NULL if error occurs