Policy management

Overview

These APIs are for policy management More…

// global functions

XPUM_API xpum_result_t xpumSetPolicy(
    xpum_device_id_t deviceId,
    xpum_policy_t policy
    );

XPUM_API xpum_result_t xpumSetPolicyByGroup(
    xpum_group_id_t groupId,
    xpum_policy_t policy
    );

XPUM_API xpum_result_t xpumGetPolicy(
    xpum_device_id_t deviceId,
    xpum_policy_t resultList[],
    int* count
    );

XPUM_API xpum_result_t xpumGetPolicyByGroup(
    xpum_group_id_t groupId,
    xpum_policy_t resultList[],
    int* count
    );

Detailed Documentation

These APIs are for policy management

Global Functions

XPUM_API xpum_result_t xpumSetPolicy(
    xpum_device_id_t deviceId,
    xpum_policy_t policy
    )

Set a policy on a device. One device only have one policy for one policy type. So if set a policy with same policy type on a devcie, the old policy will be overwritten.

Support Platform: Linux

Parameters:

deviceId

IN: The device id to set policy

policy

IN: The policy will be set on the device. I

Returns:

xpum_result_t

XPUM_API xpum_result_t xpumSetPolicyByGroup(
    xpum_group_id_t groupId,
    xpum_policy_t policy
    )

Set a policy on device in specified group. One device only have one policy for one policy type. So if set a policy with same policy type on a devcie, the old policy will be overwritten.

Support Platform: Linux

Parameters:

groupId

IN: The group id to set policy

policy

IN: The policy will be set on the device. I

Returns:

xpum_result_t Not Support

XPUM_API xpum_result_t xpumGetPolicy(
    xpum_device_id_t deviceId,
    xpum_policy_t resultList[],
    int* count
    )

Get policy list by device.

Support Platform: Linux

Parameters:

deviceId

IN: The device id to query policy

resultList

OUT: The list of policy run on device with deviceId

count

IN/OUT: When resultList is NULL, count will be filled with the number of policys. count should be equal to or larger than the number of available policys. When return, the count will store real number of entries returned by resultList.

Returns:

XPUM_API xpum_result_t xpumGetPolicyByGroup(
    xpum_group_id_t groupId,
    xpum_policy_t resultList[],
    int* count
    )

Get policy list by group.

Support Platform: Linux

Parameters:

groupId

IN: The group id to query policy

resultList

OUT: The list of policy run on group with groupId

count

IN/OUT: When resultList is NULL, count will be filled with the number of policys. count should be equal to or larger than the number of available policys. When return, the count will store real number of entries returned by resultList.

Returns: