Function: device_peer_access_status
Applicable Products
Product |
Supported (√/x) |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Queries the data exchange status between two devices.
Prototype
- C Prototype
1aclError aclrtDevicePeerAccessStatus(int32_t deviceId, int32_t peerDeviceId, int32_t *status)
- Python Function
1status, ret = acl.rt.device_peer_access_status(device_id, peer_device_id)
Parameters
Parameter |
Description |
|---|---|
device_id |
Int, device ID. |
peer_dev_id |
Int, device ID. Must be in the range of [0, Device count – 1]. Call acl.rt.get_device_count to obtain the device count. |
Return Values
Return Value |
Description |
|---|---|
status |
Int, device status.
|
ret |
Int, 0 on success; else failure. |
Constraints
This API can only be used to query the data exchange status of two devices whose IDs are within the value range. If any of the input device IDs is out of the range [0, Number of available devices – 1], the query result is 0 or the error code ACL_ERROR_RT_PARAM_INVALID is returned.