Main Page | Data Structures | File List | Data Fields | Globals

mac_params Struct Reference

Structure, to implement the parameters as key-value pairs. More...

#include <libmac.h>


Data Fields

short key [MAX_NO_PARAMS]
 an array of short integers corresponding to the parameter names. Range will be between SHRT_MIN and SHRT_MAX defined in limits.h. On most machines, short integer is 16-bit and the range for signed shorts will be between -(2^15-1) to +(2^15-1)
int value [MAX_NO_PARAMS]
 an array of signed integer values corresponding to the respective parameter values. Range will between INT_MIN and INT_MAX defined in limits.h. On most machines, integer is 32-bit and the range for signed ints will be between -(2^31-1) to +(2^31-1)
unsigned char number_of_params
 a field that indicates the number of active keys (parameters), less than or equal to the MAX_TABLE_SIZE.
float lib_version
 a floating point variable that stores version information.


Detailed Description

Structure that contains two arrays that implement the <key, value> pairs corresponding to the parameters and their values. The members of this structure are:
  1. an array of 16-bit integers corresponding to the parameter names. The key values should be unique and lesser than MAX_NO_PARAMS. These stipulations are required because the present version supports only one value, for each parameter, at a time.
  2. an array of integer values corresponding to the respective parameter values.
  3. an u_char field that indicates the number of parameters that are being actively set/read/appended/received, by the application.
  4. a floating-point version number field for forward compatibility.

The key array and the value array are initialized to -1. The version number field is initialized to the current version number of this library and the number_of_params field is initialized to -1.


Generated on Tue Aug 24 17:01:42 2004 for libmac by doxygen 1.3.8