Main Page | Modules | Data Structures | File List | Data Fields | Globals | Related Pages

Driver Programming: String options

A driver can choose to expose parameters as in a string form. More...

Functions


Detailed Description

A driver can choose to expose parameters as in a string form.

Providing this feature makes dynamicly setting driver specific options much easier. a user can then load the driverby name and set specific options by name all at runtime with no object module references. For example, a TCP driver can be loaded with the string: tcp, and the options can be set with:

port=50668#keepalive=yes#nodelay=N

this would set the port to 50668, keepalive to true and nodelay to false. The particular string definition is defined by the tcp driver by properly creating a globus_i_xio_attr_parse_table_t array. Each element of the array is 1 options. There are 3 members of each array entry: key, cmd, and parse function. The key is a string that defines what option is to be set. In the above example string "port" would be 1 key. cmd tells the driver what cntl is associated with the key. In otherwords, once the string is parsed out what driver specific control must be called to set the requested option. For more information on controls see globus_xio_attr_cntl. The final value in the array entry is the parsing function. The pasing function takes the value of the = portion of the string and parses it into data types. once parsed globus_xio_attr_cntl is called and thus the option is set. There are many available parsing functions but the developer is free to right their own if the provided ones are not sufficient. Sample parsing functions follow:


Function Documentation

globus_result_t globus_xio_string_cntl_bouncer globus_xio_driver_attr_cntl_t  cntl_func,
void *  attr,
int  cmd,
... 
 

New type functions call this one.

globus_result_t globus_xio_string_cntl_bool void *  attr,
const char *  key,
const char *  val,
int  cmd,
globus_xio_driver_attr_cntl_t  cntl_func
 

String option parsing function.

globus_result_t globus_xio_string_cntl_float void *  attr,
const char *  key,
const char *  val,
int  cmd,
globus_xio_driver_attr_cntl_t  cntl_func
 

String option parsing function.

globus_result_t globus_xio_string_cntl_int void *  attr,
const char *  key,
const char *  val,
int  cmd,
globus_xio_driver_attr_cntl_t  cntl_func
 

String option parsing function.

globus_result_t globus_xio_string_cntl_string void *  attr,
const char *  key,
const char *  val,
int  cmd,
globus_xio_driver_attr_cntl_t  cntl_func
 

String option parsing function.

globus_result_t globus_xio_string_cntl_int_int void *  attr,
const char *  key,
const char *  val,
int  cmd,
globus_xio_driver_attr_cntl_t  cntl_func
 

String option parsing function.


about globus | globus toolkit | dev.globus

Comments? webmaster@globus.org