HMS Customization

2024-11-14
No Rating

Catalog

Definition, Enum, and Struct

E_DjiHmsErrorLevel
T_DjiHmsFileBinaryArray
T_DjiHmsBinaryArrayConfig

Function

DjiHmsCustomization_Init
DjiHmsCustomization_DeInit
DjiHmsCustomization_InjectHmsErrorCode
DjiHmsCustomization_EliminateHmsErrorCode
DjiHmsCustomization_RegDefaultHmsTextConfigByDirPath
DjiHmsCustomization_RegHmsTextConfigByDirPath
DjiHmsCustomization_RegDefaultHmsTextConfigByBinaryArray
DjiHmsCustomization_RegHmsTextConfigByBinaryArray

Definition, Enum and Struct

Enum E_DjiHmsErrorLevel

typedef enum {
DJI_HMS_ERROR_LEVEL_NONE = 0,
DJI_HMS_ERROR_LEVEL_HINT,
DJI_HMS_ERROR_LEVEL_WARN,
DJI_HMS_ERROR_LEVEL_CRITICAL,
DJI_HMS_ERROR_LEVEL_FATAL,
} E_DjiHmsErrorLevel;

Struct T_DjiHmsFileBinaryArray

typedef struct {
char *fileName; /*!< Specify the file name of the HMS text configuration file. */
uint32_t fileSize; /*!< Specify the file size of the HMS text configuration file. The unit is byte. */
const uint8_t *fileBinaryArray; /*!< Specify the binary C array of the HMS text configuration file. */
} T_DjiHmsFileBinaryArray;

Struct T_DjiHmsBinaryArrayConfig

typedef struct {
uint16_t binaryArrayCount; /*!< Count of binary array. */
T_DjiHmsFileBinaryArray *fileBinaryArrayList; /*!< Pointer to binary array list. */
} T_DjiHmsBinaryArrayConfig;

Function

Function DjiHmsCustomization_Init

Initialize the HMS customization module. Users should call this function before using the HMS customization feature.

T_DjiReturnCode DjiHmsCustomization_Init(void);
Parameter
Return
For the details about the return code, refer to: DjiErrorCode

Function DjiHmsCustomization_DeInit

Deinitialize the HMS customization module.

T_DjiReturnCode DjiHmsCustomization_DeInit(void);
Parameter
Return
For the details about the return code, refer to: DjiErrorCode

Function DjiHmsCustomization_InjectHmsErrorCode

Inject custom HMS error code to the app.

Note: For the same HMS error code, a single call is sufficient. There is no need to call repeatedly.

T_DjiReturnCode DjiHmsCustomization_InjectHmsErrorCode(uint32_t errorCode, E_DjiHmsErrorLevel errorLevel);
Parameter
errorCode HMS error code. Value range:[0x1E020000 ~ 0x1E02FFFF].
Return
For the details for the return code, refer to: DjiErrorCode

Function DjiHmsCustomization_EliminateHmsErrorCode

Clear custom HMS error code on the app.

Note: For the same HMS error code, a single call is sufficient. There is no need to call repeatedly.

T_DjiReturnCode DjiHmsCustomization_EliminateHmsErrorCode(uint32_t errorCode);
Parameter
errorCode:HMS error code. Value range
Return
For the details about the return code, refer to: DjiErrorCode

Function DjiHmsCustomization_RegDefaultHmsTextConfigByDirPath

Specify the directory path to register default HMS text configuration file.

T_DjiReturnCode DjiHmsCustomization_RegDefaultHmsTextConfigByDirPath(const char *configDirPath);
Parameter
Return
For the details for the return code, refer to: DjiErrorCode

Function DjiHmsCustomization_RegHmsTextConfigByDirPath

Specify the directory path to register HMS text configuration file.

Note: Different HMS text configurations for several languages require the same HMS configuration.

T_DjiReturnCode DjiHmsCustomization_RegHmsTextConfigByDirPath(E_DjiMobileAppLanguage appLanguage, const char *configDirPath);
Parameter
Return
For the details about the return code, refer to: DjiErrorCode

Function DjiHmsCustomization_RegDefaultHmsTextConfigByBinaryArray

Register default HMS text configuration by binary array.

Note: In RTOS, most likely there is no file system. The HMS text configuration file content can use binary C array. Use this function and DjiHMS_RegDefaultHMSTextConfigByBinaryArray to register the HMS text configuration. When a language is not covered in the setting from DjiHms_RegHmsTextConfigByBinaryArray, the HMS text configuration uses the setting from this function.

T_DjiReturnCode DjiHmsCustomization_RegDefaultHmsTextConfigByBinaryArray(const T_DjiHmsBinaryArrayConfig *binaryArrayConfig);
Parameter
Return
For the details about the return code, refer to: DjiErrorCode

Function DjiHmsCustomization_RegHmsTextConfigByBinaryArray

Register HMS text configuration by binary array.

Note: Different HMS text configurations for several languages require the same HMS configuration.

T_DjiReturnCode DjiHmsCustomization_RegHmsTextConfigByBinaryArray(E_DjiMobileAppLanguage appLanguage, const T_DjiHmsBinaryArrayConfig *binaryArrayConfig);
Parameter
Return
For the details about the return code, refer to: DjiErrorCode

If you have any comments or confusion about our documentation, you can click here to give feedback and we will get back to you as soon as possible.