Updated on 2022-03-13 GMT+08:00

Obtaining the ID of the First Device

Obtains the ID of the first device. This API is defined in c_graph.h.

Syntax

HIAI_StatusT HIAI_GetFirstDeviceId(uint32_t *firstDevID);

Parameter Description

Parameter

Description

Value Range

firstDevID

Pointer to the ID of the first device

-

Return Value

For details about the returned error codes, see "Error Codes."

Error Codes

No.

Error Level

Error Code

Description

1

HIAI_INFO

HIAI_OK

The running is OK.

2

HIAI_ERROR

HIAI_GRAPH_GET_DEVID_ERROR

There is an error in obtaining the device ID.

Calling Example

uint32_t first_dev_id;
HIAI_GetFirstDeviceId(&first_dev_id);