gxPL  1.0
Tools, Application and Framework for xPL
Settings

Detailed Description

gxPLSetting is used to pass settings to top-level classes. This class can be instantiated directly or through the parameters of the command line.

Functions

gxPLSettinggxPLSettingFromCommandArgs (int argc, char *argv[], gxPLConnectType type)
 Returns a new gxPLApplication setting from command line parameters. More...
 
gxPLSettinggxPLSettingNew (const char *iface, const char *iolayer, gxPLConnectType type)
 Returns a new gxPLApplication setting from parameters. More...
 

Function Documentation

gxPLSetting* gxPLSettingFromCommandArgs ( int  argc,
char *  argv[],
gxPLConnectType  type 
)

Returns a new gxPLApplication setting from command line parameters.

This will parse the passed command array for options and parameters It supports the following options:

  • -i / –interface xxx : interface or device used to access the network
  • -n / –net xxx : hardware abstraction layer to access the network
  • -W / –timeout xxx : set the timeout at the opening of the io layer
  • -d / –debug : enable debugging, it can be doubled or tripled to increase the level of debug.
  • -D / –nodaemon : do not daemonize (if supported)
  • -B / –baudrate : serial baudrate (if iolayer use serial port)
  • -r / –reset : performed iolayer reset (if supported)
Parameters
argcnumber of parameters from main
argvlist of parameters from main
typenetwork connection type
Returns
the setting or NULL if error occurs
Examples:
hub/gxpl-hub.c, logger/gxpl-logger.c, and sender/gxpl-sender.c.
gxPLSetting* gxPLSettingNew ( const char *  iface,
const char *  iolayer,
gxPLConnectType  type 
)

Returns a new gxPLApplication setting from parameters.

Parameters
ifacenetwork interface name o, the system
iolayernetwork access layer name
typenetwork connection type
Returns
the setting or NULL if error occurs