Group management

Overview

These APIs are for group management More…

// global functions

XPUM_API xpum_result_t xpumGroupCreate(
    const char* groupName,
    xpum_group_id_t* pGroupId
    );

XPUM_API xpum_result_t xpumGroupDestroy(xpum_group_id_t groupId);

XPUM_API xpum_result_t xpumGroupAddDevice(
    xpum_group_id_t groupId,
    xpum_device_id_t deviceId
    );

XPUM_API xpum_result_t xpumGroupRemoveDevice(
    xpum_group_id_t groupId,
    xpum_device_id_t deviceId
    );

XPUM_API xpum_result_t xpumGroupGetInfo(
    xpum_group_id_t groupId,
    xpum_group_info_t* pGroupInfo
    );

XPUM_API xpum_result_t xpumGetAllGroupIds(
    xpum_group_id_t groupIds[],
    int* count
    );

Detailed Documentation

These APIs are for group management

Global Functions

XPUM_API xpum_result_t xpumGroupCreate(
    const char* groupName,
    xpum_group_id_t* pGroupId
    )

Create device group.

Instead of executing an operation separately for each entity, the group enables the user to execute same operation on all the entities present in the group as a single API call.

Support Platform: Linux

Parameters:

groupName

IN: Group name for the group to create

pGroupId

OUT: Pointer to group id that newly created

Returns:

xpum_result_t

XPUM_API xpum_result_t xpumGroupDestroy(xpum_group_id_t groupId)

Used to destroy a group represented by groupId.

Support Platform: Linux

Parameters:

groupId

IN: The id for the group to destroy

Returns:

xpum_result_t

XPUM_API xpum_result_t xpumGroupAddDevice(
    xpum_group_id_t groupId,
    xpum_device_id_t deviceId
    )

Used to add specified entity to the group represented by groupId.

Support Platform: Linux

Parameters:

groupId

IN: The id for the group to add device

deviceId

IN: The device id to add

Returns:

xpum_result_t

XPUM_API xpum_result_t xpumGroupRemoveDevice(
    xpum_group_id_t groupId,
    xpum_device_id_t deviceId
    )

Used to remove specified entity from the group represented by groupId.

Support Platform: Linux

Parameters:

groupId

IN: The id for the group to remove device

deviceId

IN: The device id to remove

Returns:

xpum_result_t

XPUM_API xpum_result_t xpumGroupGetInfo(
    xpum_group_id_t groupId,
    xpum_group_info_t* pGroupInfo
    )

Used to get information corresponding to the group represented by groupId.

Support Platform: Linux

Parameters:

groupId

IN: The id for the group to get info

pGroupInfo

OUT: Pointer to group info struct

Returns:

xpum_result_t

XPUM_API xpum_result_t xpumGetAllGroupIds(
    xpum_group_id_t groupIds[],
    int* count
    )

Get all group ids.

Support Platform: Linux

Parameters:

groupIds

OUT: Array to store group ids

count

OUT: Count of groups

Returns:

xpum_result_t