gxPL  1.0
Tools, Application and Framework for xPL
Groups

Detailed Description

When a device or application is configured, the management station may wish to configure the device to be logically grouped with other units.
xPL provides a powerful mechanism for this to happen in the form of the special "group=" configuration tag.
A device may be part of one or more groups. If the device is configurable, the groups will be changed by the manager.

Collaboration diagram for Groups:

Functions

int gxPLDeviceGroupAdd (gxPLDevice *device, const char *group_name)
 Adds a group to the device. More...
 
int gxPLDeviceGroupAddFromString (gxPLDevice *device, const char *str)
 Adds a group to the device form a string. More...
 
int gxPLDeviceGroupClearAll (gxPLDevice *device)
 Erases all groups. More...
 
int gxPLDeviceGroupCount (const gxPLDevice *device)
 Number of groups. More...
 
const char * gxPLDeviceGroupGet (const gxPLDevice *device, int index)
 Gets a group. More...
 
int gxPLDeviceGroupHave (const gxPLDevice *device)
 Indicates whether the device has groups. More...
 

Function Documentation

int gxPLDeviceGroupAdd ( gxPLDevice *  device,
const char *  group_name 
)

Adds a group to the device.

Parameters
devicepointer on the device
group_namenew group
Returns
0, -1 if an error occurs
int gxPLDeviceGroupAddFromString ( gxPLDevice *  device,
const char *  str 
)

Adds a group to the device form a string.

Parameters
devicepointer on the device
strstring xpl-group.name where name is the group name
Returns
0, -1 if an error occurs
int gxPLDeviceGroupClearAll ( gxPLDevice *  device)

Erases all groups.

Parameters
devicepointer on the device
Returns
0, -1 if an error occurs
int gxPLDeviceGroupCount ( const gxPLDevice *  device)

Number of groups.

Parameters
devicepointer on the device
Returns
the value, -1 if an error occurs
const char* gxPLDeviceGroupGet ( const gxPLDevice *  device,
int  index 
)

Gets a group.

Parameters
devicepointer on the device
indexindex of the group to read
Returns
the group, NULL if error occurs
int gxPLDeviceGroupHave ( const gxPLDevice *  device)

Indicates whether the device has groups.

Parameters
devicepointer on the device
Returns
0, -1 if an error occurs