aclsysGetVersionStr
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
Queries the version number based on a software package name. The version number is a character string. It is the same as the value of version in the version.info file in the package installation directory.
Prototype
1 | aclError aclsysGetVersionStr(char *pkgName, char *versionStr) |
Parameters
Parameter |
Input/Output |
Description |
|---|---|---|
pkgName |
Input |
Software package name. The CANN package name must be the same as the directory name in ${INSTALL_DIR}/share/info. Replace ${INSTALL_DIR} with the CANN component directory. For example, if the installation is performed by the root user, the default file storage path is /usr/local/Ascend/cann. The driver package name is driver. The firmware package name is firmware. |
versionStr |
Output |
Version number. You are advised to declare a character array with the length specified by ACL_PKG_VERSION_MAX_SIZE to store the version number. For example, char versionStr[ACL_PKG_VERSION_MAX_SIZE] = {0}; The ACL_PKG_VERSION_MAX_SIZE macro is defined as follows: #define ACL_PKG_VERSION_MAX_SIZE 128 |
Returns
0 on success; otherwise, failure. For details, see aclError.