HccnRpingGetTarget

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas 200I/500 A2 inference products

☓

Atlas inference products

☓

Atlas training products

☓

Description

Obtains the link status.

Prototype

1
HccnResult HccnRpingGetTarget(HccnRpingCtx rpingCtx, uint32_t targetNum, HccnRpingTargetInfo *target, HccnRpingAddTargetState *targetState)

Parameters

Parameter

Input/Output

Description

rpingCtx

Input

RPing object returned by the HccnRpingInit API.

targetNum

Input

Number of targets to be obtained.

target

Input

Target to be obtained, which is used to confirm the link.

For details about the definition of the HccnRpingTargetInfo type, see HccnRpingTargetInfo.

targetState

Output

Link status.

For details about the definition of the HccnRpingAddTargetState type, see HccnRpingAddTargetState.

Returns

Parsing result of the error code of the HccnResult type.

Constraints

  • The value of targetNum must be the same as the size of the target array and targetState array. Otherwise, out-of-bounds access may occur.
  • A maximum of 16 targets can be obtained at a time. If more than 16 targets need to be obtained, call this API for multiple times.