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.
int gxPLDeviceGroupAdd |
( |
gxPLDevice * |
device, |
|
|
const char * |
group_name |
|
) |
| |
Adds a group to the device.
- Parameters
-
device | pointer on the device |
group_name | new 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
-
device | pointer on the device |
str | string xpl-group.name where name is the group name |
- Returns
- 0, -1 if an error occurs
int gxPLDeviceGroupClearAll |
( |
gxPLDevice * |
device | ) |
|
Erases all groups.
- Parameters
-
device | pointer on the device |
- Returns
- 0, -1 if an error occurs
int gxPLDeviceGroupCount |
( |
const gxPLDevice * |
device | ) |
|
Number of groups.
- Parameters
-
device | pointer on the device |
- Returns
- the value, -1 if an error occurs
const char* gxPLDeviceGroupGet |
( |
const gxPLDevice * |
device, |
|
|
int |
index |
|
) |
| |
Gets a group.
- Parameters
-
device | pointer on the device |
index | index of the group to read |
- Returns
- the group, NULL if error occurs
int gxPLDeviceGroupHave |
( |
const gxPLDevice * |
device | ) |
|
Indicates whether the device has groups.
- Parameters
-
device | pointer on the device |
- Returns
- 0, -1 if an error occurs