HccnRpingInit

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

Initializes RPing devices and starts network status monitoring.

Prototype

1
HccnResult HccnRpingInit(uint32_t devLogicId, HccnRpingInitAttr *initAttr, HccnRpingCtx *rpingCtx)

Parameters

Parameter

Input/Output

Description

devLogicId

Input

Logical ID of the device that participates in the RPing function and initializes resources.

initAttr

Input

Initial configuration of the RPing function.

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

rpingCtx

Output

Pointer to the constructed RPing object.

For the definition of the HccnRpingCtx type, see HccnRpingCtx.

Returns

Parsing result of the error code of the HccnResult type.

Constraints

  • Before calling this API, call aclrtSetDevice to specify RPing devices.
  • This API allocates stack memory to store related resources. After the RPing function is disabled, you need to call the HccnRpingDeinit API to deinitialize resources.
  • Each device in a single process can be initialized only once for Atlas A2 training products/Atlas A2 inference products and Atlas A3 training products/Atlas A3 inference products.
  • Multiple threads cannot initialize a device at the same time.
  • Each port in a single process can be initialized only once for Ascend 950PR/Ascend 950DT.