NEW: sync the code of DJI Payload-SDK version 2.2.1 released on January 20 2021.

Signed-off-by: DJI-Martin <DJI-Martin@dji.com>
This commit is contained in:
DJI-Martin
2022-01-12 21:44:58 +08:00
parent b1f481e0d4
commit ca41636cc6
1373 changed files with 1530617 additions and 650830 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
/**
********************************************************************
* @file test_payload_cam_emu.h
* @version V2.0.0
* @date 2019/07/01
* @brief This is the header file for "test_payload_cam_emu.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_PAYLOAD_CAM_EMU_H
#define TEST_PAYLOAD_CAM_EMU_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#include <psdk_payload_camera.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_CameraInit(void);
T_PsdkReturnCode PsdkTest_CameraGetDigitalZoomFactor(psdk_f32_t *factor);
T_PsdkReturnCode PsdkTest_CameraGetOpticalZoomFactor(psdk_f32_t *factor);
T_PsdkReturnCode PsdkTest_CameraGetMode(E_PsdkCameraMode *mode);
T_PsdkReturnCode PsdkTest_CameraGetVideoStreamType(E_PsdkCameraVideoStreamType *type);
bool PsdkTest_CameraIsInited(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_PAYLOAD_CAM_EMU_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

View File

@ -0,0 +1,265 @@
/**
********************************************************************
* @file psdk_media_file_core.c
* @version V1.0.0
* @date 2019/01/01
* @brief
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <string.h>
#include <psdk_logger.h>
#include "psdk_media_file_core.h"
#include "psdk_media_file_jpg.h"
#include "psdk_media_file_mp4.h"
#include "psdk_platform.h"
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Private values ------------------------------------------------------------*/
//@formatter:off
static const T_PsdkMediaFileOptItem s_mediaFileOpt[] =
{
//JPEG File Operation Item
{
PSDK_CAMERA_FILE_TYPE_JPEG ,
PsdkMediaFile_IsSupported_JPG,
PsdkMediaFile_GetAttrFunc_JPG,
PsdkMediaFile_GetDataOrigin_JPG,
PsdkMediaFile_GetFileSizeOrigin_JPG,
PsdkMediaFile_CreateThumbNail_JPG,
PsdkMediaFile_GetFileSizeThumbNail_JPG,
PsdkMediaFile_GetDataThumbNail_JPG,
PsdkMediaFile_DestroyThumbNail_JPG,
PsdkMediaFile_CreateScreenNail_JPG,
PsdkMediaFile_GetFileSizeScreenNail_JPG,
PsdkMediaFile_GetDataScreenNail_JPG,
PsdkMediaFile_DestroyScreenNail_JPG,
},
//MP4 File Operation Item
{
PSDK_CAMERA_FILE_TYPE_MP4 ,
PsdkMediaFile_IsSupported_MP4,
PsdkMediaFile_GetAttrFunc_MP4,
PsdkMediaFile_GetDataOrigin_MP4,
PsdkMediaFile_GetFileSizeOrigin_MP4,
PsdkMediaFile_CreateThumbNail_MP4,
PsdkMediaFile_GetFileSizeThumbNail_MP4,
PsdkMediaFile_GetDataThumbNail_MP4,
PsdkMediaFile_DestroyThumbNail_MP4,
PsdkMediaFile_CreateScreenNail_MP4,
PsdkMediaFile_GetFileSizeScreenNail_MP4,
PsdkMediaFile_GetDataScreenNail_MP4,
PsdkMediaFile_DestroyScreenNail_MP4,
},
};
static const uint32_t s_mediaFileOptCount = sizeof (s_mediaFileOpt) / sizeof(T_PsdkMediaFileOptItem);
//@formatter:on
/* Exported functions definition ---------------------------------------------*/
bool PsdkMediaFile_IsSupported(const char *filePath)
{
int i;
for (i = 0; i < s_mediaFileOptCount; i++) {
if (s_mediaFileOpt[i].isSupportedFunc(filePath) == true) {
return true;
}
}
return false;
}
T_PsdkReturnCode PsdkMediaFile_CreateHandle(const char *filePath, T_PsdkMediaFileHandle *pMediaFileHandle)
{
int optIndex;
for (optIndex = 0; optIndex < s_mediaFileOptCount; optIndex++) {
if (s_mediaFileOpt[optIndex].isSupportedFunc(filePath) == true) {
break;
}
}
if (optIndex == s_mediaFileOptCount) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
*pMediaFileHandle = PsdkOsal_Malloc(sizeof(T_PsdkMediaFile));
if (*pMediaFileHandle == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
(*pMediaFileHandle)->filePath = PsdkOsal_Malloc(strlen(filePath) + 1);
if ((*pMediaFileHandle)->filePath == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
(*pMediaFileHandle)->mediaFileOptItem = s_mediaFileOpt[optIndex];
(*pMediaFileHandle)->mediaFileThm.privThm = NULL;
(*pMediaFileHandle)->mediaFileScr.privScr = NULL;
strcpy((*pMediaFileHandle)->filePath, filePath);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkMediaFile_DestroyHandle(T_PsdkMediaFileHandle mediaFileHandle)
{
PsdkOsal_Free(mediaFileHandle->filePath);
PsdkOsal_Free(mediaFileHandle);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkMediaFile_GetMediaFileType(T_PsdkMediaFileHandle mediaFileHandle,
E_PsdkCameraMediaFileType *mediaFileType)
{
*mediaFileType = mediaFileHandle->mediaFileOptItem.mediaFileType;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkMediaFile_GetMediaFileAttr(T_PsdkMediaFileHandle mediaFileHandle,
T_PsdkCameraMediaFileAttr *mediaFileAttr)
{
if (mediaFileHandle->mediaFileOptItem.getAttrFunc == NULL) {
PsdkLogger_UserLogError("Media file handle getAttrFunc null error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getAttrFunc(mediaFileHandle, mediaFileAttr);
}
T_PsdkReturnCode PsdkMediaFile_GetDataOrg(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
if (mediaFileHandle->mediaFileOptItem.getDataOrgFunc == NULL) {
PsdkLogger_UserLogError("Media file handle getDataOrgFunc null error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getDataOrgFunc(mediaFileHandle, offset, len, data, realLen);
}
T_PsdkReturnCode PsdkMediaFile_GetFileSizeOrg(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize)
{
if (mediaFileHandle->mediaFileOptItem.getFileSizeOrgFunc == NULL) {
PsdkLogger_UserLogError("Media file handle getFileSizeOrgFunc null error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getFileSizeOrgFunc(mediaFileHandle, fileSize);
}
T_PsdkReturnCode PsdkMediaFile_CreateThm(T_PsdkMediaFileHandle mediaFileHandle)
{
if (mediaFileHandle->mediaFileOptItem.createThmFunc == NULL) {
PsdkLogger_UserLogError("Media file handle createThmFunc null error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.createThmFunc(mediaFileHandle);
}
T_PsdkReturnCode PsdkMediaFile_GetFileSizeThm(T_PsdkMediaFileHandle mediaFileHandle, uint32_t *fileSize)
{
if (mediaFileHandle->mediaFileOptItem.getFileSizeThmFunc == NULL) {
PsdkLogger_UserLogError("Media file handle getFileSizeThmFunc null error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getFileSizeThmFunc(mediaFileHandle, fileSize);
}
T_PsdkReturnCode PsdkMediaFile_GetDataThm(T_PsdkMediaFileHandle mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
if (mediaFileHandle->mediaFileOptItem.getDataThmFunc == NULL) {
PsdkLogger_UserLogError("Media file handle getDataThmFunc null error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getDataThmFunc(mediaFileHandle, offset, len, data, realLen);
}
T_PsdkReturnCode PsdkMediaFile_DestoryThm(T_PsdkMediaFileHandle mediaFileHandle)
{
if (mediaFileHandle->mediaFileOptItem.destroyThmFunc == NULL) {
PsdkLogger_UserLogError("Media file handle destroyThmFunc null error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.destroyThmFunc(mediaFileHandle);
}
T_PsdkReturnCode PsdkMediaFile_CreateScr(T_PsdkMediaFileHandle mediaFileHandle)
{
if (mediaFileHandle->mediaFileOptItem.creatScrFunc == NULL) {
PsdkLogger_UserLogError("Media file handle creatScrFunc null error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.creatScrFunc(mediaFileHandle);
}
T_PsdkReturnCode PsdkMediaFile_GetFileSizeScr(T_PsdkMediaFileHandle mediaFileHandle, uint32_t *fileSize)
{
if (mediaFileHandle->mediaFileOptItem.getFileSizeScrFunc == NULL) {
PsdkLogger_UserLogError("Media file handle getFileSizeScrFunc null error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getFileSizeScrFunc(mediaFileHandle, fileSize);
}
T_PsdkReturnCode PsdkMediaFile_GetDataScr(T_PsdkMediaFileHandle mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
if (mediaFileHandle->mediaFileOptItem.getDataScrFunc == NULL) {
PsdkLogger_UserLogError("Media file handle getDataScrFunc null error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.getDataScrFunc(mediaFileHandle, offset, len, data, realLen);
}
T_PsdkReturnCode PsdkMediaFile_DestroyScr(T_PsdkMediaFileHandle mediaFileHandle)
{
if (mediaFileHandle->mediaFileOptItem.destroyScrFunc == NULL) {
PsdkLogger_UserLogError("Media file handle destroyScrFunc null error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return mediaFileHandle->mediaFileOptItem.destroyScrFunc(mediaFileHandle);
}
/* Private functions definition-----------------------------------------------*/
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,117 @@
/**
********************************************************************
* @file psdk_media_file_core.h
* @version V0.0.0
* @date 2019/01/01
* @brief This is the header file for "psdk_media_file_core.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef PSDK_MEDIA_FILE_CORE_H
#define PSDK_MEDIA_FILE_CORE_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include <psdk_typedef.h>
#include <psdk_payload_camera.h>
/* Exported constants --------------------------------------------------------*/
#define PSDK_MEDIA_FILE_PATH_LEN_MAX 512 /*max file path len */
#define PSDK_MEDIA_DIR_PATH_LEN_MAX 256 /*max dir path len */
/* Exported types ------------------------------------------------------------*/
typedef struct {
void *privThm;
} T_PsdkMediaFileThm;
typedef struct {
void *privScr;
} T_PsdkMediaFileScr;
struct _PsdkMediaFile;
typedef struct {
E_PsdkCameraMediaFileType mediaFileType;
bool (*isSupportedFunc)(const char *filePath);
T_PsdkReturnCode (*getAttrFunc)(struct _PsdkMediaFile *mediaFileHandle, T_PsdkCameraMediaFileAttr *mediaFileAttr);
T_PsdkReturnCode (*getDataOrgFunc)(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_PsdkReturnCode (*getFileSizeOrgFunc)(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize);
T_PsdkReturnCode (*createThmFunc)(struct _PsdkMediaFile *mediaFileHandle);
T_PsdkReturnCode (*getFileSizeThmFunc)(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize);
T_PsdkReturnCode (*getDataThmFunc)(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_PsdkReturnCode (*destroyThmFunc)(struct _PsdkMediaFile *mediaFileHandle);
T_PsdkReturnCode (*creatScrFunc)(struct _PsdkMediaFile *mediaFileHandle);
T_PsdkReturnCode (*getFileSizeScrFunc)(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize);
T_PsdkReturnCode (*getDataScrFunc)(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_PsdkReturnCode (*destroyScrFunc)(struct _PsdkMediaFile *mediaFileHandle);
} T_PsdkMediaFileOptItem;
typedef struct _PsdkMediaFile {
char *filePath;
T_PsdkMediaFileOptItem mediaFileOptItem;
T_PsdkMediaFileThm mediaFileThm;
T_PsdkMediaFileScr mediaFileScr;
} T_PsdkMediaFile, *T_PsdkMediaFileHandle;
/* Exported functions --------------------------------------------------------*/
bool PsdkMediaFile_IsSupported(const char *filePath);
T_PsdkReturnCode PsdkMediaFile_CreateHandle(const char *filePath, T_PsdkMediaFileHandle *pMediaFileHandle);
T_PsdkReturnCode PsdkMediaFile_DestroyHandle(T_PsdkMediaFileHandle mediaFileHandle);
T_PsdkReturnCode PsdkMediaFile_GetMediaFileType(T_PsdkMediaFileHandle mediaFileHandle,
E_PsdkCameraMediaFileType *mediaFileType);
T_PsdkReturnCode PsdkMediaFile_GetMediaFileAttr(T_PsdkMediaFileHandle mediaFileHandle,
T_PsdkCameraMediaFileAttr *mediaFileAttr);
T_PsdkReturnCode PsdkMediaFile_GetDataOrg(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_PsdkReturnCode PsdkMediaFile_GetFileSizeOrg(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize);
T_PsdkReturnCode PsdkMediaFile_CreateThm(T_PsdkMediaFileHandle mediaFileHandle);
T_PsdkReturnCode PsdkMediaFile_GetFileSizeThm(T_PsdkMediaFileHandle mediaFileHandle, uint32_t *fileSize);
T_PsdkReturnCode PsdkMediaFile_GetDataThm(T_PsdkMediaFileHandle mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_PsdkReturnCode PsdkMediaFile_DestoryThm(T_PsdkMediaFileHandle mediaFileHandle);
T_PsdkReturnCode PsdkMediaFile_CreateScr(T_PsdkMediaFileHandle mediaFileHandle);
T_PsdkReturnCode PsdkMediaFile_GetFileSizeScr(T_PsdkMediaFileHandle mediaFileHandle, uint32_t *fileSize);
T_PsdkReturnCode PsdkMediaFile_GetDataScr(T_PsdkMediaFileHandle mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_PsdkReturnCode PsdkMediaFile_DestroyScr(T_PsdkMediaFileHandle mediaFileHandle);
#ifdef __cplusplus
}
#endif
#endif // PSDK_MEDIA_FILE_CORE_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,227 @@
/**
********************************************************************
* @file psdk_media_file_JPG.c
* @version V1.0.0
* @date 2019/01/01
* @brief
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "psdk_media_file_jpg.h"
#include "psdk_media_file_core.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <psdk_logger.h>
#include <utils/util_misc.h>
#include "psdk_platform.h"
#include "utils/util_time.h"
#include "utils/util_file.h"
/* Private constants ---------------------------------------------------------*/
#define JPG_FILE_SUFFIX ".jpg"
#define JPG_TEMP_FILE_TEMPLATE_STR "JPG_TEMP_XXXXXX.jpg"
#define JPG_TEMP_FILE_PATH_MAX_LEN 50
#define FFMPEG_CMD_BUF_SIZE 1024
#define JPG_THM_SCALE_CFG_STR "scale=100:-1"
#define JPG_SCR_SCALE_CFG_STR "scale=600:-1"
/* Private types -------------------------------------------------------------*/
typedef struct {
FILE *tempFile;
char tempfilePath[JPG_TEMP_FILE_PATH_MAX_LEN];
} T_PsdkJPGTempFilePriv;
/* Private functions declaration ---------------------------------------------*/
static T_PsdkReturnCode PsdkMediaFile_CreateTempFilePriv_JPG(const char *srcFilePath, const char *scaleCfgStr,
T_PsdkJPGTempFilePriv **pTempFilePrivHandle);
static T_PsdkReturnCode PsdkMediaFile_DestroyTempFilePriv_JPG(T_PsdkJPGTempFilePriv *tempFilePrivHandle);
/* Exported functions definition ---------------------------------------------*/
bool PsdkMediaFile_IsSupported_JPG(const char *filePath)
{
if (filePath == NULL) {
PsdkLogger_UserLogError("input parameter is null error");
return false;
}
if (strcmp(&filePath[strlen(filePath) - 4], JPG_FILE_SUFFIX) == 0) {
return true;
}
return false;
}
T_PsdkReturnCode PsdkMediaFile_GetAttrFunc_JPG(struct _PsdkMediaFile *mediaFileHandle,
T_PsdkCameraMediaFileAttr *mediaFileAttr)
{
USER_UTIL_UNUSED(mediaFileHandle);
mediaFileAttr->attrVideoDuration = 0;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkMediaFile_GetDataOrigin_JPG(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
return UtilFile_GetFileDataByPath(mediaFileHandle->filePath, offset, len, data, realLen);
}
T_PsdkReturnCode PsdkMediaFile_GetFileSizeOrigin_JPG(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize)
{
return UtilFile_GetFileSizeByPath(mediaFileHandle->filePath, fileSize);
}
T_PsdkReturnCode PsdkMediaFile_CreateThumbNail_JPG(struct _PsdkMediaFile *mediaFileHandle)
{
return PsdkMediaFile_CreateTempFilePriv_JPG(mediaFileHandle->filePath, JPG_THM_SCALE_CFG_STR,
(T_PsdkJPGTempFilePriv **) &mediaFileHandle->mediaFileThm.privThm);
}
T_PsdkReturnCode PsdkMediaFile_GetFileSizeThumbNail_JPG(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize)
{
T_PsdkJPGTempFilePriv *jpgFileThmPriv = (T_PsdkJPGTempFilePriv *) mediaFileHandle->mediaFileThm.privThm;
return UtilFile_GetFileSize(jpgFileThmPriv->tempFile, fileSize);
}
T_PsdkReturnCode
PsdkMediaFile_GetDataThumbNail_JPG(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
T_PsdkJPGTempFilePriv *jpgFileThmPriv = (T_PsdkJPGTempFilePriv *) mediaFileHandle->mediaFileThm.privThm;
return UtilFile_GetFileData(jpgFileThmPriv->tempFile, offset, len, data, realLen);
}
T_PsdkReturnCode PsdkMediaFile_DestroyThumbNail_JPG(struct _PsdkMediaFile *mediaFileHandle)
{
return PsdkMediaFile_DestroyTempFilePriv_JPG(mediaFileHandle->mediaFileThm.privThm);
}
T_PsdkReturnCode PsdkMediaFile_CreateScreenNail_JPG(struct _PsdkMediaFile *mediaFileHandle)
{
return PsdkMediaFile_CreateTempFilePriv_JPG(mediaFileHandle->filePath, JPG_SCR_SCALE_CFG_STR,
(T_PsdkJPGTempFilePriv **) &mediaFileHandle->mediaFileScr.privScr);
}
T_PsdkReturnCode PsdkMediaFile_GetFileSizeScreenNail_JPG(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize)
{
T_PsdkJPGTempFilePriv *jpgFileScrPriv = (T_PsdkJPGTempFilePriv *) mediaFileHandle->mediaFileScr.privScr;
return UtilFile_GetFileSize(jpgFileScrPriv->tempFile, fileSize);
}
T_PsdkReturnCode
PsdkMediaFile_GetDataScreenNail_JPG(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
T_PsdkJPGTempFilePriv *jpgFileScrPriv = (T_PsdkJPGTempFilePriv *) mediaFileHandle->mediaFileScr.privScr;
return UtilFile_GetFileData(jpgFileScrPriv->tempFile, offset, len, data, realLen);
}
T_PsdkReturnCode PsdkMediaFile_DestroyScreenNail_JPG(struct _PsdkMediaFile *mediaFileHandle)
{
return PsdkMediaFile_DestroyTempFilePriv_JPG(mediaFileHandle->mediaFileScr.privScr);
}
/* Private functions definition-----------------------------------------------*/
static T_PsdkReturnCode PsdkMediaFile_CreateTempFilePriv_JPG(const char *srcFilePath, const char *scaleCfgStr,
T_PsdkJPGTempFilePriv **pTempFilePrivHandle)
{
char ffmpeg_cmd[FFMPEG_CMD_BUF_SIZE];
int cmdRet;
T_PsdkRunTimeStamps tiStart, tiEnd;
T_PsdkJPGTempFilePriv *jpgTempFilePriv;
T_PsdkReturnCode psdkStat;
int tempFd;
tiStart = PsdkUtilTime_GetRunTimeStamps();
*pTempFilePrivHandle = PsdkOsal_Malloc(sizeof(T_PsdkJPGTempFilePriv));
if (*pTempFilePrivHandle == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
jpgTempFilePriv = *pTempFilePrivHandle;
//get temp file name
strcpy(jpgTempFilePriv->tempfilePath, JPG_TEMP_FILE_TEMPLATE_STR);
tempFd = mkstemps(jpgTempFilePriv->tempfilePath, strlen(JPG_FILE_SUFFIX));
if (tempFd < 0) {
PsdkLogger_UserLogError("JPG Create Temp File Error, tempFd = %d\n", tempFd);
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto err_create_temp;
}
close(tempFd);
unlink(jpgTempFilePriv->tempfilePath);
//ffmpeg cmd send
snprintf(ffmpeg_cmd, FFMPEG_CMD_BUF_SIZE, "ffmpeg -i \"%s\" -vf %s %s 1>/dev/null 2>&1",
srcFilePath, scaleCfgStr, jpgTempFilePriv->tempfilePath);
cmdRet = system(ffmpeg_cmd);
tiEnd = PsdkUtilTime_GetRunTimeStamps();
PsdkLogger_UserLogDebug("JPG Create TempFile, RealTime = %ld us\n", tiEnd.realUsec - tiStart.realUsec);
if (cmdRet != 0) {
PsdkLogger_UserLogError("JPG ffmpeg cmd call error, ret = %d\n", cmdRet);
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto err_system_cmd;
}
//open temp file
jpgTempFilePriv->tempFile = fopen(jpgTempFilePriv->tempfilePath, "rb+");
if (jpgTempFilePriv->tempFile == NULL) {
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto err_file_open;
}
//unlink temp file
unlink(jpgTempFilePriv->tempfilePath);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
err_file_open:
unlink(jpgTempFilePriv->tempfilePath);
err_system_cmd:
err_create_temp:
PsdkOsal_Free(*pTempFilePrivHandle);
return psdkStat;
}
static T_PsdkReturnCode PsdkMediaFile_DestroyTempFilePriv_JPG(T_PsdkJPGTempFilePriv *tempFilePrivHandle)
{
fclose(tempFilePrivHandle->tempFile);
PsdkOsal_Free(tempFilePrivHandle);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,77 @@
/**
********************************************************************
* @file psdk_media_file_JPG.h
* @version V0.0.0
* @date 2019/01/01
* @brief This is the header file for "psdk_media_file_JPG.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef PSDK_MEDIA_FILE_JPG_H
#define PSDK_MEDIA_FILE_JPG_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include <psdk_payload_camera.h>
#include <psdk_typedef.h>
#include "psdk_media_file_core.h"
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
bool PsdkMediaFile_IsSupported_JPG(const char *filePath);
T_PsdkReturnCode PsdkMediaFile_GetAttrFunc_JPG(struct _PsdkMediaFile *mediaFileHandle,
T_PsdkCameraMediaFileAttr *mediaFileAttr);
T_PsdkReturnCode PsdkMediaFile_GetDataOrigin_JPG(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_PsdkReturnCode PsdkMediaFile_GetFileSizeOrigin_JPG(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize);
T_PsdkReturnCode PsdkMediaFile_CreateThumbNail_JPG(struct _PsdkMediaFile *mediaFileHandle);
T_PsdkReturnCode PsdkMediaFile_GetFileSizeThumbNail_JPG(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize);
T_PsdkReturnCode
PsdkMediaFile_GetDataThumbNail_JPG(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_PsdkReturnCode PsdkMediaFile_DestroyThumbNail_JPG(struct _PsdkMediaFile *mediaFileHandle);
T_PsdkReturnCode PsdkMediaFile_CreateScreenNail_JPG(struct _PsdkMediaFile *mediaFileHandle);
T_PsdkReturnCode PsdkMediaFile_GetFileSizeScreenNail_JPG(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize);
T_PsdkReturnCode
PsdkMediaFile_GetDataScreenNail_JPG(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_PsdkReturnCode PsdkMediaFile_DestroyScreenNail_JPG(struct _PsdkMediaFile *mediaFileHandle);
#ifdef __cplusplus
}
#endif
#endif // PSDK_MEIDA_FILE_JPG_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,261 @@
/**
********************************************************************
* @file psdk_media_file_MP4.c
* @version V1.0.0
* @date 2019/01/01
* @brief
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "psdk_media_file_mp4.h"
#include "psdk_media_file_core.h"
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <psdk_logger.h>
#include <stdlib.h>
#include "psdk_platform.h"
#include "utils/util_time.h"
#include "utils/util_file.h"
/* Private constants ---------------------------------------------------------*/
#define MP4_FILE_SUFFIX ".mp4"
#define MP4_TEMP_FILE_TEMPLATE_STR "MP4_TEMP_XXXXXX.jpg"
#define MP4_TEMP_FILE_PATH_MAX_LEN 50
#define FFMPEG_CMD_BUF_SIZE (PSDK_MEDIA_FILE_PATH_LEN_MAX + 256)
#define MP4_THM_SCALE_CFG_STR "scale=100:-1"
#define MP4_SCR_SCALE_CFG_STR "scale=600:-1"
/* Private types -------------------------------------------------------------*/
typedef struct {
FILE *tempFile;
char tempfilePath[MP4_TEMP_FILE_PATH_MAX_LEN];
} T_PsdkMP4TempPicPriv;
/* Private functions declaration ---------------------------------------------*/
static T_PsdkReturnCode PsdkMediaFile_CreateTempPicPriv_MP4(const char *srcFilePath, const char *scaleCfgStr,
T_PsdkMP4TempPicPriv **pTempPicPrivHandle);
static T_PsdkReturnCode PsdkMediaFile_DestroyTempPicPriv_MP4(T_PsdkMP4TempPicPriv *tempPicPrivHandle);
/* Private values ------------------------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
bool PsdkMediaFile_IsSupported_MP4(const char *filePath)
{
if (filePath == NULL) {
PsdkLogger_UserLogError("input parameter is null error");
return false;
}
if (strcmp(&filePath[strlen(filePath) - 4], MP4_FILE_SUFFIX) == 0) {
return true;
}
return false;
}
T_PsdkReturnCode PsdkMediaFile_GetAttrFunc_MP4(struct _PsdkMediaFile *mediaFileHandle,
T_PsdkCameraMediaFileAttr *mediaFileAttr)
{
FILE *fp;
char ffmpegCmdStr[FFMPEG_CMD_BUF_SIZE];
float hour, minute, second;
char tempTailStr[128];
int ret;
T_PsdkReturnCode psdkStat;
snprintf(ffmpegCmdStr, FFMPEG_CMD_BUF_SIZE, "ffmpeg -i \"%s\" 2>&1 | grep \"Duration\"", mediaFileHandle->filePath);
fp = popen(ffmpegCmdStr, "r");
if (fp == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
ret = fscanf(fp, " Duration: %f:%f:%f,%127s", &hour, &minute, &second, tempTailStr);
if (ret <= 0) {
PsdkLogger_UserLogError("MP4 File Get Duration Error\n");
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto out;
}
mediaFileAttr->attrVideoDuration = (uint32_t) (hour * 3600 + minute * 60 + second + 0.5);
/*! The user needs to obtain the frame rate and resolution of the video file by ffmpeg tools.
* Also the frame rate and resolution of video need convert to enum E_PsdkCameraVideoFrameRate or
* E_PsdkCameraVideoResolution.
*/
mediaFileAttr->attrVideoFrameRate = PSDK_CAMERA_VIDEO_FRAME_RATE_30_FPS;
mediaFileAttr->attrVideoResolution = PSDK_CAMERA_VIDEO_RESOLUTION_1920x1080;
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
out:
pclose(fp);
return psdkStat;
}
T_PsdkReturnCode PsdkMediaFile_GetDataOrigin_MP4(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
return UtilFile_GetFileDataByPath(mediaFileHandle->filePath, offset, len, data, realLen);
}
T_PsdkReturnCode PsdkMediaFile_GetFileSizeOrigin_MP4(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize)
{
return UtilFile_GetFileSizeByPath(mediaFileHandle->filePath, fileSize);
}
T_PsdkReturnCode PsdkMediaFile_CreateThumbNail_MP4(struct _PsdkMediaFile *mediaFileHandle)
{
return PsdkMediaFile_CreateTempPicPriv_MP4(mediaFileHandle->filePath, MP4_THM_SCALE_CFG_STR,
(T_PsdkMP4TempPicPriv **) &mediaFileHandle->mediaFileThm.privThm);
}
T_PsdkReturnCode PsdkMediaFile_GetFileSizeThumbNail_MP4(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize)
{
T_PsdkMP4TempPicPriv *jpgFileThmPriv = (T_PsdkMP4TempPicPriv *) mediaFileHandle->mediaFileThm.privThm;
return UtilFile_GetFileSize(jpgFileThmPriv->tempFile, fileSize);
}
T_PsdkReturnCode
PsdkMediaFile_GetDataThumbNail_MP4(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
T_PsdkMP4TempPicPriv *jpgFileThmPriv = (T_PsdkMP4TempPicPriv *) mediaFileHandle->mediaFileThm.privThm;
return UtilFile_GetFileData(jpgFileThmPriv->tempFile, offset, len, data, realLen);
}
T_PsdkReturnCode PsdkMediaFile_DestroyThumbNail_MP4(struct _PsdkMediaFile *MediaFileHandle)
{
return PsdkMediaFile_DestroyTempPicPriv_MP4(MediaFileHandle->mediaFileThm.privThm);
}
T_PsdkReturnCode PsdkMediaFile_CreateScreenNail_MP4(struct _PsdkMediaFile *mediaFileHandle)
{
return PsdkMediaFile_CreateTempPicPriv_MP4(mediaFileHandle->filePath, MP4_SCR_SCALE_CFG_STR,
(T_PsdkMP4TempPicPriv **) &mediaFileHandle->mediaFileScr.privScr);
}
T_PsdkReturnCode PsdkMediaFile_GetFileSizeScreenNail_MP4(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize)
{
T_PsdkMP4TempPicPriv *jpgFileScrPriv = (T_PsdkMP4TempPicPriv *) mediaFileHandle->mediaFileScr.privScr;
return UtilFile_GetFileSize(jpgFileScrPriv->tempFile, fileSize);
}
T_PsdkReturnCode
PsdkMediaFile_GetDataScreenNail_MP4(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
T_PsdkMP4TempPicPriv *jpgFileScrPriv = (T_PsdkMP4TempPicPriv *) mediaFileHandle->mediaFileScr.privScr;
return UtilFile_GetFileData(jpgFileScrPriv->tempFile, offset, len, data, realLen);
}
T_PsdkReturnCode PsdkMediaFile_DestroyScreenNail_MP4(struct _PsdkMediaFile *mediaFileHandle)
{
return PsdkMediaFile_DestroyTempPicPriv_MP4(mediaFileHandle->mediaFileScr.privScr);
}
/* Private functions definition-----------------------------------------------*/
static T_PsdkReturnCode PsdkMediaFile_CreateTempPicPriv_MP4(const char *srcFilePath, const char *scaleCfgStr,
T_PsdkMP4TempPicPriv **pTempPicPrivHandle)
{
char ffmpeg_cmd[FFMPEG_CMD_BUF_SIZE];
int cmdRet;
T_PsdkRunTimeStamps tiStart, tiEnd;
T_PsdkMP4TempPicPriv *mp4TempPicFile;
T_PsdkReturnCode psdkStat;
int tempFd;
tiStart = PsdkUtilTime_GetRunTimeStamps();
*pTempPicPrivHandle = PsdkOsal_Malloc(sizeof(T_PsdkMP4TempPicPriv));
if (*pTempPicPrivHandle == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
mp4TempPicFile = *pTempPicPrivHandle;
//get temp file name
strcpy(mp4TempPicFile->tempfilePath, MP4_TEMP_FILE_TEMPLATE_STR);
tempFd = mkstemps(mp4TempPicFile->tempfilePath, strlen(MP4_FILE_SUFFIX));
if (tempFd < 0) {
PsdkLogger_UserLogError("JPG Create Temp File Error, tempFd = %d\n", tempFd);
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto err_create_temp;
}
close(tempFd);
unlink(mp4TempPicFile->tempfilePath);
//ffmpeg cmd send
snprintf(ffmpeg_cmd, FFMPEG_CMD_BUF_SIZE, "ffmpeg -i \"%s\" -vf %s -ss 00:00:00 -vframes 1 %s 1>/dev/null 2>&1",
srcFilePath, scaleCfgStr, mp4TempPicFile->tempfilePath);
cmdRet = system(ffmpeg_cmd);
tiEnd = PsdkUtilTime_GetRunTimeStamps();
PsdkLogger_UserLogDebug("JPG Create TempFile, RealTime = %ld us\n", tiEnd.realUsec - tiStart.realUsec);
if (cmdRet != 0) {
PsdkLogger_UserLogError("JPG ffmpeg cmd call error, ret = %d\n", cmdRet);
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto err_system_cmd;
}
//open temp file
mp4TempPicFile->tempFile = fopen(mp4TempPicFile->tempfilePath, "rb+");
if (mp4TempPicFile->tempFile == NULL) {
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto err_file_open;
}
//unlink temp file
unlink(mp4TempPicFile->tempfilePath);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
err_file_open:
unlink(mp4TempPicFile->tempfilePath);
err_system_cmd:
err_create_temp:
PsdkOsal_Free(*pTempPicPrivHandle);
return psdkStat;
}
static T_PsdkReturnCode PsdkMediaFile_DestroyTempPicPriv_MP4(T_PsdkMP4TempPicPriv *tempPicPrivHandle)
{
fclose(tempPicPrivHandle->tempFile);
PsdkOsal_Free(tempPicPrivHandle);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,77 @@
/**
********************************************************************
* @file psdk_media_file_MP4.h
* @version V0.0.0
* @date 2019/01/01
* @brief This is the header file for "psdk_media_file_MP4.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef PSDK_MEDIA_FILE_MP4_H
#define PSDK_MEDIA_FILE_MP4_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include <psdk_payload_camera.h>
#include <psdk_typedef.h>
#include "psdk_media_file_core.h"
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
bool PsdkMediaFile_IsSupported_MP4(const char *filePath);
T_PsdkReturnCode PsdkMediaFile_GetAttrFunc_MP4(struct _PsdkMediaFile *mediaFileHandle,
T_PsdkCameraMediaFileAttr *mediaFileAttr);
T_PsdkReturnCode PsdkMediaFile_GetDataOrigin_MP4(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_PsdkReturnCode PsdkMediaFile_GetFileSizeOrigin_MP4(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize);
T_PsdkReturnCode PsdkMediaFile_CreateThumbNail_MP4(struct _PsdkMediaFile *mediaFileHandle);
T_PsdkReturnCode PsdkMediaFile_GetFileSizeThumbNail_MP4(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize);
T_PsdkReturnCode
PsdkMediaFile_GetDataThumbNail_MP4(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_PsdkReturnCode PsdkMediaFile_DestroyThumbNail_MP4(struct _PsdkMediaFile *MediaFileHandle);
T_PsdkReturnCode PsdkMediaFile_CreateScreenNail_MP4(struct _PsdkMediaFile *mediaFileHandle);
T_PsdkReturnCode PsdkMediaFile_GetFileSizeScreenNail_MP4(struct _PsdkMediaFile *mediaFileHandle, uint32_t *fileSize);
T_PsdkReturnCode
PsdkMediaFile_GetDataScreenNail_MP4(struct _PsdkMediaFile *mediaFileHandle, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_PsdkReturnCode PsdkMediaFile_DestroyScreenNail_MP4(struct _PsdkMediaFile *mediaFileHandle);
#ifdef __cplusplus
}
#endif
#endif // PSDK_MEDIA_FILE_MP4_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,57 @@
/**
********************************************************************
* @file test_payload_cam_media.h
* @version V2.0.0
* @date 2019/07/01
* @brief This is the header file for "test_payload_cam_media.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_PAYLOAD_CAM_MEDIA_H
#define TEST_PAYLOAD_CAM_MEDIA_H
/* Includes ------------------------------------------------------------------*/
#if PSDK_ARCH_SYS_LINUX
#include "psdk_typedef.h"
#include "psdk_payload_camera.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_CameraMediaInit(void);
T_PsdkReturnCode PsdkTest_CameraMediaGetFileInfo(const char *filePath, T_PsdkCameraMediaFileInfo *fileInfo);
#ifdef __cplusplus
}
#endif
#endif
#endif // TEST_PAYLOAD_CAM_MEDIA_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,63 @@
/**
********************************************************************
* @file test_data_channel.c
* @version V2.0.0
* @date 2019/9/30
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_data_channel.h"
#include "psdk_data_channel.h"
#include "psdk_logger.h"
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode PsdkTest_DataChannelSetBandwidthProportionForHighspeedChannel(
T_PsdkDataChannelBandwidthProportionOfHighspeedChannel bandwidthProportion)
{
T_PsdkReturnCode psdkStat;
psdkStat = PsdkDataChannel_SetBandwidthProportionForHighspeedChannel(bandwidthProportion);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("set bandwidth proportion for high-speed channel error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,56 @@
/**
********************************************************************
* @file test_data_channel.h
* @version V2.0.0
* @date 2019/9/30
* @brief This is the header file for "test_data_channel.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_DATA_CHANNEL_H
#define TEST_DATA_CHANNEL_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#include "psdk_data_channel.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_DataChannelSetBandwidthProportionForHighspeedChannel(
T_PsdkDataChannelBandwidthProportionOfHighspeedChannel bandwidthProportion);
#ifdef __cplusplus
}
#endif
#endif // TEST_DATA_CHANNEL_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,165 @@
/**
********************************************************************
* @file test_data_subscription.c
* @version V2.0.0
* @date 2019/8/15
* @brief
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <utils/util_misc.h>
#include "test_data_subscription.h"
#include "psdk_logger.h"
#include "psdk_platform.h"
/* Private constants ---------------------------------------------------------*/
#define DATA_SUBSCRIPTION_TASK_FREQ (1)
#define DATA_SUBSCRIPTION_TASK_STACK_SIZE (2048)
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static void *UserDataSubscription_Task(void *arg);
static T_PsdkReturnCode PsdkTest_DataSubscriptionReceiveQuaternionCallback(const uint8_t *data, uint16_t dataSize,
const T_PsdkDataSubscriptiontTimestamp *timestamp);
/* Private variables ---------------------------------------------------------*/
static T_PsdkTaskHandle s_userDataSubscriptionThread;
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode PsdkTest_DataSubscriptionInit(void)
{
T_PsdkReturnCode psdkStat;
psdkStat = PsdkDataSubscription_Init();
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("init data subscription module error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
psdkStat = PsdkDataSubscription_RegTopicSync(PSDK_DATA_SUBSCRIPTION_TOPIC_QUATERNION, 10,
PsdkTest_DataSubscriptionReceiveQuaternionCallback);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Subscribe topic QUATERNION error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
psdkStat = PsdkDataSubscription_RegTopicSync(PSDK_DATA_SUBSCRIPTION_TOPIC_VELOCITY, 1, NULL);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Subscribe topic VELOCITY error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
psdkStat = PsdkDataSubscription_RegTopicSync(PSDK_DATA_SUBSCRIPTION_TOPIC_GPS_POSITION, 1, NULL);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Subscribe topic GPS_POSITION error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (PsdkOsal_TaskCreate(&s_userDataSubscriptionThread, UserDataSubscription_Task, "user_subscription_task",
DATA_SUBSCRIPTION_TASK_STACK_SIZE, NULL) !=
PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("user data subscription task create error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *UserDataSubscription_Task(void *arg)
{
T_PsdkReturnCode psdkStat;
T_PsdkDataSubscriptionQuaternion quaternion = {0};
T_PsdkDataSubscriptionVelocity velocity = {0};
T_PsdkDataSubscriptiontTimestamp timestamp = {0};
T_PsdkDataSubscriptionGpsPosition gpsPosition = {0};
USER_UTIL_UNUSED(arg);
while (1) {
PsdkOsal_TaskSleepMs(1000 / DATA_SUBSCRIPTION_TASK_FREQ);
psdkStat = PsdkDataSubscription_GetValueOfTopicWithTimestamp(PSDK_DATA_SUBSCRIPTION_TOPIC_QUATERNION,
(uint8_t *) &quaternion,
sizeof(T_PsdkDataSubscriptionQuaternion),
&timestamp);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get value of topic quaternion error.");
} else {
PsdkLogger_UserLogDebug("timestamp: millisecond %u microsecond %u.", timestamp.millisecond,
timestamp.microsecond);
PsdkLogger_UserLogDebug("quaternion: %f %f %f %f.", quaternion.q0, quaternion.q1, quaternion.q2,
quaternion.q3);
}
psdkStat = PsdkDataSubscription_GetValueOfTopicWithTimestamp(PSDK_DATA_SUBSCRIPTION_TOPIC_VELOCITY,
(uint8_t *) &velocity,
sizeof(T_PsdkDataSubscriptionVelocity),
&timestamp);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get value of topic velocity error.");
} else {
PsdkLogger_UserLogDebug("velocity: x %f y %f z %f, healthFlag %d.", velocity.data.x, velocity.data.y,
velocity.data.z, velocity.health);
}
psdkStat = PsdkDataSubscription_GetValueOfTopicWithTimestamp(PSDK_DATA_SUBSCRIPTION_TOPIC_GPS_POSITION,
(uint8_t *) &gpsPosition,
sizeof(T_PsdkDataSubscriptionGpsPosition),
&timestamp);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get value of topic gps position error.");
} else {
PsdkLogger_UserLogDebug("gps position: x %d y %d z %d.", gpsPosition.x, gpsPosition.y, gpsPosition.z);
}
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
static T_PsdkReturnCode PsdkTest_DataSubscriptionReceiveQuaternionCallback(const uint8_t *data, uint16_t dataSize,
const T_PsdkDataSubscriptiontTimestamp *timestamp)
{
T_PsdkDataSubscriptionQuaternion *quaternion = (T_PsdkDataSubscriptionQuaternion *) data;
USER_UTIL_UNUSED(dataSize);
PsdkLogger_UserLogDebug("receive quaternion data.");
PsdkLogger_UserLogDebug("timestamp: millisecond %u microsecond %u.", timestamp->millisecond,
timestamp->microsecond);
PsdkLogger_UserLogDebug("quaternion: %f %f %f %f.", quaternion->q0, quaternion->q1, quaternion->q2, quaternion->q3);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,55 @@
/**
********************************************************************
* @file test_data_subscription.h
* @version V2.0.0
* @date 2019/8/15
* @brief This is the header file for "test_data_subscription.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_DATA_SUBSCRIPTION_H
#define TEST_DATA_SUBSCRIPTION_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#include "psdk_data_subscription.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_DataSubscriptionInit(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_DATA_SUBSCRIPTION_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,199 @@
/**
********************************************************************
* @file test_data_transmission.c
* @version V2.0.0
* @date 2019/8/3
* @brief
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_data_transmission.h"
#include "psdk_data_transmission.h"
#include "psdk_logger.h"
#include "psdk_platform.h"
#include "utils/util_misc.h"
/* Private constants ---------------------------------------------------------*/
#define DATA_TRANSMISSION_TASK_FREQ (1)
#define DATA_TRANSMISSION_TASK_STACK_SIZE (2048)
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static void *UserDataTransmission_Task(void *arg);
static T_PsdkReturnCode ReceiveDataFromMobile(const uint8_t *data, uint16_t len);
static T_PsdkReturnCode ReceiveDataFromOnboardComputer(const uint8_t *data, uint16_t len);
/* Private variables ---------------------------------------------------------*/
static T_PsdkTaskHandle s_userDataTransmissionThread;
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode PsdkTest_DataTransmissionInit(void)
{
T_PsdkReturnCode psdkStat;
char ipAddr[PSDK_IP_ADDR_STR_SIZE_MAX] = {0};
uint16_t port = 0;
psdkStat = PsdkDataTransmission_Init();
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("init data transmission module error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
psdkStat = PsdkDataTransmission_RegReceiveDataFromMobileCallback(ReceiveDataFromMobile);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("register receive data from mobile error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
psdkStat = PsdkDataTransmission_RegReceiveDataFromOsdkCallback(ReceiveDataFromOnboardComputer);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("register receive data from onboard coputer error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (PsdkOsal_TaskCreate(&s_userDataTransmissionThread, UserDataTransmission_Task, "user_transmission_task",
DATA_TRANSMISSION_TASK_STACK_SIZE, NULL) !=
PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("user data transmission task create error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
psdkStat = PsdkDataTransmission_GetDataStreamRemoteAddress(ipAddr, &port);
if (psdkStat == PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogInfo("get data stream remote address: %s_%d", ipAddr, port);
} else {
PsdkLogger_UserLogError("get data stream remote address error.");
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *UserDataTransmission_Task(void *arg)
{
T_PsdkReturnCode psdkStat;
const uint8_t dataToBeSent[] = "PSDK Data Transmission Test Data.\r\n";
T_PsdkDataChannelState state = {0};
USER_UTIL_UNUSED(arg);
while (1) {
PsdkOsal_TaskSleepMs(1000 / DATA_TRANSMISSION_TASK_FREQ);
psdkStat = PsdkDataTransmission_SendDataToMobile(dataToBeSent, sizeof(dataToBeSent));
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
PsdkLogger_UserLogError("send data to mobile error.");
psdkStat = PsdkDataTransmission_SendDataToOsdk(dataToBeSent, sizeof(dataToBeSent));
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
PsdkLogger_UserLogError("send data to onboard computer error.");
#if PSDK_ARCH_SYS_LINUX
psdkStat = PsdkDataTransmission_SendDataStream(dataToBeSent, sizeof(dataToBeSent));
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS)
PsdkLogger_UserLogError("send data to data stream error.");
#endif
psdkStat = PsdkDataTransmission_GetSendToMobileState(&state);
if (psdkStat == PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogDebug(
"send to mobile state: realtimeBandwidthBeforeFlowController: %d, realtimeBandwidthAfterFlowController: %d, busyState: %d.",
state.realtimeBandwidthBeforeFlowController, state.realtimeBandwidthAfterFlowController,
state.busyState);
} else {
PsdkLogger_UserLogError("get send to mobile channel state error.");
}
psdkStat = PsdkDataTransmission_GetSendToOsdkState(&state);
if (psdkStat == PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogDebug(
"send to onboard computer state: realtimeBandwidthBeforeFlowController: %d, realtimeBandwidthAfterFlowController: %d, busyState: %d.",
state.realtimeBandwidthBeforeFlowController, state.realtimeBandwidthAfterFlowController,
state.busyState);
} else {
PsdkLogger_UserLogError("get send to onboard computer channel state error.");
}
#if PSDK_ARCH_SYS_LINUX
psdkStat = PsdkDataTransmission_GetDataStreamState(&state);
if (psdkStat == PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogDebug(
"data stream state: realtimeBandwidthLimit: %d, realtimeBandwidthBeforeFlowController: %d, busyState: %d.",
state.realtimeBandwidthLimit, state.realtimeBandwidthBeforeFlowController, state.busyState);
} else {
PsdkLogger_UserLogError("get data stream state error.");
}
#endif
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
static T_PsdkReturnCode ReceiveDataFromMobile(const uint8_t *data, uint16_t len)
{
char *printData = NULL;
printData = PsdkOsal_Malloc(len + 1);
if (printData == NULL) {
PsdkLogger_UserLogError("malloc memory for printData fail.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
strncpy(printData, (const char *) data, len);
printData[len] = '\0';
PsdkLogger_UserLogInfo("receive data from mobile: %s, len:%d.", printData, len);
PsdkOsal_Free(printData);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_PsdkReturnCode ReceiveDataFromOnboardComputer(const uint8_t *data, uint16_t len)
{
char *printData = NULL;
printData = PsdkOsal_Malloc(len + 1);
if (printData == NULL) {
PsdkLogger_UserLogError("malloc memory for printData fail.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
strncpy(printData, (const char *) data, len);
printData[len] = '\0';
PsdkLogger_UserLogInfo("receive data from onboard computer: %s, len:%d.", printData, len);
PsdkOsal_Free(printData);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,54 @@
/**
********************************************************************
* @file test_data_transmission.h
* @version V2.0.0
* @date 2019/8/3
* @brief This is the header file for "test_data_transmission.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_DATA_TRANSMISSION_H
#define TEST_DATA_TRANSMISSION_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_DataTransmissionInit(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_DATA_TRANSMISSION_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,59 @@
/**
********************************************************************
* @file test_payload_gimbal_emu.h
* @version V2.0.0
* @date 2019/9/19
* @brief This is the header file for "test_payload_gimbal_emu.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_PAYLOAD_GIMBAL_EMU_H
#define TEST_PAYLOAD_GIMBAL_EMU_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#include "psdk_gimbal.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_GimbalInit(void);
T_PsdkReturnCode PsdkTest_GimbalDeInit(void);
T_PsdkReturnCode
PsdkTest_GimbalRotate(E_PsdkGimbalRotationMode rotationMode, T_PsdkGimbalRotationProperty rotationProperty,
T_PsdkAttitude3d rotationValue); // unit if angle control: 0.1 degree, unit if speed control: 0.1 degree/s
#ifdef __cplusplus
}
#endif
#endif // TEST_PAYLOAD_GIMBAL_EMU_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,824 @@
/**
********************************************************************
* @file test_mop_channel.c
* @version V2.0.0
* @date 1/14/20
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#if PSDK_ARCH_SYS_LINUX
#include <utils/util_misc.h>
#include <stdio.h>
#include <utils/util_md5.h>
#include "psdk_mop_channel.h"
#include "psdk_logger.h"
#include "psdk_platform.h"
#include "test_mop_channel.h"
/* Private constants ---------------------------------------------------------*/
#define PSDK_MOP_CHANNEL_TASK_STACK_SIZE 2048
#define TEST_MOP_CHANNEL_INIT_TIMEMS (3 * 1000)
#define TEST_MOP_CHANNEL_RETRY_TIMEMS (3 * 1000)
#define TEST_MOP_CHANNEL_NORMAL_TRANSFOR_CHANNEL_ID 49152
#define TEST_MOP_CHANNEL_NORMAL_TRANSFOR_USING_RELIABLE_TRANS 0
#define TEST_MOP_CHANNEL_NORMAL_TRANSFOR_SEND_TASK_FREQ 1
#define TEST_MOP_CHANNEL_NORMAL_TRANSFOR_SEND_BUFFER (64 * 1024)
#define TEST_MOP_CHANNEL_NORMAL_TRANSFOR_RECV_BUFFER (100 * 1024)
#define TEST_MOP_CHANNEL_FILE_SERVICE_CHANNEL_ID 49153
#define TEST_MOP_CHANNEL_FILE_SERVICE_SEND_BUFFER (3 * 1024 * 1024)
#define TEST_MOP_CHANNEL_FILE_SERVICE_RECV_BUFFER (100 * 1024)
#define TEST_MOP_CHANNEL_FILE_SERVICE_CLIENT_MAX_SUPPORT_NUM 10
#define TEST_MOP_CHANNEL_FILE_SERVICE_FILE_PATH "../../../../../api_sample/mop_channel/mop_channel_test_file/mop_send_test_file.mp4"
/* Private types -------------------------------------------------------------*/
typedef enum {
MOP_FILE_SERVICE_DOWNLOAD_IDEL = 0,
MOP_FILE_SERVICE_DOWNLOAD_REQUEST_START,
MOP_FILE_SERVICE_DOWNLOAD_FILE_INFO_SUCCESS,
MOP_FILE_SERVICE_DOWNLOAD_FILE_INFO_FAILED,
MOP_FILE_SERVICE_DOWNLOAD_DATA_SENDING,
MOP_FILE_SERVICE_DOWNLOAD_FINISHED_SUCCESS,
MOP_FILE_SERVICE_DOWNLOAD_FINISHED_FAILED,
MOP_FILE_SERVICE_DOWNLOAD_STOP,
} E_MopFileServiceDownloadState;
typedef enum {
MOP_FILE_SERVICE_UPLOAD_IDEL = 0,
MOP_FILE_SERVICE_UPLOAD_REQUEST_START,
MOP_FILE_SERVICE_UPLOAD_FILE_INFO_SUCCESS,
MOP_FILE_SERVICE_UPLOAD_FILE_INFO_FAILED,
MOP_FILE_SERVICE_UPLOAD_DATA_SENDING,
MOP_FILE_SERVICE_UPLOAD_FINISHED_SUCCESS,
MOP_FILE_SERVICE_UPLOAD_FINISHED_FAILED,
MOP_FILE_SERVICE_UPLOAD_STOP,
} E_MopFileServiceUploadState;
typedef struct {
uint8_t index;
T_PsdkTaskHandle clientRecvTask;
T_PsdkTaskHandle clientSendTask;
T_PsdkMopChannelHandle clientHandle;
E_MopFileServiceDownloadState downloadState;
uint16_t downloadSeqNum;
E_MopFileServiceUploadState uploadState;
uint16_t uploadSeqNum;
} T_MopFileServiceClientContent;
/* Private values -------------------------------------------------------------*/
static T_PsdkMopChannelHandle s_testMopChannelNormalHandle;
static T_PsdkMopChannelHandle s_testMopChannelNormalOutHandle;
static T_PsdkTaskHandle s_testMopChannelNormalSendTask;
static T_PsdkTaskHandle s_testMopChannelNormalRecvTask;
static T_PsdkSemHandle s_testMopChannelReadySema;
static bool s_testMopChannelConnected = false;
static T_PsdkTaskHandle s_fileServiceMopChannelAcceptTask;
static T_PsdkMopChannelHandle s_fileServiceMopChannelHandle;
static T_MopFileServiceClientContent s_fileServiceContent[TEST_MOP_CHANNEL_FILE_SERVICE_CLIENT_MAX_SUPPORT_NUM];
/* Private functions declaration ---------------------------------------------*/
static void *PsdkTest_MopChannelSendNormalTask(void *arg);
static void *PsdkTest_MopChannelRecvNormalTask(void *arg);
static void *PsdkTest_MopChannelFileServiceAcceptTask(void *arg);
static void *PsdkTest_MopChannelFileServiceRecvTask(void *arg);
static void *PsdkTest_MopChannelFileServiceSendTask(void *arg);
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode PsdkTest_MopChannelInit(void)
{
T_PsdkReturnCode returnCode;
returnCode = PsdkOsal_SemaphoreCreate(&s_testMopChannelReadySema, 0);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("mop channel create msdk sema error, stat:0x%08llX.", returnCode);
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
returnCode = PsdkMopChannel_Init();
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("mop channel init error, stat:0x%08llX.", returnCode);
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
returnCode = PsdkOsal_TaskCreate(&s_testMopChannelNormalSendTask, PsdkTest_MopChannelSendNormalTask,
"mop_msdk_send_task",
PSDK_MOP_CHANNEL_TASK_STACK_SIZE, NULL);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("mop channel msdk send task create error, stat:0x%08llX.", returnCode);
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
returnCode = PsdkOsal_TaskCreate(&s_testMopChannelNormalRecvTask, PsdkTest_MopChannelRecvNormalTask,
"mop_msdk_recv_task", PSDK_MOP_CHANNEL_TASK_STACK_SIZE, NULL);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("mop channel msdk recv task create error, stat:0x%08llX.", returnCode);
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
returnCode = PsdkOsal_TaskCreate(&s_fileServiceMopChannelAcceptTask, PsdkTest_MopChannelFileServiceAcceptTask,
"mop_msdk_accept_task", PSDK_MOP_CHANNEL_TASK_STACK_SIZE, NULL);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("mop channel osdk recv task create error, stat:0x%08llX.", returnCode);
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
static void *PsdkTest_MopChannelSendNormalTask(void *arg)
{
uint8_t *sendBuf = NULL;
uint32_t realLen = 0;
T_PsdkReturnCode returnCode;
uint32_t sendDataCount = 0;
USER_UTIL_UNUSED(arg);
PsdkOsal_TaskSleepMs(TEST_MOP_CHANNEL_INIT_TIMEMS);
sendBuf = PsdkOsal_Malloc(TEST_MOP_CHANNEL_NORMAL_TRANSFOR_SEND_BUFFER);
if (sendBuf == NULL) {
PsdkLogger_UserLogError("malloc send buffer error");
return NULL;
}
REWAIT:
returnCode = PsdkOsal_SemaphoreWait(s_testMopChannelReadySema);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("mop channel wait sema error, stat:0x%08llX.", returnCode);
return NULL;
}
while (1) {
if (s_testMopChannelConnected == false) {
sendDataCount = 0;
goto REWAIT;
}
sendDataCount++;
memset(sendBuf, sendDataCount, TEST_MOP_CHANNEL_NORMAL_TRANSFOR_SEND_BUFFER);
returnCode = PsdkMopChannel_SendData(s_testMopChannelNormalOutHandle, sendBuf,
TEST_MOP_CHANNEL_NORMAL_TRANSFOR_SEND_BUFFER, &realLen);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("mop channel send data to channel error,stat:0x%08llX", returnCode);
} else {
PsdkLogger_UserLogInfo("mop channel send data to channel length:%d count:%d", realLen, sendDataCount);
}
PsdkOsal_TaskSleepMs(1000 / TEST_MOP_CHANNEL_NORMAL_TRANSFOR_SEND_TASK_FREQ);
}
}
#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
static void *PsdkTest_MopChannelRecvNormalTask(void *arg)
{
USER_UTIL_UNUSED(arg);
uint8_t *recvBuf = NULL;
uint32_t realLen;
T_PsdkReturnCode returnCode;
uint32_t recvDataCount = 0;
PsdkOsal_TaskSleepMs(TEST_MOP_CHANNEL_INIT_TIMEMS);
#if TEST_MOP_CHANNEL_NORMAL_TRANSFOR_USING_RELIABLE_TRANS
returnCode = PsdkMopChannel_Create(&s_testMopChannelNormalHandle, PSDK_MOP_CHANNEL_TRANS_RELIABLE);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("mop channel create send handle error, stat:0x%08llX.", returnCode);
return NULL;
}
#else
returnCode = PsdkMopChannel_Create(&s_testMopChannelNormalHandle, PSDK_MOP_CHANNEL_TRANS_UNRELIABLE);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("mop channel create send handle error, stat:0x%08llX.", returnCode);
return NULL;
}
#endif
REBIND:
returnCode = PsdkMopChannel_Bind(s_testMopChannelNormalHandle, TEST_MOP_CHANNEL_NORMAL_TRANSFOR_CHANNEL_ID);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("mop bind channel error :0x%08llX", returnCode);
PsdkOsal_TaskSleepMs(TEST_MOP_CHANNEL_RETRY_TIMEMS);
goto REBIND;
}
REACCEPT:
returnCode = PsdkMopChannel_Accept(s_testMopChannelNormalHandle, &s_testMopChannelNormalOutHandle);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogWarn("mop accept channel error :0x%08llX", returnCode);
PsdkOsal_TaskSleepMs(TEST_MOP_CHANNEL_RETRY_TIMEMS);
goto REACCEPT;
}
PsdkLogger_UserLogInfo("mop channel is connected");
recvBuf = PsdkOsal_Malloc(TEST_MOP_CHANNEL_NORMAL_TRANSFOR_RECV_BUFFER);
if (recvBuf == NULL) {
PsdkLogger_UserLogError("malloc recv buffer error");
return NULL;
}
s_testMopChannelConnected = true;
returnCode = PsdkOsal_SemaphorePost(s_testMopChannelReadySema);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("mop channel post sema error, stat:0x%08llX.", returnCode);
return NULL;
}
while (1) {
memset(recvBuf, 0, TEST_MOP_CHANNEL_NORMAL_TRANSFOR_RECV_BUFFER);
returnCode = PsdkMopChannel_RecvData(s_testMopChannelNormalOutHandle, recvBuf,
TEST_MOP_CHANNEL_NORMAL_TRANSFOR_RECV_BUFFER, &realLen);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
if (returnCode == PSDK_ERROR_MOP_CHANNEL_MODULE_CODE_CONNECTION_CLOSE) {
PsdkLogger_UserLogInfo("mop channel is disconnected");
s_testMopChannelConnected = false;
PsdkOsal_TaskSleepMs(TEST_MOP_CHANNEL_RETRY_TIMEMS);
PsdkMopChannel_Close(s_testMopChannelNormalOutHandle);
PsdkMopChannel_Destroy(s_testMopChannelNormalOutHandle);
goto REACCEPT;
}
} else {
PsdkLogger_UserLogInfo("mop channel recv data from channel length:%d count:%d", realLen, recvDataCount++);
}
}
}
#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
static void *PsdkTest_MopChannelFileServiceAcceptTask(void *arg)
{
T_PsdkReturnCode returnCode;
uint8_t currentClientNum = 0;
USER_UTIL_UNUSED(arg);
PsdkLogger_UserLogDebug("[File-Service] Start the file service.");
returnCode = PsdkMopChannel_Create(&s_fileServiceMopChannelHandle, PSDK_MOP_CHANNEL_TRANS_RELIABLE);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("[File-Service] mop channel create send handle error, stat:0x%08llX.", returnCode);
return NULL;
}
REBIND:
returnCode = PsdkMopChannel_Bind(s_fileServiceMopChannelHandle, TEST_MOP_CHANNEL_FILE_SERVICE_CHANNEL_ID);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("[File-Service] mop bind channel error :0x%08llX", returnCode);
PsdkOsal_TaskSleepMs(TEST_MOP_CHANNEL_RETRY_TIMEMS);
goto REBIND;
}
while (1) {
REACCEPT:
returnCode = PsdkMopChannel_Accept(s_fileServiceMopChannelHandle,
&s_fileServiceContent[currentClientNum].clientHandle);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogWarn("[File-Service] mop accept channel error :0x%08llX", returnCode);
PsdkOsal_TaskSleepMs(TEST_MOP_CHANNEL_RETRY_TIMEMS);
goto REACCEPT;
}
PsdkLogger_UserLogInfo("[File-Service] [Client:%d] mop channel is connected", currentClientNum);
s_fileServiceContent[currentClientNum].index = currentClientNum;
returnCode = PsdkOsal_TaskCreate(&s_fileServiceContent[currentClientNum].clientRecvTask,
PsdkTest_MopChannelFileServiceRecvTask,
"mop_file_service_recv_task",
PSDK_MOP_CHANNEL_TASK_STACK_SIZE,
&s_fileServiceContent[currentClientNum].index);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("mop channel recv task create error, stat:0x%08llX.", returnCode);
return NULL;
}
returnCode = PsdkOsal_TaskCreate(&s_fileServiceContent[currentClientNum].clientSendTask,
PsdkTest_MopChannelFileServiceSendTask,
"mop_file_service_send_task",
PSDK_MOP_CHANNEL_TASK_STACK_SIZE,
&s_fileServiceContent[currentClientNum].index);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("mop channel send task create error, stat:0x%08llX.", returnCode);
return NULL;
}
currentClientNum++;
if (currentClientNum > TEST_MOP_CHANNEL_FILE_SERVICE_CLIENT_MAX_SUPPORT_NUM) {
currentClientNum = 0;
}
}
}
#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
static void *PsdkTest_MopChannelFileServiceSendTask(void *arg)
{
T_PsdkReturnCode returnCode;
uint8_t clientNum = *(uint8_t *) arg;
uint32_t sendRealLen = 0;
uint8_t *sendBuf;
MD5_CTX downloadFileMd5Ctx;
FILE *downloadFile = NULL;
uint8_t downloadFileMd5[PSDK_MD5_BUFFER_LEN] = {0};
uint64_t downloadFileTotalSize = 0;
uint64_t downloadWriteLen;
uint16_t downloadPackCount = 0;
T_PsdkMopChannel_FileInfo downloadFileInfo = {0};
T_PsdkMopChannel_FileTransfor transforAck = {0};
T_PsdkMopChannel_FileTransfor fileData = {0};
T_PsdkMopChannel_FileTransfor fileInfo = {0};
uint32_t downloadStartMs = 0;
uint32_t downloadEndMs = 0;
uint32_t downloadDurationMs;
psdk_f32_t downloadRate;
sendBuf = PsdkOsal_Malloc(TEST_MOP_CHANNEL_FILE_SERVICE_SEND_BUFFER);
if (sendBuf == NULL) {
PsdkLogger_UserLogError("[File-Service] [Client:%d] malloc send buffer error", clientNum);
return NULL;
}
while (1) {
switch (s_fileServiceContent[clientNum].uploadState) {
case MOP_FILE_SERVICE_UPLOAD_REQUEST_START:
transforAck.cmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_ACK;
transforAck.subcmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_ACK_OK;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum;
transforAck.dataLen = 0;
PsdkMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle, (uint8_t *) &transforAck,
UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data),
&sendRealLen);
PsdkLogger_UserLogDebug("[File-Service] [Client:%d] upload request ack", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
break;
case MOP_FILE_SERVICE_UPLOAD_FILE_INFO_SUCCESS:
transforAck.cmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_ACK;
transforAck.subcmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_ACK_OK;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum;
transforAck.dataLen = 0;
PsdkMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle, (uint8_t *) &transforAck,
UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data),
&sendRealLen);
PsdkLogger_UserLogDebug("[File-Service] [Client:%d] upload file info success", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
break;
case MOP_FILE_SERVICE_UPLOAD_FILE_INFO_FAILED:
transforAck.cmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_ACK;
transforAck.subcmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_ACK_REJECTED;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum;
transforAck.dataLen = 0;
PsdkMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle, (uint8_t *) &transforAck,
UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data),
&sendRealLen);
PsdkLogger_UserLogError("[File-Service] [Client:%d] upload file info failed", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
break;
case MOP_FILE_SERVICE_UPLOAD_FINISHED_SUCCESS:
transforAck.cmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_RESULT;
transforAck.subcmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_RESULT_OK;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum++;
transforAck.dataLen = 0;
PsdkMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle,
(uint8_t *) &transforAck,
UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data),
&sendRealLen);
PsdkLogger_UserLogDebug("[File-Service] [Client:%d] upload finished success", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
break;
case MOP_FILE_SERVICE_UPLOAD_FINISHED_FAILED:
transforAck.cmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_RESULT;
transforAck.subcmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_RESULT_FAILED;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum++;
transforAck.dataLen = 0;
PsdkMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle,
(uint8_t *) &transforAck,
UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data),
&sendRealLen);
PsdkLogger_UserLogError("[File-Service] [Client:%d] upload finished failed", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
break;
case MOP_FILE_SERVICE_UPLOAD_STOP:
transforAck.cmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_STOP_ACK;
transforAck.subcmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_STOP_UPLOAD;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum++;
transforAck.dataLen = 0;
PsdkMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle,
(uint8_t *) &transforAck,
UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data),
&sendRealLen);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
break;
default:
break;
}
switch (s_fileServiceContent[clientNum].downloadState) {
case MOP_FILE_SERVICE_DOWNLOAD_REQUEST_START:
transforAck.cmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_ACK;
transforAck.subcmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_ACK_OK;
transforAck.seqNum = s_fileServiceContent[clientNum].downloadSeqNum;
transforAck.dataLen = 0;
PsdkMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle, (uint8_t *) &transforAck,
UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data),
&sendRealLen);
PsdkLogger_UserLogDebug("[File-Service] [Client:%d] download request ack", clientNum);
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_IDEL;
break;
case MOP_FILE_SERVICE_DOWNLOAD_STOP:
transforAck.cmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_STOP_ACK;
transforAck.subcmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_STOP_DOWNLOAD;
transforAck.seqNum = s_fileServiceContent[clientNum].uploadSeqNum++;
transforAck.dataLen = 0;
PsdkMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle,
(uint8_t *) &transforAck,
UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data),
&sendRealLen);
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_IDEL;
break;
case MOP_FILE_SERVICE_DOWNLOAD_FILE_INFO_SUCCESS:
UtilMd5_Init(&downloadFileMd5Ctx);
PsdkOsal_GetTimeMs(&downloadStartMs);
if (downloadFile != NULL) {
fclose(downloadFile);
}
downloadFile = fopen(TEST_MOP_CHANNEL_FILE_SERVICE_FILE_PATH, "rb");
if (downloadFile == NULL) {
PsdkLogger_UserLogError("[File-Service] [Client:%d] download open file error",
clientNum);
return NULL;
}
downloadFileTotalSize = 0;
while (1) {
returnCode = fseek(downloadFile, downloadFileTotalSize, SEEK_SET);
if (returnCode != 0) {
PsdkLogger_UserLogError(
"[File-Service] [Client:%d] mop channel fseek file data fail.", clientNum);
}
downloadWriteLen = fread(sendBuf, 1, TEST_MOP_CHANNEL_FILE_SERVICE_SEND_BUFFER,
downloadFile);
if (downloadWriteLen > 0) {
downloadFileTotalSize += downloadWriteLen;
UtilMd5_Update(&downloadFileMd5Ctx, sendBuf, downloadWriteLen);
if (downloadWriteLen < TEST_MOP_CHANNEL_FILE_SERVICE_SEND_BUFFER) {
break;
}
}
}
UtilMd5_Final(&downloadFileMd5Ctx, downloadFileMd5);
fileInfo.cmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_INFO;
fileInfo.subcmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_DOWNLOAD_REQUEST;
fileInfo.seqNum = s_fileServiceContent[clientNum].downloadSeqNum;
fileInfo.dataLen = sizeof(fileInfo) - UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data);
fileInfo.data.fileInfo.isExist = true;
downloadFileInfo.fileLength = downloadFileTotalSize;
fileInfo.data.fileInfo.fileLength = downloadFileTotalSize;
strcpy(fileInfo.data.fileInfo.fileName, "test.mp4");
memcpy(&fileInfo.data.fileInfo.md5Buf, &downloadFileMd5, sizeof(downloadFileMd5));
PsdkMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle, (uint8_t *) &fileInfo,
sizeof(T_PsdkMopChannel_FileTransfor),
&sendRealLen);
PsdkLogger_UserLogDebug(
"[File-Service] [Client:%d] download ack file info exist:%d length:%d name:%s",
clientNum, fileInfo.data.fileInfo.isExist,
fileInfo.data.fileInfo.fileLength, fileInfo.data.fileInfo.fileName);
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_DATA_SENDING;
downloadFileTotalSize = 0;
downloadPackCount = 0;
break;
case MOP_FILE_SERVICE_DOWNLOAD_DATA_SENDING:
if (downloadFile == NULL) {
PsdkLogger_UserLogError("[File-Service] [Client:%d] download file object is NULL.");
break;
}
returnCode = fseek(downloadFile, downloadFileTotalSize, SEEK_SET);
if (returnCode != 0) {
PsdkLogger_UserLogError("[File-Service] [Client:%d] download fseek file data fail.",
clientNum);
break;
}
downloadWriteLen = fread(&sendBuf[UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data)],
1,
(TEST_MOP_CHANNEL_FILE_SERVICE_SEND_BUFFER -
UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data)),
downloadFile);
if (downloadWriteLen > 0) {
downloadFileTotalSize += downloadWriteLen;
downloadPackCount++;
fileData.cmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_DATA;
fileData.dataLen = downloadWriteLen;
fileData.seqNum++;
if (downloadWriteLen ==
(TEST_MOP_CHANNEL_FILE_SERVICE_SEND_BUFFER -
UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data))) {
fileData.subcmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_NORMAL;
} else {
fileData.subcmd = PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_END;
}
memcpy(sendBuf, &fileData, UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data));
returnCode = PsdkMopChannel_SendData(s_fileServiceContent[clientNum].clientHandle, sendBuf,
(downloadWriteLen +
UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data)),
&sendRealLen);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError(
"[File-Service] [Client:%d] download send file data error,stat:0x%08llX",
clientNum, returnCode);
if (returnCode == PSDK_ERROR_MOP_CHANNEL_MODULE_CODE_CONNECTION_CLOSE) {
break;
}
} else {
PsdkLogger_UserLogInfo(
"[File-Service] [Client:%d] download send file data length:%d count:%d total:%d percent: %.1f %%",
clientNum, sendRealLen, downloadPackCount, downloadFileTotalSize,
(psdk_f32_t) (downloadFileTotalSize) * 100 / (psdk_f32_t) downloadFileInfo.fileLength);
}
if (fileData.subcmd == PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_END) {
PsdkOsal_GetTimeMs(&downloadEndMs);
downloadDurationMs = downloadEndMs - downloadStartMs;
if (downloadDurationMs != 0) {
downloadRate = (psdk_f32_t) downloadFileInfo.fileLength * 1000 /
(psdk_f32_t) (downloadDurationMs);
PsdkLogger_UserLogInfo(
"[File-Service] [Client:%d] download finished totalTime:%d, rate:%.2f Byte/s",
clientNum, downloadDurationMs, downloadRate);
}
}
break;
default:
break;
}
}
}
}
#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
static void *PsdkTest_MopChannelFileServiceRecvTask(void *arg)
{
T_PsdkReturnCode returnCode;
uint8_t clientNum = *(uint8_t *) arg;
uint32_t recvRealLen;
uint8_t *recvBuf;
MD5_CTX uploadFileMd5Ctx;
FILE *uploadFile = NULL;
uint8_t uploadFileMd5[PSDK_MD5_BUFFER_LEN] = {0};
uint32_t uploadFileTotalSize = 0;
int32_t uploadWriteLen;
T_PsdkMopChannel_FileInfo uploadFileInfo = {0};
uint32_t uploadStartMs = 0;
uint32_t uploadEndMs = 0;
psdk_f32_t uploadRate;
recvBuf = PsdkOsal_Malloc(TEST_MOP_CHANNEL_FILE_SERVICE_RECV_BUFFER);
if (recvBuf == NULL) {
PsdkLogger_UserLogError("[File-Service] [Client:%d] malloc recv buffer error", clientNum);
return NULL;
}
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_IDEL;
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_IDEL;
while (1) {
returnCode = PsdkMopChannel_RecvData(s_fileServiceContent[clientNum].clientHandle, recvBuf,
TEST_MOP_CHANNEL_FILE_SERVICE_RECV_BUFFER, &recvRealLen);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkOsal_TaskSleepMs(1000);
if (returnCode == PSDK_ERROR_MOP_CHANNEL_MODULE_CODE_CONNECTION_CLOSE) {
PsdkLogger_UserLogInfo("[File-Service] [Client:%d] mop channel is disconnected", clientNum);
PsdkOsal_TaskDestroy(s_fileServiceContent[clientNum].clientRecvTask);
PsdkMopChannel_Close(s_fileServiceContent[clientNum].clientHandle);
PsdkMopChannel_Destroy(s_fileServiceContent[clientNum].clientHandle);
}
} else {
if (&recvRealLen > 0) {
T_PsdkMopChannel_FileTransfor *fileTransfor = (T_PsdkMopChannel_FileTransfor *) recvBuf;
switch (fileTransfor->cmd) {
case PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_REQUEST:
if (fileTransfor->subcmd == PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_REQUEST_UPLOAD) {
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_REQUEST_START;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
PsdkLogger_UserLogDebug("[File-Service] [Client:%d] upload request is ok", clientNum);
UtilMd5_Init(&uploadFileMd5Ctx);
uploadFileTotalSize = 0;
PsdkOsal_GetTimeMs(&uploadStartMs);
} else if (fileTransfor->subcmd == PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_REQUEST_DOWNLOAD) {
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_REQUEST_START;
s_fileServiceContent[clientNum].downloadSeqNum = fileTransfor->seqNum;
PsdkLogger_UserLogDebug("[File-Service] [Client:%d] download request is ok", clientNum);
}
break;
case PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_DOWNLOAD_REQ:
PsdkLogger_UserLogDebug("[File-Service] [Client:%d] download request file name:%s", clientNum,
fileTransfor->data.dwonloadReq.fileName);
if (strcmp(fileTransfor->data.dwonloadReq.fileName, "test.mp4") == 0) {
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_FILE_INFO_SUCCESS;
s_fileServiceContent[clientNum].downloadSeqNum = fileTransfor->seqNum;
} else {
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_FILE_INFO_FAILED;
s_fileServiceContent[clientNum].downloadSeqNum = fileTransfor->seqNum;
}
break;
case PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_INFO:
PsdkLogger_UserLogDebug(
"[File-Service] [Client:%d] upload file info length:%d exist:%d name:%s seq:%d", clientNum,
fileTransfor->data.fileInfo.fileLength,
fileTransfor->data.fileInfo.isExist,
fileTransfor->data.fileInfo.fileName, fileTransfor->seqNum);
uploadFileInfo.fileLength = fileTransfor->data.fileInfo.fileLength;
memcpy(uploadFileInfo.md5Buf, fileTransfor->data.fileInfo.md5Buf,
sizeof(uploadFileInfo.md5Buf));
if (uploadFile != NULL) {
fclose(uploadFile);
}
uploadFile = fopen(fileTransfor->data.fileInfo.fileName, "wb");
if (uploadFile == NULL) {
PsdkLogger_UserLogError("[File-Service] [Client:%d] open file error", clientNum);
return NULL;
}
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_FILE_INFO_SUCCESS;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
break;
case PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_DATA:
if (uploadFile == NULL) {
PsdkLogger_UserLogError("[File-Service] [Client:%d] open file error", clientNum);
return NULL;
}
if (fileTransfor->subcmd == PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_NORMAL) {
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_DATA_SENDING;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
uploadWriteLen = fwrite(&recvBuf[UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data)], 1,
fileTransfor->dataLen, uploadFile);
if (uploadWriteLen < 0) {
PsdkLogger_UserLogError(
"[File-Service] [Client:%d] upload write normal data to file error, stat:%d.",
clientNum,
uploadWriteLen);
} else {
uploadFileTotalSize += uploadWriteLen;
UtilMd5_Update(&uploadFileMd5Ctx,
&recvBuf[UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data)],
fileTransfor->dataLen);
if (uploadFileInfo.fileLength != 0) {
PsdkLogger_UserLogInfo(
"[File-Service] [Client:%d] upload write data to file success, len:%d percent:%.1f %%",
clientNum, uploadWriteLen,
(psdk_f32_t) (uploadFileTotalSize * 100) /
(psdk_f32_t) uploadFileInfo.fileLength);
}
}
} else if (fileTransfor->subcmd == PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_END) {
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_DATA_SENDING;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
uploadWriteLen = fwrite(&recvBuf[UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data)], 1,
fileTransfor->dataLen, uploadFile);
if (uploadWriteLen < 0) {
PsdkLogger_UserLogError(
"[File-Service] [Client:%d] upload write end data to file error, stat:%d.",
clientNum,
uploadWriteLen);
} else {
uploadFileTotalSize += uploadWriteLen;
UtilMd5_Update(&uploadFileMd5Ctx,
&recvBuf[UTIL_OFFSETOF(T_PsdkMopChannel_FileTransfor, data)],
fileTransfor->dataLen);
UtilMd5_Final(&uploadFileMd5Ctx, uploadFileMd5);
PsdkOsal_GetTimeMs(&uploadEndMs);
if (uploadEndMs - uploadStartMs > 0) {
uploadRate = (psdk_f32_t) uploadFileTotalSize * 1000 /
(psdk_f32_t) (uploadEndMs - uploadStartMs);
PsdkLogger_UserLogInfo(
"[File-Service] [Client:%d] upload write data to file success, len:%d percent:%.1f %%",
clientNum, uploadWriteLen,
(psdk_f32_t) (uploadFileTotalSize * 100) /
(psdk_f32_t) uploadFileInfo.fileLength);
PsdkLogger_UserLogInfo(
"[File-Service] [Client:%d] upload file finished, totalTime:%d ms rate:%.2f Byte/s",
clientNum, (uploadEndMs - uploadStartMs), uploadRate);
}
fclose(uploadFile);
uploadFile = NULL;
if (uploadFileInfo.fileLength == uploadFileTotalSize) {
if (memcmp(uploadFileInfo.md5Buf, uploadFileMd5, sizeof(uploadFileMd5)) == 0) {
PsdkLogger_UserLogDebug(
"[File-Service] [Client:%d] upload file md5 check success", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_FINISHED_SUCCESS;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
} else {
PsdkLogger_UserLogError(
"[File-Service] [Client:%d] upload file md5 check failed", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_FINISHED_FAILED;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
}
} else {
PsdkLogger_UserLogError(
"[File-Service] [Client:%d] upload file check file length error", clientNum);
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_FINISHED_FAILED;
s_fileServiceContent[clientNum].uploadSeqNum = fileTransfor->seqNum;
}
}
}
break;
case PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_RESULT:
if (fileTransfor->subcmd == PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_RESULT_OK) {
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_FINISHED_SUCCESS;
PsdkLogger_UserLogDebug("[File-Service] [Client:%d] download file result notify success",
clientNum);
} else {
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_FINISHED_FAILED;
PsdkLogger_UserLogError("[File-Service] [Client:%d] download file result notify failed",
clientNum);
}
break;
case PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_STOP_REQUEST:
if (fileTransfor->subcmd == PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_STOP_UPLOAD) {
s_fileServiceContent[clientNum].uploadState = MOP_FILE_SERVICE_UPLOAD_STOP;
PsdkLogger_UserLogDebug("[File-Service] [Client:%d] upload file stop", clientNum);
} else if (fileTransfor->subcmd == PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_STOP_DOWNLOAD) {
s_fileServiceContent[clientNum].downloadState = MOP_FILE_SERVICE_DOWNLOAD_STOP;
PsdkLogger_UserLogDebug("[File-Service] [Client:%d] download file stop", clientNum);
}
break;
default:
PsdkLogger_UserLogWarn("[File-Service] [Client:%d] recv the unknown command0x%02X",
clientNum, fileTransfor->cmd);
break;
}
}
}
}
}
#pragma GCC diagnostic pop
#endif
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,126 @@
/**
********************************************************************
* @file test_mop_channel.h
* @version V2.0.0
* @date 1/14/20
* @brief This is the header file for "test_mop_channel.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_MOP_CHANNEL_H
#define TEST_MOP_CHANNEL_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#if PSDK_ARCH_SYS_LINUX
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef enum {
PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_REQUEST = 0x50,
PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_ACK = 0x51,
PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_RESULT = 0x52,
PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_INFO = 0x60,
PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_DOWNLOAD_REQ = 0x61,
PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_FILE_DATA = 0x62,
PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_STOP_REQUEST = 0x63,
PSDK_MOP_CHANNEL_FILE_TRANSFOR_CMD_STOP_ACK = 0x64,
} E_PsdkMopChannel_FileTransforCmd;
typedef enum {
PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_REQUEST_UPLOAD = 0x00,
PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_REQUEST_DOWNLOAD = 0x01,
} E_PsdkMopChannel_FileTransforRequestSubCmd;
typedef enum {
PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_ACK_OK = 0x00,
PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_ACK_REJECTED = 0x01,
} E_PsdkMopChannel_FileTransforAckSubCmd;
typedef enum {
PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_RESULT_OK = 0x00,
PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_RESULT_FAILED = 0x01,
} E_PsdkMopChannel_FileTransforResultSubCmd;
typedef enum {
PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_INFO_DEFAULT = 0xFF,
} E_PsdkMopChannel_FileTransforFileInfoSubCmd;
typedef enum {
PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_DOWNLOAD_REQUEST = 0xFF,
} E_PsdkMopChannel_FileTransforFileDownloadRequestSubCmd;
typedef enum {
PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_NORMAL = 0x00,
PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_FILE_DATA_END = 0x01,
} E_PsdkMopChannel_FileTransforFileDataSubCmd;
typedef enum {
PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_STOP_UPLOAD = 0x00,
PSDK_MOP_CHANNEL_FILE_TRANSFOR_SUBCMD_STOP_DOWNLOAD = 0x01,
} E_PsdkMopChannel_FileTransforStopSubCmd;
#pragma pack(1)
typedef struct {
bool isExist;
uint32_t fileLength;
char fileName[32];
uint8_t md5Buf[16];
} T_PsdkMopChannel_FileInfo;
typedef struct {
char fileName[32];
} T_PsdkMopChannel_DwonloadReq;
typedef struct {
uint8_t cmd;
uint8_t subcmd;
uint16_t seqNum;
uint32_t dataLen;
union dataType {
T_PsdkMopChannel_FileInfo fileInfo;
T_PsdkMopChannel_DwonloadReq dwonloadReq;
uint8_t fileData[0];
} data;
} T_PsdkMopChannel_FileTransfor;
#pragma pack()
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_MopChannelInit(void);
#ifdef __cplusplus
}
#endif
#endif
#endif // TEST_MOP_CHANNEL_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,175 @@
/**
********************************************************************
* @file test_payload_collaboration.c
* @version V2.0.0
* @date 2019/9/3
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_payload_collaboration.h"
#include "psdk_payload_collaboration.h"
#include "psdk_logger.h"
#include "psdk_platform.h"
#include "utils/util_misc.h"
/* Private constants ---------------------------------------------------------*/
#define PSDK_TEST_PAYLOAD_COLLABORATION_TASK_FREQ (1)
#define PSDK_TEST_PAYLOAD_COLLABORATION_TASK_STACK_SIZE (2048)
#define PSDK_TEST_PAYLOAD_COLLABORATION_PAYLOADS_IN_DRONE_MAX_COUNT (3)
/* Private types -------------------------------------------------------------*/
typedef struct {
E_PsdkPayloadCollaborationCameraType cameraType;
bool hasOpticalZoomSpec;
bool hasHybridZoomFocalLength;
} T_PsdkTestPayloadPara;
/* Private functions declaration ---------------------------------------------*/
static void *PsdkTest_PayloadCollaborationTask(void *arg);
/* Private variables ---------------------------------------------------------*/
static T_PsdkTaskHandle s_payloadCollaborationThread;
static const T_PsdkTestPayloadPara s_payloadPara[] = {
{PSDK_PAYLOAD_COLLABORATION_CAMERA_TYPE_XT, false, false},
{PSDK_PAYLOAD_COLLABORATION_CAMERA_TYPE_X4S, true, true},
{PSDK_PAYLOAD_COLLABORATION_CAMERA_TYPE_X5S, true, true},
{PSDK_PAYLOAD_COLLABORATION_CAMERA_TYPE_X7, true, true},
{PSDK_PAYLOAD_COLLABORATION_CAMERA_TYPE_Z30, true, true},
{PSDK_PAYLOAD_COLLABORATION_CAMERA_TYPE_XT2, true, true},
{PSDK_PAYLOAD_COLLABORATION_CAMERA_TYPE_XTS, false, false},
{PSDK_PAYLOAD_COLLABORATION_CAMERA_TYPE_H20, true, true},
{PSDK_PAYLOAD_COLLABORATION_CAMERA_TYPE_H20T, true, true},
};
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode PsdkTest_PayloadCollaborationInit(void)
{
if (PsdkPayloadCollaboration_Init() != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("payload collaboration module init error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (PsdkOsal_TaskCreate(&s_payloadCollaborationThread, PsdkTest_PayloadCollaborationTask,
"user_payload_collaboration_task", PSDK_TEST_PAYLOAD_COLLABORATION_TASK_STACK_SIZE, NULL) !=
PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("user payload collaboration task create error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *PsdkTest_PayloadCollaborationTask(void *arg)
{
int i = 0;
unsigned int payloadParaIndex = 0;
T_PsdkReturnCode psdkStat;
E_PsdkPayloadCollaborationCameraType cameraType = PSDK_PAYLOAD_COLLABORATION_CAMERA_TYPE_UNKNOWN;
T_PsdkCameraOpticalZoomSpec cameraOpticalZoomSpec = {0};
uint16_t cameraHybridZoomFocalLength = 0;
T_PsdkAircraftInfoBaseInfo aircraftBaseInfo = {0};
E_PsdkAircraftInfoPayloadMountPosition requestedPayloadMountPosition;
USER_UTIL_UNUSED(arg);
while (1) {
PsdkOsal_TaskSleepMs(1000 / PSDK_TEST_PAYLOAD_COLLABORATION_TASK_FREQ);
psdkStat = PsdkAircraftInfo_GetBaseInfo(&aircraftBaseInfo);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get aircraft information error: 0x%08llX.", psdkStat);
continue;
}
for (i = 0; i < PSDK_TEST_PAYLOAD_COLLABORATION_PAYLOADS_IN_DRONE_MAX_COUNT; ++i) {
requestedPayloadMountPosition =
(E_PsdkAircraftInfoPayloadMountPosition) (i + PSDK_AIRCRAFT_INFO_PAYLOAD_MOUNT_POSITION_NO1);
if (requestedPayloadMountPosition == aircraftBaseInfo.payloadMountPosition)
continue;
if (aircraftBaseInfo.aircraftType == PSDK_AIRCRAFT_INFO_TYPE_M200_V2 ||
aircraftBaseInfo.aircraftType == PSDK_AIRCRAFT_INFO_TYPE_M210_V2 ||
aircraftBaseInfo.aircraftType == PSDK_AIRCRAFT_INFO_TYPE_M210RTK_V2) {
if (requestedPayloadMountPosition == PSDK_AIRCRAFT_INFO_PAYLOAD_MOUNT_POSITION_NO3) {
continue;
}
}
psdkStat = PsdkPayloadCollaboration_GetCameraTypeOfPayload(requestedPayloadMountPosition, &cameraType);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
continue;
}
PsdkLogger_UserLogDebug("camera type of payload mounted on NO.%d gimbal connector is %d.",
requestedPayloadMountPosition, cameraType);
for (payloadParaIndex = 0; payloadParaIndex < UTIL_ARRAY_SIZE(s_payloadPara); ++payloadParaIndex) {
if (s_payloadPara[payloadParaIndex].cameraType == cameraType)
break;
}
if (payloadParaIndex == UTIL_ARRAY_SIZE(s_payloadPara)) {
PsdkLogger_UserLogError("Not find payload parameters.");
continue;
}
if (s_payloadPara[payloadParaIndex].hasOpticalZoomSpec) {
psdkStat = PsdkPayloadCollaboration_GetCameraOpticalZoomSpecOfPayload(requestedPayloadMountPosition,
&cameraOpticalZoomSpec);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Get optical zoom specification error.");
} else {
PsdkLogger_UserLogDebug(
"camera optical zoom specification of payload mounted on NO.%d gimbal connector, maxFocalLength: %d, minFocalLength: %d, focalLengthStep: %d.",
requestedPayloadMountPosition, cameraOpticalZoomSpec.maxFocalLength,
cameraOpticalZoomSpec.minFocalLength, cameraOpticalZoomSpec.focalLengthStep);
}
}
if (s_payloadPara[payloadParaIndex].hasHybridZoomFocalLength) {
psdkStat = PsdkPayloadCollaboration_GetCameraHybridZoomFocalLengthOfPayload(
requestedPayloadMountPosition,
&cameraHybridZoomFocalLength);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Get hybrid zoom focal length error.");
} else {
PsdkLogger_UserLogDebug(
"camera hybrid zoom focal length of payload mounted on NO.%d gimbal connector, focalLength: %d.",
requestedPayloadMountPosition, cameraHybridZoomFocalLength);
}
}
}
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,54 @@
/**
********************************************************************
* @file test_payload_collaboration.h
* @version V2.0.0
* @date 2019/9/3
* @brief This is the header file for "test_payload_collaboration.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_PAYLOAD_COLLABORATION_H
#define TEST_PAYLOAD_COLLABORATION_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_PayloadCollaborationInit(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_PAYLOAD_COLLABORATION_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,151 @@
/**
********************************************************************
* @file test_positioning.c
* @version V2.0.0
* @date 2019/8/22
* @brief
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_positioning.h"
#include "psdk_positioning.h"
#include "psdk_logger.h"
#include "utils/util_misc.h"
#include "psdk_platform.h"
#include "time_synchronization/test_time_sync.h"
/* Private constants ---------------------------------------------------------*/
#define POSITIONING_TASK_FREQ (1)
#define POSITIONING_TASK_STACK_SIZE (2048)
#define TEST_EVENT_COUNT (2)
#define TEST_TIME_INTERVAL_AMONG_EVENTS_US (200000)
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static void *PsdkTest_PositioningTask(void *arg);
/* Private variables ---------------------------------------------------------*/
static T_PsdkTaskHandle s_userPositioningThread;
static int32_t s_eventIndex = 0;
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode PsdkTest_PositioningInit(void)
{
T_PsdkReturnCode psdkStat;
psdkStat = PsdkPositioning_Init();
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("positioning module init error.");
return psdkStat;
}
PsdkPositioning_SetTaskIndex(0);
if (PsdkOsal_TaskCreate(&s_userPositioningThread, PsdkTest_PositioningTask, "user_positioning_task",
POSITIONING_TASK_STACK_SIZE, NULL) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("user positioning task create error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *PsdkTest_PositioningTask(void *arg)
{
int32_t i = 0;
T_PsdkReturnCode psdkStat;
uint64_t ppsNewestTriggerTimeUs = 0;
T_PsdkPositioningEventInfo eventInfo[TEST_EVENT_COUNT] = {0};
T_PsdkPositioningPositionInfo positionInfo[TEST_EVENT_COUNT] = {0};
T_PsdkTimeSyncAircraftTime aircraftTime = {0};
USER_UTIL_UNUSED(arg);
while (1) {
PsdkOsal_TaskSleepMs(1000 / POSITIONING_TASK_FREQ);
psdkStat = PsdkTest_TimeSyncGetNewestPpsTriggerLocalTimeUs(&ppsNewestTriggerTimeUs);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get newest pps trigger time error: 0x%08llX.", psdkStat);
continue;
}
for (i = 0; i < TEST_EVENT_COUNT; ++i) {
eventInfo[i].eventSetIndex = s_eventIndex;
eventInfo[i].targetPointIndex = i;
psdkStat = PsdkTimeSync_TransferToAircraftTime(
ppsNewestTriggerTimeUs - 1000000 - i * TEST_TIME_INTERVAL_AMONG_EVENTS_US, &aircraftTime);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("transfer to aircraft time error: 0x%08llX.", psdkStat);
continue;
}
eventInfo[i].eventTime = aircraftTime;
}
psdkStat = PsdkPositioning_GetPositionInformationSync(TEST_EVENT_COUNT, eventInfo, positionInfo);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get position information error.");
continue;
}
PsdkLogger_UserLogDebug("request position of target points success.");
PsdkLogger_UserLogDebug("detail position information:");
for (i = 0; i < TEST_EVENT_COUNT; ++i) {
PsdkLogger_UserLogDebug("position solution property: %d.", positionInfo[i].positionSolutionProperty);
PsdkLogger_UserLogDebug("pitchAttitudeAngle: %d\trollAttitudeAngle: %d\tyawAttitudeAngle: %d",
positionInfo[i].uavAttitude.pitch, positionInfo[i].uavAttitude.roll,
positionInfo[i].uavAttitude.yaw);
PsdkLogger_UserLogDebug("northPositionOffset: %d\tearthPositionOffset: %d\tdownPositionOffset: %d",
positionInfo[i].offsetBetweenMainAntennaAndTargetPoint.x,
positionInfo[i].offsetBetweenMainAntennaAndTargetPoint.y,
positionInfo[i].offsetBetweenMainAntennaAndTargetPoint.z);
PsdkLogger_UserLogDebug("longitude: %.8f\tlatitude: %.8f\theight: %.8f",
positionInfo[i].targetPointPosition.longitude,
positionInfo[i].targetPointPosition.latitude,
positionInfo[i].targetPointPosition.height);
PsdkLogger_UserLogDebug(
"longStandardDeviation: %.8f\tlatStandardDeviation: %.8f\thgtStandardDeviation: %.8f",
positionInfo[i].targetPointPositionStandardDeviation.longitude,
positionInfo[i].targetPointPositionStandardDeviation.latitude,
positionInfo[i].targetPointPositionStandardDeviation.height);
}
s_eventIndex++;
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,54 @@
/**
********************************************************************
* @file test_positioning.h
* @version V2.0.0
* @date 2019/8/22
* @brief This is the header file for "test_positioning.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_POSITIONING_H
#define TEST_POSITIONING_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_PositioningInit(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_POSITIONING_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,129 @@
/**
********************************************************************
* @file test_power_management.c
* @version V2.0.0
* @date 2019/8/29
* @brief
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_power_management.h"
#include "psdk_logger.h"
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static T_PsdkReturnCode PsdkTest_PowerOffNotificationCallback(bool *powerOffPreparationFlag);
/* Private variables ---------------------------------------------------------*/
static T_PsdkTestApplyHighPowerHandler s_applyHighPowerHandler;
/* Exported functions definition ---------------------------------------------*/
/**
* @brief Register handler function for applying high power. This function have to be called before calling
* PsdkTest_PowerManagementInit(), except for in Linux, because PsdkTest_PowerManagementInit() do not apply high power
* in Linux OS.
* @param applyHighPowerHandler: pointer to handler function for applying high power.
* @return Execution result.
*/
T_PsdkReturnCode PsdkTest_RegApplyHighPowerHandler(T_PsdkTestApplyHighPowerHandler *applyHighPowerHandler)
{
if (applyHighPowerHandler->pinInit == NULL) {
PsdkLogger_UserLogError("reg apply high power handler pinInit error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (applyHighPowerHandler->pinWrite == NULL) {
PsdkLogger_UserLogError("reg apply high power handler pinWrite error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
memcpy(&s_applyHighPowerHandler, applyHighPowerHandler, sizeof(T_PsdkTestApplyHighPowerHandler));
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/**
* @brief Initialise power management module, including apply high power (only RTOS) and register power off notification
* callback function.
* @note PSDK development board 1.0 can not accept high power, so do not call this function in PSDK development board
* 1.0 project.
* @return Execution result.
*/
T_PsdkReturnCode PsdkTest_PowerManagementInit(void)
{
T_PsdkReturnCode psdkStat;
// apply high power
#if !PSDK_ARCH_SYS_LINUX
if (s_applyHighPowerHandler.pinInit == NULL) {
PsdkLogger_UserLogError("apply high power pin init interface is NULL error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (s_applyHighPowerHandler.pinWrite == NULL) {
PsdkLogger_UserLogError("apply high power pin write interface is NULL error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
psdkStat = s_applyHighPowerHandler.pinInit();
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("apply high power pin init error");
return psdkStat;
}
psdkStat = PsdkPowerManagement_RegWriteHighPowerApplyPinCallback(s_applyHighPowerHandler.pinWrite);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("register WriteHighPowerApplyPinCallback error.");
return psdkStat;
}
psdkStat = PsdkPowerManagement_ApplyHighPowerSync();
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("apply high power error");
return psdkStat;
}
#endif
// register power off notification callback function
psdkStat = PsdkPowerManagement_RegPowerOffNotificationCallback(PsdkTest_PowerOffNotificationCallback);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("register power off notification callback function error");
return psdkStat;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
static T_PsdkReturnCode PsdkTest_PowerOffNotificationCallback(bool *powerOffPreparationFlag)
{
PsdkLogger_UserLogDebug("aircraft will power off soon.");
*powerOffPreparationFlag = true;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,59 @@
/**
********************************************************************
* @file test_power_management.h
* @version V2.0.0
* @date 2019/8/29
* @brief This is the header file for "test_power_management.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_POWER_MANAGEMENT_H
#define TEST_POWER_MANAGEMENT_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#include "psdk_power_management.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct {
T_PsdkReturnCode (*pinInit)(void);
T_PsdkReturnCode (*pinWrite)(E_PsdkPowerManagementPinState pinState);
} T_PsdkTestApplyHighPowerHandler;
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_PowerManagementInit(void);
T_PsdkReturnCode PsdkTest_RegApplyHighPowerHandler(T_PsdkTestApplyHighPowerHandler *applyHighPowerHandler);
#ifdef __cplusplus
}
#endif
#endif // TEST_POWER_MANAGEMENT_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,166 @@
/**
********************************************************************
* @file test_time_sync.c
* @version V1.0.0
* @date 11/26/19
* @brief
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_time_sync.h"
#include "psdk_time_sync.h"
#include "psdk_logger.h"
#include "utils/util_misc.h"
#include "psdk_platform.h"
/* Private constants ---------------------------------------------------------*/
#define PSDK_TEST_TIME_SYNC_TASK_FREQ (1)
#define PSDK_TEST_TIME_SYNC_TASK_STACK_SIZE (2048)
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static void *PsdkTest_TimeSyncTask(void *arg);
/* Private variables ---------------------------------------------------------*/
static T_PsdkTestTimeSyncHandler s_timeSyncHandler;
static T_PsdkTaskHandle s_timeSyncThread;
/* Exported functions definition ---------------------------------------------*/
/**
* @brief Register handler function for initialising PPS pin configure and reporting the latest local time when PPS is
* triggered. This function have to be called before calling PsdkTest_TimeSyncInit().
* @param timeSyncHandler: pointer to handler function for time synchronization.
* @return Execution result.
*/
T_PsdkReturnCode PsdkTest_TimeSyncRegHandler(T_PsdkTestTimeSyncHandler *timeSyncHandler)
{
if (timeSyncHandler->PpsSignalResponseInit == NULL) {
PsdkLogger_UserLogError("reg time sync handler PpsSignalResponseInit error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (timeSyncHandler->GetNewestPpsTriggerLocalTimeUs == NULL) {
PsdkLogger_UserLogError("reg time sync handler GetNewestPpsTriggerLocalTimeUs error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
memcpy(&s_timeSyncHandler, timeSyncHandler, sizeof(T_PsdkTestTimeSyncHandler));
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkTest_TimeSyncInit(void)
{
T_PsdkReturnCode psdkStat;
psdkStat = PsdkTimeSync_Init();
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("time synchronization module init error.");
return psdkStat;
}
if (s_timeSyncHandler.PpsSignalResponseInit == NULL) {
PsdkLogger_UserLogError("time sync handler PpsSignalResponseInit interface is NULL error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (s_timeSyncHandler.GetNewestPpsTriggerLocalTimeUs == NULL) {
PsdkLogger_UserLogError("time sync handler GetNewestPpsTriggerLocalTimeUs interface is NULL error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
// users must register getNewestPpsTriggerTime callback function
psdkStat = PsdkTimeSync_RegGetNewestPpsTriggerTimeCallback(s_timeSyncHandler.GetNewestPpsTriggerLocalTimeUs);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("register GetNewestPpsTriggerLocalTimeUsCallback error.");
return psdkStat;
}
if (PsdkOsal_TaskCreate(&s_timeSyncThread, PsdkTest_TimeSyncTask, "user_time_sync_task",
PSDK_TEST_TIME_SYNC_TASK_STACK_SIZE, NULL) !=
PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("user time sync task create error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
psdkStat = s_timeSyncHandler.PpsSignalResponseInit();
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("pps signal response init error");
return psdkStat;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkTest_TimeSyncGetNewestPpsTriggerLocalTimeUs(uint64_t *localTimeUs)
{
if (s_timeSyncHandler.GetNewestPpsTriggerLocalTimeUs == NULL) {
PsdkLogger_UserLogError("GetNewestPpsTriggerLocalTimeUs null error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
return s_timeSyncHandler.GetNewestPpsTriggerLocalTimeUs(localTimeUs);
}
/* Private functions definition-----------------------------------------------*/
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *PsdkTest_TimeSyncTask(void *arg)
{
T_PsdkReturnCode psdkStat;
uint32_t currentTimeMs = 0;
T_PsdkTimeSyncAircraftTime aircraftTime = {0};
USER_UTIL_UNUSED(arg);
while (1) {
PsdkOsal_TaskSleepMs(1000 / PSDK_TEST_TIME_SYNC_TASK_FREQ);
psdkStat = PsdkOsal_GetTimeMs(&currentTimeMs);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get current time error: 0x%08llX.", psdkStat);
continue;
}
psdkStat = PsdkTimeSync_TransferToAircraftTime(currentTimeMs * 1000, &aircraftTime);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("transfer to aircraft time error: 0x%08llX.", psdkStat);
continue;
}
PsdkLogger_UserLogDebug("current aircraft time is %d.%d.%d %d:%d %d %d.", aircraftTime.year, aircraftTime.month,
aircraftTime.day, aircraftTime.hour, aircraftTime.minute, aircraftTime.second,
aircraftTime.microsecond);
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,59 @@
/**
********************************************************************
* @file test_time_sync.h
* @version V0.0.0
* @date 11/26/19
* @brief This is the header file for "test_time_sync.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_TIME_SYNC_H
#define TEST_TIME_SYNC_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct {
T_PsdkReturnCode (*PpsSignalResponseInit)(void);
T_PsdkReturnCode (*GetNewestPpsTriggerLocalTimeUs)(uint64_t *localTimeUs);
} T_PsdkTestTimeSyncHandler;
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_TimeSyncRegHandler(T_PsdkTestTimeSyncHandler *timeSyncHandler);
T_PsdkReturnCode PsdkTest_TimeSyncInit(void);
T_PsdkReturnCode PsdkTest_TimeSyncGetNewestPpsTriggerLocalTimeUs(uint64_t *localTimeUs);
#ifdef __cplusplus
}
#endif
#endif // TEST_TIME_SYNC_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,371 @@
/**
********************************************************************
* @file test_upgrade.c
* @version V2.0.0
* @date 3/4/20
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_upgrade_common.h"
#include <psdk_logger.h>
#include <psdk_platform.h>
#include <utils/util_misc.h>
#include "test_upgrade_common_file_transfer.h"
#include "test_upgrade_platform_opt.h"
/* Private constants ---------------------------------------------------------*/
#define UPGRADE_TASK_STACK_SIZE (2048)
#define PSDK_TEST_UPGRADE_TASK_FREQ 50
#define PSDK_TEST_ENTER_UPGRADE_WAIT_TIME 10 //wait 10s for enter upgrade process
#define PSDK_TEST_UPGRADE_REBOOT_TIMEOUT 30 //reboot timeout 30s
/* Private types -------------------------------------------------------------*/
/* Private values -------------------------------------------------------------*/
static T_PsdkUpgradeState s_upgradeState = {0};
static T_PsdkMutexHandle s_upgradeStateMutex = {0};
static T_PsdkTaskHandle s_upgradeProcessThread;
static T_PsdkTaskHandle s_enterUpgradeModeProcessThread;
static bool s_isNeedEnterUpgradeModeProcess = false;
/* Private functions declaration ---------------------------------------------*/
static T_PsdkReturnCode PsdkTest_EnterUpgradeMode(uint16_t *waitTime);
static T_PsdkReturnCode PsdkTest_CheckFirmware(void);
static T_PsdkReturnCode PsdkTest_StartUpgrade(void);
static T_PsdkReturnCode PsdkTest_FinishUpgrade(void);
static void *PsdkTest_UpgradeProcessTask(void *arg);
static void *PsdkTest_EnterUpgradeModeProcessTask(void *arg);
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode PsdkTest_UpgradeInit(const T_PsdkTestUpgradePlatformOpt *upgradePlatformOpt)
{
T_PsdkReturnCode returnCode;
bool isUpgradeReboot = false;
T_PsdkUpgradeEndInfo upgradeEndInfo = {0};
T_PsdkUpgradeConfig upgradeConfig = {
.currentFirmwareVersion = {PSDK_TEST_FIRMWARE_VERSION_MAJOR, PSDK_TEST_FIRMWARE_VERSION_MINOR,
PSDK_TEST_FIRMWARE_VERSION_MODIFY, PSDK_TEST_FIRMWARE_VERSION_DEBUG},
#if PSDK_TEST_UPGRADE_USE_FTP_TRANSFER
.firmwareTransferInfo = {
.transferType = PSDK_PAYLOAD_FIRMWARE_TRANSFER_TYPE_FTP,
.ftpTransferInfo.port = 21, // use default ftp port
}
#else
.firmwareTransferInfo = {
.transferType = PSDK_PAYLOAD_FIRMWARE_TRANSFER_TYPE_DCFTP,
.dcftpFileTransferOpt = {
.start = PsdkTestCommonFileTransfer_Start,
.transfer = PsdkTestCommonFileTransfer_Transfer,
.finish = PsdkTestCommonFileTransfer_Finish,
}
}
#endif
};
T_PsdkUpgradeHandler s_upgradeHandler = {
.EnterUpgradeMode = PsdkTest_EnterUpgradeMode,
.CheckFirmware = PsdkTest_CheckFirmware,
.StartUpgrade = PsdkTest_StartUpgrade,
.FinishUpgrade = PsdkTest_FinishUpgrade
};
returnCode = PsdkTest_RegUpgradePlatformOpt(upgradePlatformOpt);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Reg upgrade platform opt error, return code = 0x%08llX", returnCode);
return returnCode;
}
returnCode = PsdkOsal_MutexCreate(&s_upgradeStateMutex);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Create mutex error");
return returnCode;
}
returnCode = PsdkTest_GetUpgradeRebootState(&isUpgradeReboot, &upgradeEndInfo);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Get upgrade reboot state error");
isUpgradeReboot = false;
}
returnCode = PsdkTest_CleanUpgradeRebootState();
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Clean upgrade reboot state error");
}
PsdkOsal_MutexLock(s_upgradeStateMutex);
if (isUpgradeReboot == true) {
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_END;
s_upgradeState.upgradeEndInfo = upgradeEndInfo;
} else {
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_IDLE;
}
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
returnCode = PsdkUpgrade_Init(&upgradeConfig);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("PsdkUpgrade_Init error, return code = %d", returnCode);
return returnCode;
}
returnCode = PsdkUpgrade_RegHandler(&s_upgradeHandler);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("PsdkUpgrade_RegHandler error, return code = %d", returnCode);
return returnCode;
}
returnCode = PsdkUpgrade_EnableLocalUpgrade();
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("PsdkUpgrade_EnableLocalUpgrade error, return code = %d", returnCode);
return returnCode;
}
if (PsdkOsal_TaskCreate(&s_upgradeProcessThread, PsdkTest_UpgradeProcessTask, "upgrade_task",
UPGRADE_TASK_STACK_SIZE, NULL) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Psdk upgrade test task create error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (PsdkOsal_TaskCreate(&s_enterUpgradeModeProcessThread, PsdkTest_EnterUpgradeModeProcessTask,
"enter_upgrade_mode_task", UPGRADE_TASK_STACK_SIZE, NULL) !=
PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Psdk upgrade test task create error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
static T_PsdkReturnCode PsdkTest_EnterUpgradeMode(uint16_t *waitTime)
{
// need 10s for upgrade preprocess work.
*waitTime = PSDK_TEST_ENTER_UPGRADE_WAIT_TIME;
// enable is need enter upgrade mode process, the process is in PsdkTest_EnterUpgradeModeProcessTask
s_isNeedEnterUpgradeModeProcess = true;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_PsdkReturnCode PsdkTest_CheckFirmware(void)
{
// you can do decrypt and check firmware in this stage
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_PsdkReturnCode PsdkTest_StartUpgrade(void)
{
PsdkOsal_MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeOngoingInfo.upgradeProgress = 0;
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_ONGOING;
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_PsdkReturnCode PsdkTest_FinishUpgrade(void)
{
PsdkOsal_MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_IDLE;
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *PsdkTest_EnterUpgradeModeProcessTask(void *arg)
{
T_PsdkReturnCode returnCode;
USER_UTIL_UNUSED(arg);
while (1) {
if (s_isNeedEnterUpgradeModeProcess) {
// prepare enter upgrade mode
// you can do some thing before enter upgrade mode.
// clear upgrade program file store area
returnCode = PsdkTest_CleanUpgradeProgramFileStoreArea();
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Clean upgrade file dir error, please check dir permission");
}
s_isNeedEnterUpgradeModeProcess = false;
}
PsdkOsal_TaskSleepMs(1000 / PSDK_TEST_UPGRADE_TASK_FREQ);
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *PsdkTest_UpgradeProcessTask(void *arg)
{
T_PsdkUpgradeState tempUpgradeState;
T_PsdkUpgradeEndInfo upgradeEndInfo;
T_PsdkReturnCode returnCode;
USER_UTIL_UNUSED(arg);
while (1) {
PsdkOsal_MutexLock(s_upgradeStateMutex);
tempUpgradeState = s_upgradeState;
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
if (tempUpgradeState.upgradeStage == PSDK_UPGRADE_STAGE_ONGOING) {
#if PSDK_TEST_REPLACE_PROGRAM_BEFORE_REBOOT
// Step 1 : Replace old program
returnCode = PsdkTest_ReplaceOldProgram();
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Replace firmware error, return code = 0x%08llX", returnCode);
PsdkOsal_MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_END;
s_upgradeState.upgradeEndInfo.upgradeEndState = PSDK_UPGRADE_END_STATE_UNKNOWN_ERROR;
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
continue;
}
PsdkOsal_TaskSleepMs(1000);
PsdkOsal_MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_ONGOING;
s_upgradeState.upgradeOngoingInfo.upgradeProgress = 20;
PsdkUpgrade_PushUpgradeState(&s_upgradeState);
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
// Step 2 : Clean upgrade program file store area
returnCode = PsdkTest_CleanUpgradeProgramFileStoreArea();
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Clean upgrade file dir error, please check dir permission");
PsdkOsal_MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_END;
s_upgradeState.upgradeEndInfo.upgradeEndState = PSDK_UPGRADE_END_STATE_UNKNOWN_ERROR;
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
continue;
}
PsdkOsal_TaskSleepMs(1000);
PsdkOsal_MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_ONGOING;
s_upgradeState.upgradeOngoingInfo.upgradeProgress = 30;
PsdkUpgrade_PushUpgradeState(&s_upgradeState);
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
#endif
//attention emulation upgrade progress, user don't need this process
do {
PsdkOsal_TaskSleepMs(1000);
PsdkOsal_MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_ONGOING;
s_upgradeState.upgradeOngoingInfo.upgradeProgress += 10;
tempUpgradeState = s_upgradeState;
PsdkUpgrade_PushUpgradeState(&s_upgradeState);
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
} while (tempUpgradeState.upgradeOngoingInfo.upgradeProgress < 100);
// Step 3 : Reboot device
PsdkOsal_MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_DEVICE_REBOOT;
s_upgradeState.upgradeRebootInfo.rebootTimeout = PSDK_TEST_UPGRADE_REBOOT_TIMEOUT;
PsdkUpgrade_PushUpgradeState(&s_upgradeState);
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
PsdkOsal_TaskSleepMs(1000); // sleep 1000ms to ensure push send terminal.
upgradeEndInfo.upgradeEndState = PSDK_UPGRADE_END_STATE_SUCCESS;
returnCode = PsdkTest_SetUpgradeRebootState(&upgradeEndInfo);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Set Upgrade reboot state error");
PsdkOsal_MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_END;
s_upgradeState.upgradeEndInfo.upgradeEndState = PSDK_UPGRADE_END_STATE_UNKNOWN_ERROR;
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
continue;
}
#if PSDK_TEST_UPGRADE_NO_REBOOT_EMU
bool isUpgradeReboot;
returnCode = PsdkTest_GetUpgradeRebootState(&isUpgradeReboot, &upgradeEndInfo);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Get upgrade reboot state error");
PsdkOsal_MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_END;
s_upgradeState.upgradeEndInfo.upgradeEndState = PSDK_UPGRADE_END_STATE_UNKNOWN_ERROR;
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
continue;
}
returnCode = PsdkTest_CleanUpgradeRebootState();
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Clean upgrade reboot state error");
PsdkOsal_MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_END;
s_upgradeState.upgradeEndInfo.upgradeEndState = PSDK_UPGRADE_END_STATE_UNKNOWN_ERROR;
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
continue;
}
PsdkOsal_MutexLock(s_upgradeStateMutex);
if (isUpgradeReboot == true) {
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_END;
s_upgradeState.upgradeEndInfo = upgradeEndInfo;
} else {
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_IDLE;
}
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
continue;
#else
returnCode = PsdkTest_RebootSystem();
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Reboot system error");
PsdkOsal_MutexLock(s_upgradeStateMutex);
s_upgradeState.upgradeStage = PSDK_UPGRADE_STAGE_END;
s_upgradeState.upgradeEndInfo.upgradeEndState = PSDK_UPGRADE_END_STATE_UNKNOWN_ERROR;
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
continue;
}
while (1) {
PsdkOsal_TaskSleepMs(500);
}
#endif
} else if (s_upgradeState.upgradeStage == PSDK_UPGRADE_STAGE_END) {
PsdkOsal_MutexLock(s_upgradeStateMutex);
PsdkUpgrade_PushUpgradeState(&s_upgradeState);
PsdkOsal_MutexUnlock(s_upgradeStateMutex);
}
PsdkOsal_TaskSleepMs(500);
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,52 @@
/**
********************************************************************
* @file test_upgrade.h
* @version V2.0.0
* @date 3/4/20
* @brief This is the header file for "test_upgrade.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_UPGRADE_H
#define TEST_UPGRADE_H
/* Includes ------------------------------------------------------------------*/
#include <psdk_upgrade.h>
#include "test_upgrade_platform_opt.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_UpgradeInit(const T_PsdkTestUpgradePlatformOpt *upgradePlatformOpt);
#ifdef __cplusplus
}
#endif
#endif
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,74 @@
/**
********************************************************************
* @file test_upgrade_common.h
* @version V2.0.0
* @date 3/12/20
* @brief This is the header file for "test_upgrade_linux_common.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_UPGRADE_COMMON_H
#define TEST_UPGRADE_COMMON_H
/* Includes ------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
// firmware version
#define PSDK_TEST_FIRMWARE_VERSION_MAJOR 2
#define PSDK_TEST_FIRMWARE_VERSION_MINOR 1
#define PSDK_TEST_FIRMWARE_VERSION_MODIFY 0
#define PSDK_TEST_FIRMWARE_VERSION_DEBUG 3
// define if only emulate upgrade, no system reboot
#define PSDK_TEST_UPGRADE_NO_REBOOT_EMU 0
#if PSDK_ARCH_SYS_LINUX
// define if replace program before reboot
#define PSDK_TEST_REPLACE_PROGRAM_BEFORE_REBOOT 1
// define if use ftp transfer, only support linux
#define PSDK_TEST_UPGRADE_USE_FTP_TRANSFER 1
#else
// for mcu, program is on flash , need replace program in loader, not before reboot
#define PSDK_TEST_REPLACE_PROGRAM_BEFORE_REBOOT 0
// define if use ftp transfer
#define PSDK_TEST_UPGRADE_USE_FTP_TRANSFER 0
#endif
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif // TEST_UPGRADE_LINUX_COMMON_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,151 @@
/**
********************************************************************
* @file test_upgrade_common_file_transfer.c
* @version V2.0.0
* @date 3/12/20
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_upgrade_common_file_transfer.h"
#include "psdk_logger.h"
#include <utils/util_md5.h>
#include "test_upgrade_platform_opt.h"
/* Private constants ---------------------------------------------------------*/
#define PSDK_TEST_FILE_MD5_BUFFER_SIZE 256
/* Private types -------------------------------------------------------------*/
/* Private values -------------------------------------------------------------*/
static T_PsdkUpgradeFileInfo s_upgradeFileInfo = {0};
static uint32_t s_alreadyTransferFileSize = 0;
/* Private functions declaration ---------------------------------------------*/
static T_PsdkReturnCode PsdkTestFile_GetUpgradeFileMd5(uint8_t md5[PSDK_MD5_BUFFER_LEN]);
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode PsdkTestCommonFileTransfer_Start(const T_PsdkUpgradeFileInfo *fileInfo)
{
T_PsdkReturnCode returnCode;
s_upgradeFileInfo.fileSize = 0;
memset(s_upgradeFileInfo.fileName, 0, sizeof(s_upgradeFileInfo.fileName));
s_alreadyTransferFileSize = 0;
returnCode = PsdkTest_CreateUpgradeProgramFile(fileInfo);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Create upgrade program file error");
return returnCode;
}
s_upgradeFileInfo = *fileInfo;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkTestCommonFileTransfer_Transfer(const uint8_t *data, uint16_t dataLen)
{
T_PsdkReturnCode returnCode;
if (s_alreadyTransferFileSize >= s_upgradeFileInfo.fileSize) {
PsdkLogger_UserLogError("Already transfer file size is more than file real size");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
returnCode = PsdkTest_WriteUpgradeProgramFile(s_alreadyTransferFileSize, data, dataLen);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Write upgrade program file error, return code = 0x%08llX", returnCode);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
s_alreadyTransferFileSize += dataLen;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkTestCommonFileTransfer_Finish(const uint8_t md5[PSDK_MD5_BUFFER_LEN])
{
uint8_t localFileMd5[PSDK_MD5_BUFFER_LEN] = {0};
T_PsdkReturnCode returnCode;
if (s_alreadyTransferFileSize != s_upgradeFileInfo.fileSize) {
PsdkLogger_UserLogError("Transfer finish error, transfer file size is not equal");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
returnCode = PsdkTestFile_GetUpgradeFileMd5(localFileMd5);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Get file md5 error, return code = 0x%08llX", returnCode);
goto out;
}
if (memcmp(md5, localFileMd5, PSDK_MD5_BUFFER_LEN) == 0) {
returnCode = PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
} else {
returnCode = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
out:
PsdkTest_CloseUpgradeProgramFile();
s_upgradeFileInfo.fileSize = 0;
memset(s_upgradeFileInfo.fileName, 0, sizeof(s_upgradeFileInfo.fileName));
s_alreadyTransferFileSize = 0;
return returnCode;
}
/* Private functions definition-----------------------------------------------*/
static T_PsdkReturnCode PsdkTestFile_GetUpgradeFileMd5(uint8_t md5[PSDK_MD5_BUFFER_LEN])
{
uint8_t fileBuffer[PSDK_TEST_FILE_MD5_BUFFER_SIZE] = {0};
T_PsdkReturnCode returnCode;
uint32_t offset;
MD5_CTX fileMd5Ctx;
uint16_t realLen = 0;
offset = 0;
UtilMd5_Init(&fileMd5Ctx);
while (s_upgradeFileInfo.fileSize - offset > PSDK_TEST_FILE_MD5_BUFFER_SIZE) {
returnCode = PsdkTest_ReadUpgradeProgramFile(offset, PSDK_TEST_FILE_MD5_BUFFER_SIZE,
fileBuffer, &realLen);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS || realLen != PSDK_TEST_FILE_MD5_BUFFER_SIZE) {
PsdkLogger_UserLogError("Get file data error, return code = 0x%08llX", returnCode);
return returnCode;
}
UtilMd5_Update(&fileMd5Ctx, fileBuffer, PSDK_TEST_FILE_MD5_BUFFER_SIZE);
offset += PSDK_TEST_FILE_MD5_BUFFER_SIZE;
}
returnCode = PsdkTest_ReadUpgradeProgramFile(offset, s_upgradeFileInfo.fileSize - offset, fileBuffer, &realLen);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS || realLen != s_upgradeFileInfo.fileSize - offset) {
PsdkLogger_UserLogError("Get file data error, return code = 0x%08llX", returnCode);
return returnCode;
}
UtilMd5_Update(&fileMd5Ctx, fileBuffer, s_upgradeFileInfo.fileSize - offset);
UtilMd5_Final(&fileMd5Ctx, md5);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,53 @@
/**
********************************************************************
* @file test_upgrade_common_file_transfer.h
* @version V2.0.0
* @date 3/12/20
* @brief This is the header file for "test_upgrade_common_file_transfer.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_UPGRADE_COMMON_FILE_TRANSFER_H
#define TEST_UPGRADE_COMMON_FILE_TRANSFER_H
/* Includes ------------------------------------------------------------------*/
#include <psdk_upgrade.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTestCommonFileTransfer_Start(const T_PsdkUpgradeFileInfo *fileInfo);
T_PsdkReturnCode PsdkTestCommonFileTransfer_Transfer(const uint8_t *data, uint16_t dataLen);
T_PsdkReturnCode PsdkTestCommonFileTransfer_Finish(const uint8_t md5[PSDK_MD5_BUFFER_LEN]);
#ifdef __cplusplus
}
#endif
#endif // TEST_UPGRADE_COMMON_FILE_TRANSFER_LINUX_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,141 @@
/**
********************************************************************
* @file test_upgrade_platform_opt.c
* @version V1.0.0
* @date 2019/01/01
* @brief
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_upgrade_platform_opt.h"
#include <psdk_logger.h>
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private values -------------------------------------------------------------*/
static T_PsdkTestUpgradePlatformOpt s_upgradePlatformOpt = {0};
/* Private functions declaration ---------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode PsdkTest_RegUpgradePlatformOpt(const T_PsdkTestUpgradePlatformOpt *upgradePlatformOpt)
{
if (upgradePlatformOpt->rebootSystem == NULL) {
PsdkLogger_UserLogError("rebootSystem callback can't be NULL");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->cleanUpgradeProgramFileStoreArea == NULL) {
PsdkLogger_UserLogError("cleanUpgradeProgramFileStoreArea callback can't be NULL");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->createUpgradeProgramFile == NULL) {
PsdkLogger_UserLogError("createUpgradeProgramFile callback can't be NULL");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->readUpgradeProgramFile == NULL) {
PsdkLogger_UserLogError("readUpgradeProgramFile callback can't be NULL");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->writeUpgradeProgramFile == NULL) {
PsdkLogger_UserLogError("writeUpgradeProgramFile callback can't be NULL");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->closeUpgradeProgramFile == NULL) {
PsdkLogger_UserLogError("closeUpgradeProgramFile callback can't be NULL");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->replaceOldProgram == NULL) {
PsdkLogger_UserLogError("replaceOldProgram callback can't be NULL");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->setUpgradeRebootState == NULL) {
PsdkLogger_UserLogError("setUpgradeRebootState callback can't be NULL");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->getUpgradeRebootState == NULL) {
PsdkLogger_UserLogError("getUpgradeRebootState callback can't be NULL");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (upgradePlatformOpt->cleanUpgradeRebootState == NULL) {
PsdkLogger_UserLogError("cleanUpgradeRebootState callback can't be NULL");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
s_upgradePlatformOpt = *upgradePlatformOpt;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkTest_RebootSystem(void)
{
return s_upgradePlatformOpt.rebootSystem();
}
T_PsdkReturnCode PsdkTest_CleanUpgradeProgramFileStoreArea(void)
{
return s_upgradePlatformOpt.cleanUpgradeProgramFileStoreArea();
}
T_PsdkReturnCode PsdkTest_CreateUpgradeProgramFile(const T_PsdkUpgradeFileInfo *fileInfo)
{
return s_upgradePlatformOpt.createUpgradeProgramFile(fileInfo);
}
T_PsdkReturnCode PsdkTest_WriteUpgradeProgramFile(uint32_t offset, const uint8_t *data, uint16_t dataLen)
{
return s_upgradePlatformOpt.writeUpgradeProgramFile(offset, data, dataLen);
}
T_PsdkReturnCode PsdkTest_ReadUpgradeProgramFile(uint32_t offset, uint16_t readDataLen, uint8_t *data,
uint16_t *realLen)
{
return s_upgradePlatformOpt.readUpgradeProgramFile(offset, readDataLen, data, realLen);
}
T_PsdkReturnCode PsdkTest_CloseUpgradeProgramFile(void)
{
return s_upgradePlatformOpt.closeUpgradeProgramFile();
}
T_PsdkReturnCode PsdkTest_ReplaceOldProgram(void)
{
return s_upgradePlatformOpt.replaceOldProgram();
}
T_PsdkReturnCode PsdkTest_SetUpgradeRebootState(const T_PsdkUpgradeEndInfo *upgradeEndInfo)
{
return s_upgradePlatformOpt.setUpgradeRebootState(upgradeEndInfo);
}
T_PsdkReturnCode PsdkTest_GetUpgradeRebootState(bool *isUpgradeReboot, T_PsdkUpgradeEndInfo *upgradeEndInfo)
{
return s_upgradePlatformOpt.getUpgradeRebootState(isUpgradeReboot, upgradeEndInfo);
}
T_PsdkReturnCode PsdkTest_CleanUpgradeRebootState(void)
{
return s_upgradePlatformOpt.cleanUpgradeRebootState();
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,86 @@
/**
********************************************************************
* @file test_upgrade_platform_opt.h
* @version V0.0.0
* @date 2019/01/01
* @brief This is the header file for "test_upgrade_platform_opt.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_UPGRADE_PLATFORM_OPT_H
#define TEST_UPGRADE_PLATFORM_OPT_H
#include <psdk_typedef.h>
#include <psdk_upgrade.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct {
T_PsdkReturnCode (*rebootSystem)(void);
T_PsdkReturnCode (*cleanUpgradeProgramFileStoreArea)(void);
T_PsdkReturnCode (*createUpgradeProgramFile)(const T_PsdkUpgradeFileInfo *fileInfo);
T_PsdkReturnCode (*writeUpgradeProgramFile)(uint32_t offset, const uint8_t *data, uint16_t dataLen);
T_PsdkReturnCode (*readUpgradeProgramFile)(uint32_t offset, uint16_t readDataLen, uint8_t *data,
uint16_t *realLen);
T_PsdkReturnCode (*closeUpgradeProgramFile)(void);
T_PsdkReturnCode (*replaceOldProgram)(void);
T_PsdkReturnCode (*setUpgradeRebootState)(const T_PsdkUpgradeEndInfo *upgradeEndInfo);
T_PsdkReturnCode (*getUpgradeRebootState)(bool *isUpgradeReboot, T_PsdkUpgradeEndInfo *upgradeEndInfo);
T_PsdkReturnCode (*cleanUpgradeRebootState)(void);
} T_PsdkTestUpgradePlatformOpt;
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_RegUpgradePlatformOpt(const T_PsdkTestUpgradePlatformOpt *upgradePlatformOpt);
T_PsdkReturnCode PsdkTest_RebootSystem(void);
T_PsdkReturnCode PsdkTest_CleanUpgradeProgramFileStoreArea(void);
T_PsdkReturnCode PsdkTest_CreateUpgradeProgramFile(const T_PsdkUpgradeFileInfo *fileInfo);
T_PsdkReturnCode PsdkTest_WriteUpgradeProgramFile(uint32_t offset, const uint8_t *data, uint16_t dataLen);
T_PsdkReturnCode PsdkTest_ReadUpgradeProgramFile(uint32_t offset, uint16_t readDataLen, uint8_t *data,
uint16_t *realLen);
T_PsdkReturnCode PsdkTest_CloseUpgradeProgramFile(void);
T_PsdkReturnCode PsdkTest_ReplaceOldProgram(void);
T_PsdkReturnCode PsdkTest_SetUpgradeRebootState(const T_PsdkUpgradeEndInfo *upgradeEndInfo);
T_PsdkReturnCode PsdkTest_GetUpgradeRebootState(bool *isUpgradeReboot, T_PsdkUpgradeEndInfo *upgradeEndInfo);
T_PsdkReturnCode PsdkTest_CleanUpgradeRebootState(void);
#ifdef __cplusplus
}
#endif
#endif // TEST_UPGRADE_PLATFORM_OPT_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,129 @@
/**
******************************************************************************
* @file util_buffer.c
* @version V1.0.0
* @date 2017/11/10
* @brief The file defines buffer related functions, including initialize, put data to buffer,
* get data from buffer and get unused count of bytes of buffer.
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
******************************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "util_buffer.h"
#include <string.h>
#include "util_misc.h"
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
/* Private macro -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Exported variables --------------------------------------------------------*/
/* Private function prototypes -----------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
/**
* @brief Cut buffer size to power of 2, in order to increase the convenience of get and put operating of buffer.
* @param bufSize Original buffer size.
* @return Buffer size after handling.
*/
static uint16_t UtilBuffer_CutBufSizeToPowOfTwo(uint16_t bufSize)
{
uint16_t i = 0;
while ((1 << (++i)) <= bufSize);
return (uint16_t) (1 << (--i));
}
/* Exported functions --------------------------------------------------------*/
/**
* @brief Buffer initialization.
* @param pthis Pointer to buffer structure.
* @param pBuf Pointer to data buffer.
* @param bufSize Size of data buffer.
* @return None.
*/
void UtilBuffer_Init(T_UtilBuffer *pthis, uint8_t *pBuf, uint16_t bufSize)
{
pthis->readIndex = 0;
pthis->writeIndex = 0;
pthis->bufferPtr = pBuf;
pthis->bufferSize = UtilBuffer_CutBufSizeToPowOfTwo(bufSize);
}
/**
* @brief Put a block of data into buffer.
* @param pthis Pointer to buffer structure.
* @param pData Pointer to data to be stored.
* @param dataLen Length of data to be stored.
* @return Length of data to be stored.
*/
uint16_t UtilBuffer_Put(T_UtilBuffer *pthis, const uint8_t *pData, uint16_t dataLen)
{
uint16_t writeUpLen;
dataLen = USER_UTIL_MIN(dataLen, (uint16_t) (pthis->bufferSize - pthis->writeIndex + pthis->readIndex));
//fill up data
writeUpLen = USER_UTIL_MIN(dataLen, (uint16_t) (pthis->bufferSize - (pthis->writeIndex & (pthis->bufferSize - 1))));
memcpy(pthis->bufferPtr + (pthis->writeIndex & (pthis->bufferSize - 1)), pData, writeUpLen);
//fill begin data
memcpy(pthis->bufferPtr, pData + writeUpLen, dataLen - writeUpLen);
pthis->writeIndex += dataLen;
return dataLen;
}
/**
* @brief Get a block of data from buffer.
* @param pthis Pointer to buffer structure.
* @param pData Pointer to data to be read.
* @param dataLen Length of data to be read.
* @return Length of data to be read.
*/
uint16_t UtilBuffer_Get(T_UtilBuffer *pthis, uint8_t *pData, uint16_t dataLen)
{
uint16_t readUpLen;
dataLen = USER_UTIL_MIN(dataLen, (uint16_t) (pthis->writeIndex - pthis->readIndex));
//get up data
readUpLen = USER_UTIL_MIN(dataLen, (uint16_t) (pthis->bufferSize - (pthis->readIndex & (pthis->bufferSize - 1))));
memcpy(pData, pthis->bufferPtr + (pthis->readIndex & (pthis->bufferSize - 1)), readUpLen);
//get begin data
memcpy(pData + readUpLen, pthis->bufferPtr, dataLen - readUpLen);
pthis->readIndex += dataLen;
return dataLen;
}
/**
* @brief Get unused size of buffer.
* @param pthis Pointer to buffer structure.
* @return Unused size of buffer.
*/
uint16_t UtilBuffer_GetUnusedSize(T_UtilBuffer *pthis)
{
return (uint16_t) (pthis->bufferSize - pthis->writeIndex + pthis->readIndex);
}

View File

@ -0,0 +1,61 @@
/**
******************************************************************************
* @file util_buffer.h
* @version V1.0.0
* @date 2017/11/10
* @brief This is the header file for "util_buffer.c".
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef _DJI_UTIL_BUFFER_H_
#define _DJI_UTIL_BUFFER_H_
/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
/* Exported constants --------------------------------------------------------*/
/* Exported macros -----------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
//Note: not need lock for just one producer / one consumer
//need mutex to protect for multi-producer / multi-consumer
typedef struct {
uint8_t *bufferPtr;
uint16_t bufferSize;
uint16_t readIndex;
uint16_t writeIndex;
} T_UtilBuffer;
/* Exported variables --------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
void UtilBuffer_Init(T_UtilBuffer *pthis, uint8_t *pBuf, uint16_t bufSize);
uint16_t UtilBuffer_Put(T_UtilBuffer *pthis, const uint8_t *pData, uint16_t dataLen);
uint16_t UtilBuffer_Get(T_UtilBuffer *pthis, uint8_t *pData, uint16_t dataLen);
uint16_t UtilBuffer_GetUnusedSize(T_UtilBuffer *pthis);
/* Private constants ---------------------------------------------------------*/
/* Private macros ------------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private variables ---------------------------------------------------------*/
/* Private functions ---------------------------------------------------------*/
#endif

View File

@ -0,0 +1,210 @@
/**
********************************************************************
* @file util_file.c
* @version V2.0.0
* @date 2019/08/30
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "util_file.h"
#include <time.h>
#include <sys/stat.h>
#include <unistd.h>
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Private values ------------------------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode UtilFile_GetCreateTime(const char *filePath, T_UtilFileCreateTime *createTime)
{
struct stat st;
struct tm *fileTm;
if (filePath == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (stat(filePath, &st) != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
fileTm = localtime(&(st.st_ctime));
if (fileTm == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
createTime->year = fileTm->tm_year + 1900 - 1980;
createTime->month = fileTm->tm_mon;
createTime->day = fileTm->tm_mday;
createTime->hour = fileTm->tm_hour;
createTime->minute = fileTm->tm_min;
createTime->second = fileTm->tm_sec;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode UtilFile_GetFileSizeByPath(const char *filePath, uint32_t *fileSize)
{
struct stat st;
if (filePath == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (stat(filePath, &st) != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
*fileSize = st.st_size;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode UtilFile_GetFileDataByPath(const char *filePath, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen)
{
FILE *pF;
T_PsdkReturnCode psdkStat;
uint32_t readRtn;
if (filePath == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
pF = fopen(filePath, "rb+");
if (pF == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (fseek(pF, offset, SEEK_SET) != 0) {
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto out;
}
readRtn = fread(data, 1, len, pF);
if (readRtn == 0 || readRtn > len) {
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto out;
}
*realLen = readRtn;
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
out:
fclose(pF);
return psdkStat;
}
T_PsdkReturnCode UtilFile_Delete(const char *filePath)
{
int ret;
if (filePath == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
ret = unlink(filePath);
if (ret != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
} else {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
}
T_PsdkReturnCode UtilFile_GetFileSize(FILE *file, uint32_t *fileSize)
{
int result;
if (file == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
long int curSeek = ftell(file);
result = fseek(file, 0L, SEEK_END);
if (result != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
*fileSize = ftell(file);
if (curSeek < 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
result = fseek(file, curSeek, SEEK_SET);
if (result != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode UtilFile_GetFileData(FILE *file, uint32_t offset, uint16_t len, uint8_t *data, uint16_t *realLen)
{
T_PsdkReturnCode psdkStat;
uint32_t readRtn;
if (file == NULL) {
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
goto out;
}
if (fseek(file, offset, SEEK_SET) != 0) {
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto out;
}
readRtn = fread(data, 1, len, file);
if (readRtn == 0 || readRtn > len) {
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto out;
}
*realLen = readRtn;
psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
out:
return psdkStat;
}
bool UtilFile_IsFileExist(const char *filePath)
{
return !access(filePath, F_OK);
}
/* Private functions definition-----------------------------------------------*/
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,69 @@
/**
********************************************************************
* @file util_file.h
* @version V2.0.0
* @date 2019/08/30
* @brief This is the header file for "util_file.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef UTIL_FILE_H
#define UTIL_FILE_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include <psdk_typedef.h>
#include <stdio.h>
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct {
uint32_t second:5;
uint32_t minute:6;
uint32_t hour :5;
uint32_t day :5;
uint32_t month :4;
uint32_t year :7;
} T_UtilFileCreateTime;
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode UtilFile_GetCreateTime(const char *filePath, T_UtilFileCreateTime *createTime);
T_PsdkReturnCode UtilFile_GetFileSizeByPath(const char *filePath, uint32_t *fileSize);
T_PsdkReturnCode UtilFile_GetFileDataByPath(const char *filePath, uint32_t offset, uint16_t len,
uint8_t *data, uint16_t *realLen);
T_PsdkReturnCode PsdkFile_Delete(const char *filePath);
T_PsdkReturnCode UtilFile_GetFileSize(FILE *file, uint32_t *fileSize);
T_PsdkReturnCode UtilFile_GetFileData(FILE *file, uint32_t offset, uint16_t len, uint8_t *data, uint16_t *realLen);
bool UtilFile_IsFileExist(const char *filePath);
#ifdef __cplusplus
}
#endif
#endif // UTIL_FILE_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,45 @@
/**
********************************************************************
* @file util_math.c
* @brief
*
* @copyright (c) 2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "util_math.h"
#include "math.h"
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private values ---------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
int32_t UtilMath_Mod(int32_t a, int32_t b)
{
return a - floor((double) a / (double) b) * b;
}
/* Private functions definition-----------------------------------------------*/
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,49 @@
/**
********************************************************************
* @file util_math.h
* @brief This is the header file for "util_math.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef UTIL_MATH_H
#define UTIL_MATH_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
int32_t UtilMath_Mod(int32_t a, int32_t b);
#ifdef __cplusplus
}
#endif
#endif //UTIL_MATH_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,240 @@
/**
********************************************************************
* @file util_md5.c
* @version V2.0.0
* @date 2019/07/01
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
* crypto-algorithms
* =================
*
* About
* ---
* These are basic implementations of standard cryptography algorithms, written by Brad Conte (brad@bradconte.com) from
* scratch and without any cross-licensing. They exist to provide publically accessible, restriction-free implementations
* of popular cryptographic algorithms, like AES and SHA-1. These are primarily intended for educational and pragmatic
* purposes (such as comparing a specification to actual implementation code, or for building an internal application
* that computes test vectors for a product). The algorithms have been tested against standard test vectors.
* This code is released into the public domain free of any restrictions. The author requests acknowledgement if the code
* is used, but does not require it. This code is provided free of any liability and without any quality claims by the
* author.
* Note that these are *not* cryptographically secure implementations. They have no resistence to side-channel attacks
* and should not be used in contexts that need cryptographically secure implementations.
* These algorithms are not optimized for speed or space. They are primarily designed to be easy to read, although some
* basic optimization techniques have been employed.
* Building
* ---
* The source code for each algorithm will come in a pair of a source code file and a header file. There should be no
* inter-header file dependencies, no additional libraries, no platform-specific header files, or any other complicating
* matters. Compiling them should be as easy as adding the relevent source code to the project.
*
* @statement DJI has modified some symbols' name.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "util_md5.h"
/* Private constants ---------------------------------------------------------*/
#define ROTLEFT(a, b) ((a << b) | (a >> (32-b)))
#define F(x, y, z) ((x & y) | (~x & z))
#define G(x, y, z) ((x & z) | (y & ~z))
#define H(x, y, z) (x ^ y ^ z)
#define I(x, y, z) (y ^ (x | ~z))
#define FF(a, b, c, d, m, s, t) { a += F(b,c,d) + m + t; \
a = b + ROTLEFT(a,s); }
#define GG(a, b, c, d, m, s, t) { a += G(b,c,d) + m + t; \
a = b + ROTLEFT(a,s); }
#define HH(a, b, c, d, m, s, t) { a += H(b,c,d) + m + t; \
a = b + ROTLEFT(a,s); }
#define II(a, b, c, d, m, s, t) { a += I(b,c,d) + m + t; \
a = b + ROTLEFT(a,s); }
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
void UtilMd5_Transform(MD5_CTX *ctx, const BYTE *data)
{
WORD a, b, c, d, m[16], i, j;
// MD5 specifies big endian byte order, but this implementation assumes a little
// endian byte order CPU. Reverse all the bytes upon input, and re-reverse them
// on output (in md5_final()).
for (i = 0, j = 0; i < 16; ++i, j += 4) {
m[i] = (data[j]) + (data[j + 1] << 8) + (data[j + 2] << 16) + (data[j + 3] << 24);
}
a = ctx->state[0];
b = ctx->state[1];
c = ctx->state[2];
d = ctx->state[3];
FF(a, b, c, d, m[0], 7, 0xd76aa478);
FF(d, a, b, c, m[1], 12, 0xe8c7b756);
FF(c, d, a, b, m[2], 17, 0x242070db);
FF(b, c, d, a, m[3], 22, 0xc1bdceee);
FF(a, b, c, d, m[4], 7, 0xf57c0faf);
FF(d, a, b, c, m[5], 12, 0x4787c62a);
FF(c, d, a, b, m[6], 17, 0xa8304613);
FF(b, c, d, a, m[7], 22, 0xfd469501);
FF(a, b, c, d, m[8], 7, 0x698098d8);
FF(d, a, b, c, m[9], 12, 0x8b44f7af);
FF(c, d, a, b, m[10], 17, 0xffff5bb1);
FF(b, c, d, a, m[11], 22, 0x895cd7be);
FF(a, b, c, d, m[12], 7, 0x6b901122);
FF(d, a, b, c, m[13], 12, 0xfd987193);
FF(c, d, a, b, m[14], 17, 0xa679438e);
FF(b, c, d, a, m[15], 22, 0x49b40821);
GG(a, b, c, d, m[1], 5, 0xf61e2562);
GG(d, a, b, c, m[6], 9, 0xc040b340);
GG(c, d, a, b, m[11], 14, 0x265e5a51);
GG(b, c, d, a, m[0], 20, 0xe9b6c7aa);
GG(a, b, c, d, m[5], 5, 0xd62f105d);
GG(d, a, b, c, m[10], 9, 0x02441453);
GG(c, d, a, b, m[15], 14, 0xd8a1e681);
GG(b, c, d, a, m[4], 20, 0xe7d3fbc8);
GG(a, b, c, d, m[9], 5, 0x21e1cde6);
GG(d, a, b, c, m[14], 9, 0xc33707d6);
GG(c, d, a, b, m[3], 14, 0xf4d50d87);
GG(b, c, d, a, m[8], 20, 0x455a14ed);
GG(a, b, c, d, m[13], 5, 0xa9e3e905);
GG(d, a, b, c, m[2], 9, 0xfcefa3f8);
GG(c, d, a, b, m[7], 14, 0x676f02d9);
GG(b, c, d, a, m[12], 20, 0x8d2a4c8a);
HH(a, b, c, d, m[5], 4, 0xfffa3942);
HH(d, a, b, c, m[8], 11, 0x8771f681);
HH(c, d, a, b, m[11], 16, 0x6d9d6122);
HH(b, c, d, a, m[14], 23, 0xfde5380c);
HH(a, b, c, d, m[1], 4, 0xa4beea44);
HH(d, a, b, c, m[4], 11, 0x4bdecfa9);
HH(c, d, a, b, m[7], 16, 0xf6bb4b60);
HH(b, c, d, a, m[10], 23, 0xbebfbc70);
HH(a, b, c, d, m[13], 4, 0x289b7ec6);
HH(d, a, b, c, m[0], 11, 0xeaa127fa);
HH(c, d, a, b, m[3], 16, 0xd4ef3085);
HH(b, c, d, a, m[6], 23, 0x04881d05);
HH(a, b, c, d, m[9], 4, 0xd9d4d039);
HH(d, a, b, c, m[12], 11, 0xe6db99e5);
HH(c, d, a, b, m[15], 16, 0x1fa27cf8);
HH(b, c, d, a, m[2], 23, 0xc4ac5665);
II(a, b, c, d, m[0], 6, 0xf4292244);
II(d, a, b, c, m[7], 10, 0x432aff97);
II(c, d, a, b, m[14], 15, 0xab9423a7);
II(b, c, d, a, m[5], 21, 0xfc93a039);
II(a, b, c, d, m[12], 6, 0x655b59c3);
II(d, a, b, c, m[3], 10, 0x8f0ccc92);
II(c, d, a, b, m[10], 15, 0xffeff47d);
II(b, c, d, a, m[1], 21, 0x85845dd1);
II(a, b, c, d, m[8], 6, 0x6fa87e4f);
II(d, a, b, c, m[15], 10, 0xfe2ce6e0);
II(c, d, a, b, m[6], 15, 0xa3014314);
II(b, c, d, a, m[13], 21, 0x4e0811a1);
II(a, b, c, d, m[4], 6, 0xf7537e82);
II(d, a, b, c, m[11], 10, 0xbd3af235);
II(c, d, a, b, m[2], 15, 0x2ad7d2bb);
II(b, c, d, a, m[9], 21, 0xeb86d391);
ctx->state[0] += a;
ctx->state[1] += b;
ctx->state[2] += c;
ctx->state[3] += d;
}
void UtilMd5_Init(MD5_CTX *ctx)
{
ctx->datalen = 0;
ctx->bitlen = 0;
ctx->state[0] = 0x67452301;
ctx->state[1] = 0xEFCDAB89;
ctx->state[2] = 0x98BADCFE;
ctx->state[3] = 0x10325476;
}
void UtilMd5_Update(MD5_CTX *ctx, const BYTE *data, size_t len)
{
size_t i;
for (i = 0; i < len; ++i) {
ctx->data[ctx->datalen] = data[i];
ctx->datalen++;
if (ctx->datalen == 64) {
UtilMd5_Transform(ctx, ctx->data);
ctx->bitlen += 512;
ctx->datalen = 0;
}
}
}
void UtilMd5_Final(MD5_CTX *ctx, BYTE *hash)
{
size_t i;
i = ctx->datalen;
// Pad whatever data is left in the buffer.
if (ctx->datalen < 56) {
ctx->data[i++] = 0x80;
while (i < 56) {
ctx->data[i++] = 0x00;
}
} else if (ctx->datalen >= 56) {
ctx->data[i++] = 0x80;
while (i < 64) {
ctx->data[i++] = 0x00;
}
UtilMd5_Transform(ctx, ctx->data);
memset(ctx->data, 0, 56);
}
// Append to the padding the total message's length in bits and transform.
ctx->bitlen += ctx->datalen * 8;
ctx->data[56] = ctx->bitlen;
ctx->data[57] = ctx->bitlen >> 8;
ctx->data[58] = ctx->bitlen >> 16;
ctx->data[59] = ctx->bitlen >> 24;
ctx->data[60] = ctx->bitlen >> 32;
ctx->data[61] = ctx->bitlen >> 40;
ctx->data[62] = ctx->bitlen >> 48;
ctx->data[63] = ctx->bitlen >> 56;
UtilMd5_Transform(ctx, ctx->data);
// Since this implementation uses little endian byte ordering and MD uses big endian,
// reverse all the bytes when copying the final state to the output hash.
for (i = 0; i < 4; ++i) {
hash[i] = (ctx->state[0] >> (i * 8)) & 0x000000ff;
hash[i + 4] = (ctx->state[1] >> (i * 8)) & 0x000000ff;
hash[i + 8] = (ctx->state[2] >> (i * 8)) & 0x000000ff;
hash[i + 12] = (ctx->state[3] >> (i * 8)) & 0x000000ff;
}
}
/* Private functions definition-----------------------------------------------*/
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,90 @@
/**
********************************************************************
* @file util_md5.h
* @version V2.0.0
* @date 2019/07/01
* @brief This is the header file for "util_md5.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
* crypto-algorithms
* =================
*
* About
* ---
* These are basic implementations of standard cryptography algorithms, written by Brad Conte (brad@bradconte.com) from
* scratch and without any cross-licensing. They exist to provide publically accessible, restriction-free implementations
* of popular cryptographic algorithms, like AES and SHA-1. These are primarily intended for educational and pragmatic
* purposes (such as comparing a specification to actual implementation code, or for building an internal application
* that computes test vectors for a product). The algorithms have been tested against standard test vectors.
* This code is released into the public domain free of any restrictions. The author requests acknowledgement if the code
* is used, but does not require it. This code is provided free of any liability and without any quality claims by the
* author.
* Note that these are *not* cryptographically secure implementations. They have no resistence to side-channel attacks
* and should not be used in contexts that need cryptographically secure implementations.
* These algorithms are not optimized for speed or space. They are primarily designed to be easy to read, although some
* basic optimization techniques have been employed.
* Building
* ---
* The source code for each algorithm will come in a pair of a source code file and a header file. There should be no
* inter-header file dependencies, no additional libraries, no platform-specific header files, or any other complicating
* matters. Compiling them should be as easy as adding the relevent source code to the project.
*
* @statement DJI has modified some symbols' name.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef UTIL_MD5_H
#define UTIL_MD5_H
/* Includes ------------------------------------------------------------------*/
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
#define MD5_BLOCK_SIZE 16 // MD5 outputs a 16 byte digest
/* Exported types ------------------------------------------------------------*/
typedef unsigned char BYTE; // 8-bit byte
typedef unsigned int WORD; // 32-bit word, change to "long" for 16-bit machines
typedef struct {
BYTE data[64];
WORD datalen;
unsigned long long bitlen;
WORD state[4];
} MD5_CTX;
/* Exported functions --------------------------------------------------------*/
void UtilMd5_Init(MD5_CTX *ctx);
void UtilMd5_Update(MD5_CTX *ctx, const BYTE *data, size_t len);
void UtilMd5_Final(MD5_CTX *ctx, BYTE *hash);
#ifdef __cplusplus
}
#endif
#endif // UTIL_MD5_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,86 @@
/**
********************************************************************
* @file util.c
* @version V2.0.0
* @date 2019/07/01
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <stdio.h>
#include "util_misc.h"
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private values ------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode PsdkUserUtil_GetCurrentFileDirPath(const char *filePath, uint32_t pathBufferSize, char *dirPath)
{
uint32_t i = strlen(filePath) - 1;
uint32_t dirPathLen;
while (filePath[i] != '/') {
i--;
}
dirPathLen = i + 1;
if (dirPathLen + 1 > pathBufferSize) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
memcpy(dirPath, filePath, dirPathLen);
dirPath[dirPathLen] = 0;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
#if PSDK_ARCH_SYS_LINUX
T_PsdkReturnCode PsdkUserUtil_RunSystemCmd(const char *systemCmdStr)
{
FILE *fp;
fp = popen(systemCmdStr, "r");
if (fp == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
pclose(fp);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
#endif
/* Private functions definition-----------------------------------------------*/
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,62 @@
/**
********************************************************************
* @file util_misc.h
* @version V2.0.0
* @date 2019/8/12
* @brief This is the header file for "util_misc.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef UTIL_MISC_H
#define UTIL_MISC_H
/* Includes ------------------------------------------------------------------*/
#include <psdk_typedef.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
#define USER_UTIL_UNUSED(x) ((x) = (x))
#define USER_UTIL_MIN(a, b) (((a) < (b)) ? (a) : (b))
#define USER_UTIL_MAX(a, b) (((a) > (b)) ? (a) : (b))
#define USER_UTIL_IS_WORK_TURN(step, workfreq, taskfreq) (!((step) % (uint32_t) ((taskfreq) / (workfreq))))
#define UTIL_OFFSETOF(type, member) ((size_t) & ((type *)0 )-> member)
#define UTIL_ARRAY_SIZE(array) ((unsigned int) (sizeof(array) / sizeof((array)[0])))
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkUserUtil_GetCurrentFileDirPath(const char *filePath, uint32_t pathBufferSize, char *dirPath);
#if PSDK_ARCH_SYS_LINUX
T_PsdkReturnCode PsdkUserUtil_RunSystemCmd(const char *systemCmdStr);
#endif
#ifdef __cplusplus
}
#endif
#endif // UTIL_MISC_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,69 @@
/**
********************************************************************
* @file psdk_util_time.c
* @version V1.0.0
* @date 2019/01/01
* @brief
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "util_time.h"
#include <sys/resource.h>
#include <time.h>
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Private values ------------------------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
#if PSDK_ARCH_SYS_LINUX
T_PsdkRunTimeStamps PsdkUtilTime_GetRunTimeStamps(void)
{
T_PsdkRunTimeStamps timeStamps;
struct rusage rusage;
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
timeStamps.realUsec = (uint64_t) ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
getrusage(RUSAGE_SELF, &rusage);
timeStamps.userUsec =
(rusage.ru_utime.tv_sec * 1000000LL) + rusage.ru_utime.tv_usec;
timeStamps.sysUsec =
(rusage.ru_stime.tv_sec * 1000000LL) + rusage.ru_stime.tv_usec;
return timeStamps;
}
#endif
/* Private functions definition-----------------------------------------------*/
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,60 @@
/**
********************************************************************
* @file psdk_util_time.h
* @version V0.0.0
* @date 2019/01/01
* @brief This is the header file for "psdk_util_time.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef PSDK_UTIL_TIME_H
#define PSDK_UTIL_TIME_H
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
#include <stdint.h>
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct {
uint64_t realUsec;
uint64_t userUsec;
uint64_t sysUsec;
} T_PsdkRunTimeStamps;
/* Exported functions --------------------------------------------------------*/
#if PSDK_ARCH_SYS_LINUX
T_PsdkRunTimeStamps PsdkUtilTime_GetRunTimeStamps(void);
#endif
#ifdef __cplusplus
}
#endif
#endif // PSDK_DP_UTILS_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,60 @@
/**
********************************************************************
* @file file_binary_array_list_en.c
* @version V1.0.0
* @date 2019/01/01
* @brief
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "file_binary_array_list_en.h"
#include "widget_file_c/en_big_screen/icon_button1_png.h"
#include "widget_file_c/en_big_screen/icon_button2_png.h"
#include "widget_file_c/en_big_screen/icon_list_item1_png.h"
#include "widget_file_c/en_big_screen/icon_list_item2_png.h"
#include "widget_file_c/en_big_screen/icon_scale_png.h"
#include "widget_file_c/en_big_screen/icon_switch_select_png.h"
#include "widget_file_c/en_big_screen/icon_switch_unselect_png.h"
#include "widget_file_c/en_big_screen/widget_config_json.h"
/* Private constants ---------------------------------------------------------*/
/* Export types -------------------------------------------------------------*/
// English language file binary array list
static T_PsdkWidgetFileBinaryArray s_EnWidgetFileBinaryArrayList[] = {
{widget_config_json_fileName, widget_config_json_fileSize, widget_config_json_fileBinaryArray},
{icon_button1_png_fileName, icon_button1_png_fileSize, icon_button1_png_fileBinaryArray},
{icon_button2_png_fileName, icon_button2_png_fileSize, icon_button2_png_fileBinaryArray},
{icon_list_item1_png_fileName, icon_list_item1_png_fileSize, icon_list_item1_png_fileBinaryArray},
{icon_list_item2_png_fileName, icon_list_item2_png_fileSize, icon_list_item2_png_fileBinaryArray},
{icon_scale_png_fileName, icon_scale_png_fileSize, icon_scale_png_fileBinaryArray},
{icon_switch_select_png_fileName, icon_switch_select_png_fileSize, icon_switch_select_png_fileBinaryArray},
{icon_switch_unselect_png_fileName, icon_switch_unselect_png_fileSize, icon_switch_unselect_png_fileBinaryArray}
};
/* Export values -------------------------------------------------------------*/
uint32_t g_EnBinaryArrayCount = sizeof(s_EnWidgetFileBinaryArrayList) / sizeof(T_PsdkWidgetFileBinaryArray);
T_PsdkWidgetFileBinaryArray * g_EnFileBinaryArrayList = s_EnWidgetFileBinaryArrayList;
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,59 @@
/**
********************************************************************
* @file file_binary_array_list_en.h
* @version V0.0.0
* @date 2019/01/01
* @brief This is the header file for "file_binary_array_list_en.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2017-2018 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef FILE_BINARY_ARRAY_LIST_EN_H
#define FILE_BINARY_ARRAY_LIST_EN_H
#include <stdint.h>
#include <psdk_widget.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Includes ------------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
extern uint32_t g_EnBinaryArrayCount;
extern T_PsdkWidgetFileBinaryArray * g_EnFileBinaryArrayList;
#ifdef __cplusplus
}
#endif
#endif // FILE_BINARY_ARRAY_LIST_EN_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,249 @@
/**
********************************************************************
* @file test_widget.c
* @version V2.0.0
* @date 2019/07/01
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "test_widget.h"
#include <psdk_widget.h>
#include <psdk_logger.h>
#include <utils/util_misc.h>
#include <psdk_platform.h>
#include <stdio.h>
#if !PSDK_ARCH_SYS_LINUX
#include "file_binary_array_list_en.h"
#endif
/* Private constants ---------------------------------------------------------*/
#define WIDGET_DIR_PATH_LEN_MAX (256)
#define WIDGET_TASK_STACK_SIZE (2048)
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static void *PsdkTest_WidgetTask(void *arg);
static T_PsdkReturnCode PsdkTestWidget_SetWidgetValue(E_PsdkWidgetType widgetType, uint32_t index, int32_t value,
void *userData);
static T_PsdkReturnCode PsdkTestWidget_GetWidgetValue(E_PsdkWidgetType widgetType, uint32_t index, int32_t *value,
void *userData);
/* Private values ------------------------------------------------------------*/
static T_PsdkTaskHandle s_widgetTestThread;
#if PSDK_ARCH_SYS_LINUX
static bool s_isWidgetFileDirPathConfigured = false;
static char s_widgetFileDirPath[PSDK_FILE_PATH_SIZE_MAX] = {0};
#endif
static const T_PsdkWidgetHandlerListItem s_widgetHandlerList[] = {
{0, PSDK_WIDGET_TYPE_BUTTON, PsdkTestWidget_SetWidgetValue, PsdkTestWidget_GetWidgetValue, NULL},
{1, PSDK_WIDGET_TYPE_BUTTON, PsdkTestWidget_SetWidgetValue, PsdkTestWidget_GetWidgetValue, NULL},
{2, PSDK_WIDGET_TYPE_LIST, PsdkTestWidget_SetWidgetValue, PsdkTestWidget_GetWidgetValue, NULL},
{3, PSDK_WIDGET_TYPE_SWITCH, PsdkTestWidget_SetWidgetValue, PsdkTestWidget_GetWidgetValue, NULL},
{4, PSDK_WIDGET_TYPE_SCALE, PsdkTestWidget_SetWidgetValue, PsdkTestWidget_GetWidgetValue, NULL},
{5, PSDK_WIDGET_TYPE_BUTTON, PsdkTestWidget_SetWidgetValue, PsdkTestWidget_GetWidgetValue, NULL},
{6, PSDK_WIDGET_TYPE_SCALE, PsdkTestWidget_SetWidgetValue, PsdkTestWidget_GetWidgetValue, NULL},
{7, PSDK_WIDGET_TYPE_INT_INPUT_BOX, PsdkTestWidget_SetWidgetValue, PsdkTestWidget_GetWidgetValue, NULL},
{8, PSDK_WIDGET_TYPE_SWITCH, PsdkTestWidget_SetWidgetValue, PsdkTestWidget_GetWidgetValue, NULL},
{9, PSDK_WIDGET_TYPE_LIST, PsdkTestWidget_SetWidgetValue, PsdkTestWidget_GetWidgetValue, NULL},
};
static char *s_widgetTypeNameArray[] = {
"Unknown",
"Button",
"Switch",
"Scale",
"List",
"Int input box"
};
static const uint32_t s_widgetHandlerListCount = sizeof(s_widgetHandlerList) / sizeof(T_PsdkWidgetHandlerListItem);
static int32_t s_widgetValueList[sizeof(s_widgetHandlerList) / sizeof(T_PsdkWidgetHandlerListItem)] = {0};
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode PsdkTest_WidgetInit(void)
{
T_PsdkReturnCode psdkStat;
//Step 1 : Init PSDK Widget
psdkStat = PsdkWidget_Init();
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Psdk test widget init error, stat = 0x%08llX", psdkStat);
return psdkStat;
}
#if PSDK_ARCH_SYS_LINUX
//Step 2 : Set UI Config (Linux environment)
char curFileDirPath[WIDGET_DIR_PATH_LEN_MAX];
char tempPath[WIDGET_DIR_PATH_LEN_MAX];
psdkStat = PsdkUserUtil_GetCurrentFileDirPath(__FILE__, WIDGET_DIR_PATH_LEN_MAX, curFileDirPath);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Get file current path error, stat = 0x%08llX", psdkStat);
return psdkStat;
}
if (s_isWidgetFileDirPathConfigured == true) {
snprintf(tempPath, WIDGET_DIR_PATH_LEN_MAX, "%swidget_file/en_big_screen", s_widgetFileDirPath);
} else {
snprintf(tempPath, WIDGET_DIR_PATH_LEN_MAX, "%swidget_file/en_big_screen", curFileDirPath);
}
//set default ui config path
psdkStat = PsdkWidget_RegDefaultUiConfigByDirPath(tempPath);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Add default widget ui config error, stat = 0x%08llX", psdkStat);
return psdkStat;
}
//set ui config for English language
psdkStat = PsdkWidget_RegUiConfigByDirPath(PSDK_AIRCRAFT_INFO_MOBILE_APP_LANGUAGE_ENGLISH,
PSDK_AIRCRAFT_INFO_MOBILE_APP_SCREEN_TYPE_BIG_SCREEN,
tempPath);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Add widget ui config error, stat = 0x%08llX", psdkStat);
return psdkStat;
}
//set ui config for Chinese language
if (s_isWidgetFileDirPathConfigured == true) {
snprintf(tempPath, WIDGET_DIR_PATH_LEN_MAX, "%swidget_file/cn_big_screen", s_widgetFileDirPath);
} else {
snprintf(tempPath, WIDGET_DIR_PATH_LEN_MAX, "%swidget_file/cn_big_screen", curFileDirPath);
}
psdkStat = PsdkWidget_RegUiConfigByDirPath(PSDK_AIRCRAFT_INFO_MOBILE_APP_LANGUAGE_CHINESE,
PSDK_AIRCRAFT_INFO_MOBILE_APP_SCREEN_TYPE_BIG_SCREEN,
tempPath);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Add widget ui config error, stat = 0x%08llX", psdkStat);
return psdkStat;
}
#else
//Step 2 : Set UI Config (RTOS environment)
T_PsdkWidgetBinaryArrayConfig enWidgetBinaryArrayConfig = {
.binaryArrayCount = g_EnBinaryArrayCount,
.fileBinaryArrayList = g_EnFileBinaryArrayList
};
//set default ui config
psdkStat = PsdkWidget_RegDefaultUiConfigByBinaryArray(&enWidgetBinaryArrayConfig);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Add default widget ui config error, stat = 0x%08llX", psdkStat);
return psdkStat;
}
#endif
//Step 3 : Set widget handler list
psdkStat = PsdkWidget_RegHandlerList(s_widgetHandlerList, s_widgetHandlerListCount);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Set widget handler list error, stat = 0x%08llX", psdkStat);
return psdkStat;
}
//Step 4 : Run widget api sample task
if (PsdkOsal_TaskCreate(&s_widgetTestThread, PsdkTest_WidgetTask, "user_widget_task", WIDGET_TASK_STACK_SIZE,
NULL) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Psdk widget test task create error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
#if PSDK_ARCH_SYS_LINUX
T_PsdkReturnCode PsdkTest_WidgetSetConfigFilePath(const char *path)
{
memset(s_widgetFileDirPath, 0, sizeof(s_widgetFileDirPath));
memcpy(s_widgetFileDirPath, path, USER_UTIL_MIN(strlen(path), sizeof(s_widgetFileDirPath) - 1));
s_isWidgetFileDirPathConfigured = true;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
#endif
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#pragma GCC diagnostic ignored "-Wformat"
#endif
/* Private functions definition-----------------------------------------------*/
static void *PsdkTest_WidgetTask(void *arg)
{
char message[PSDK_WIDGET_FLOATING_WINDOW_MSG_MAX_LEN];
uint32_t sysTimeMs = 0;
T_PsdkReturnCode psdkStat;
USER_UTIL_UNUSED(arg);
while (1) {
psdkStat = PsdkOsal_GetTimeMs(&sysTimeMs);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Get system time ms error, stat = 0x%08llX", psdkStat);
}
snprintf(message, PSDK_WIDGET_FLOATING_WINDOW_MSG_MAX_LEN, "System time : %u ms", sysTimeMs);
psdkStat = PsdkWidgetFloatingWindow_ShowMessage(message);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Floating window show message error, stat = 0x%08llX", psdkStat);
}
PsdkOsal_TaskSleepMs(1000);
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
static T_PsdkReturnCode PsdkTestWidget_SetWidgetValue(E_PsdkWidgetType widgetType, uint32_t index, int32_t value,
void *userData)
{
USER_UTIL_UNUSED(userData);
PsdkLogger_UserLogInfo("Set widget value, widgetType = %s, widgetIndex = %d ,widgetValue = %d",
s_widgetTypeNameArray[widgetType], index, value);
s_widgetValueList[index] = value;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_PsdkReturnCode PsdkTestWidget_GetWidgetValue(E_PsdkWidgetType widgetType, uint32_t index, int32_t *value,
void *userData)
{
USER_UTIL_UNUSED(userData);
USER_UTIL_UNUSED(widgetType);
*value = s_widgetValueList[index];
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,54 @@
/**
********************************************************************
* @file test_widget.h
* @version V2.0.0
* @date 2019/07/01
* @brief This is the header file for "test_widget.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_WIDGET_H
#define TEST_WIDGET_H
/* Includes ------------------------------------------------------------------*/
#include <psdk_typedef.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_WidgetInit(void);
#if PSDK_ARCH_SYS_LINUX
T_PsdkReturnCode PsdkTest_WidgetSetConfigFilePath(const char *path);
#endif
#ifdef __cplusplus
}
#endif
#endif // TEST_WIDGET_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,119 @@
{
"version": {
"major" : 1,
"minor" : 0
},
"main_interface": {
"floating_window": {
"is_enable": true
},
"widget_list": [
{
"widget_index": 0,
"widget_type": "button",
"widget_name": "按钮_1",
"icon_file_set": {
"icon_file_name_selected" : "icon_button1.png",
"icon_file_name_unselected" : "icon_button1.png"
}
},
{
"widget_index": 1,
"widget_type": "button",
"widget_name": "按钮_2",
"icon_file_set": {
"icon_file_name_selected" : "icon_button2.png",
"icon_file_name_unselected" : "icon_button2.png"
}
},
{
"widget_index": 2,
"widget_type": "list",
"widget_name": "列表_3",
"list_item": [
{
"item_name": "选项_1",
"icon_file_set": {
"icon_file_name_selected": "icon_list_item1.png",
"icon_file_name_unselected": "icon_list_item1.png"
}
},
{
"item_name": "选项_2",
"icon_file_set": {
"icon_file_name_selected" : "icon_list_item2.png",
"icon_file_name_unselected" : "icon_list_item2.png"
}
}
]
},
{
"widget_index": 3,
"widget_type": "switch",
"widget_name": "开关_4",
"icon_file_set": {
"icon_file_name_selected": "icon_switch_select.png",
"icon_file_name_unselected": "icon_switch_unselect.png"
}
},
{
"widget_index": 4,
"widget_type": "scale",
"widget_name": "范围条_5",
"icon_file_set": {
"icon_file_name_selected": "icon_scale.png",
"icon_file_name_unselected": "icon_scale.png"
}
}
]
},
"config_interface": {
"text_input_box": {
"widget_name": "文本输入框",
"placeholder_text": "请输入消息",
"is_enable": true
},
"widget_list": [
{
"widget_index": 5,
"widget_type": "button",
"widget_name": "按钮_6"
},
{
"widget_index": 6,
"widget_type": "scale",
"widget_name": "范围条_7"
},
{
"widget_index": 7,
"widget_type": "int_input_box",
"widget_name": "整形值输入框_8",
"int_input_box_hint": "unit:s"
},
{
"widget_index": 8,
"widget_type": "switch",
"widget_name": "开关_9"
},
{
"widget_index": 9,
"widget_type": "list",
"widget_name": "列表_10",
"list_item": [
{
"item_name": "选项 1"
},
{
"item_name": "选项 2"
},
{
"item_name": "选项 3"
},
{
"item_name": "选项 4"
}
]
}
]
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

View File

@ -0,0 +1,119 @@
{
"version": {
"major" : 1,
"minor" : 0
},
"main_interface": {
"floating_window": {
"is_enable": true
},
"widget_list": [
{
"widget_index": 0,
"widget_type": "button",
"widget_name": "Button_1",
"icon_file_set": {
"icon_file_name_selected" : "icon_button1.png",
"icon_file_name_unselected" : "icon_button1.png"
}
},
{
"widget_index": 1,
"widget_type": "button",
"widget_name": "Button_2",
"icon_file_set": {
"icon_file_name_selected" : "icon_button2.png",
"icon_file_name_unselected" : "icon_button2.png"
}
},
{
"widget_index": 2,
"widget_type": "list",
"widget_name": "List_3",
"list_item": [
{
"item_name": "Item_1",
"icon_file_set": {
"icon_file_name_selected": "icon_list_item1.png",
"icon_file_name_unselected": "icon_list_item1.png"
}
},
{
"item_name": "Item_2",
"icon_file_set": {
"icon_file_name_selected" : "icon_list_item2.png",
"icon_file_name_unselected" : "icon_list_item2.png"
}
}
]
},
{
"widget_index": 3,
"widget_type": "switch",
"widget_name": "Switch_4",
"icon_file_set": {
"icon_file_name_selected": "icon_switch_select.png",
"icon_file_name_unselected": "icon_switch_unselect.png"
}
},
{
"widget_index": 4,
"widget_type": "scale",
"widget_name": "Scale_5",
"icon_file_set": {
"icon_file_name_selected": "icon_scale.png",
"icon_file_name_unselected": "icon_scale.png"
}
}
]
},
"config_interface": {
"text_input_box": {
"widget_name": "TextInputBox",
"placeholder_text": "Please input message",
"is_enable": true
},
"widget_list": [
{
"widget_index": 5,
"widget_type": "button",
"widget_name": "Button_6"
},
{
"widget_index": 6,
"widget_type": "scale",
"widget_name": "Scale_7"
},
{
"widget_index": 7,
"widget_type": "int_input_box",
"widget_name": "IntegerInputBox_8",
"int_input_box_hint": "unit:s"
},
{
"widget_index": 8,
"widget_type": "switch",
"widget_name": "Switch_9"
},
{
"widget_index": 9,
"widget_type": "list",
"widget_name": "List_10",
"list_item": [
{
"item_name": "Item 1"
},
{
"item_name": "Item 2"
},
{
"item_name": "Item 3"
},
{
"item_name": "Item 4"
}
]
}
]
}
}

View File

@ -0,0 +1,148 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_button1_png_h_included
#define __icon_button1_png_h_included
#include <stdint.h>
/* Contents of file icon_button1.png */
#define icon_button1_png_fileName "icon_button1.png"
#define icon_button1_png_fileSize 2137
static const uint8_t icon_button1_png_fileBinaryArray[2137] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xE2, 0x98, 0x77,
0x38, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
0x08, 0x13, 0x49, 0x44, 0x41, 0x54, 0x78, 0x01, 0xED, 0x9D, 0x3D, 0x6F, 0x14, 0x47, 0x18, 0xC7,
0xCF, 0x6F, 0x98, 0x84, 0x18, 0x04, 0xB2, 0xD2, 0x44, 0x89, 0x84, 0x15, 0x0B, 0x24, 0x8B, 0x86,
0x32, 0x1F, 0xC0, 0x20, 0x45, 0xF9, 0x18, 0x40, 0x4D, 0x81, 0x42, 0x50, 0xAA, 0x28, 0x05, 0xD4,
0xA9, 0x02, 0x5F, 0x80, 0x92, 0xC2, 0x29, 0xB0, 0xD2, 0xA6, 0x8A, 0x28, 0x23, 0x41, 0x83, 0x95,
0x14, 0x96, 0x90, 0x10, 0x28, 0x26, 0xE4, 0x05, 0x7C, 0x38, 0xF3, 0x1B, 0xF6, 0xBF, 0x1A, 0xCF,
0xED, 0xEE, 0xDD, 0xEE, 0x3D, 0xF6, 0xEE, 0xF9, 0x66, 0xA4, 0xF1, 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 0x01, 0x5C,
0xF7, 0xFB, 0xC4, 0x4E, 0x26, 0x85, 0x4E, 0x69, 0xE3, 0x90, 0x14, 0x5E, 0x00, 0xE8, 0x38, 0x14,
0x7C, 0x3D, 0xB2, 0x42, 0xE0, 0x61, 0x1D, 0xFB, 0xA3, 0x9A, 0x42, 0x5E, 0xD4, 0xE1, 0xA5, 0x52,
0xA0, 0xE3, 0x52, 0x73, 0xC4, 0xD4, 0xFB, 0x08, 0x81, 0xA9, 0x4E, 0x19, 0x67, 0xED, 0x76, 0xED,
0x78, 0x95, 0xA1, 0xCD, 0x51, 0x85, 0x5D, 0x75, 0x5F, 0x1E, 0x62, 0x06, 0x5F, 0x02, 0xA8, 0xD4,
0xA9, 0xA0, 0x1D, 0x67, 0x7C, 0xD2, 0x37, 0xF0, 0xCC, 0x8E, 0x81, 0xC6, 0x42, 0x84, 0x6D, 0xD9,
0xCB, 0x86, 0xF6, 0x34, 0x26, 0xC1, 0xE5, 0xDE, 0x55, 0x2F, 0x2A, 0x35, 0x1E, 0x96, 0x03, 0x02,
0x30, 0x48, 0x12, 0x54, 0x95, 0x71, 0x5F, 0x51, 0xBF, 0x37, 0x9C, 0xC2, 0x1F, 0x7E, 0x27, 0x67,
0xF7, 0x2D, 0xF0, 0x34, 0xE3, 0xFE, 0xB8, 0xCF, 0x9B, 0x84, 0x20, 0x7D, 0x47, 0xF4, 0x23, 0x1E,
0x8F, 0xDB, 0xD1, 0xF4, 0x5C, 0xB8, 0xB8, 0xFF, 0xA8, 0xB5, 0x43, 0xB8, 0x45, 0xF7, 0x16, 0x8F,
0xC7, 0xED, 0xDC, 0xE6, 0x7F, 0xAF, 0x38, 0x18, 0xCE, 0x87, 0x25, 0x84, 0x3F, 0x00, 0x00, 0x00,
0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
};
#endif /* __icon_button1_png_h_included */

View File

@ -0,0 +1,147 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_button2_png_h_included
#define __icon_button2_png_h_included
#include <stdint.h>
/* Contents of file icon_button2.png */
#define icon_button2_png_fileName "icon_button2.png"
#define icon_button2_png_fileSize 2114
static const uint8_t icon_button2_png_fileBinaryArray[2114] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xE2, 0x98, 0x77,
0x38, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
0x07, 0xFC, 0x49, 0x44, 0x41, 0x54, 0x78, 0x01, 0xED, 0x9D, 0x3D, 0x6F, 0x14, 0x47, 0x18, 0xC7,
0xCF, 0x36, 0xC6, 0x24, 0xC4, 0x20, 0x90, 0x95, 0x26, 0x4A, 0x24, 0xAC, 0x58, 0x20, 0x21, 0x1A,
0xCA, 0x7C, 0x00, 0x40, 0x8A, 0xF2, 0x31, 0x80, 0x9A, 0x02, 0x85, 0xA0, 0x54, 0x51, 0x0A, 0xA8,
0x53, 0x05, 0xBE, 0x00, 0x25, 0x85, 0x53, 0x80, 0xD2, 0xA6, 0x8A, 0x28, 0x23, 0x41, 0x83, 0x95,
0x14, 0x96, 0x90, 0x10, 0x28, 0x26, 0xE4, 0x05, 0xDB, 0x38, 0xCF, 0x6F, 0xBC, 0xFF, 0xD5, 0xDC,
0xDC, 0xDA, 0x77, 0xB7, 0xF7, 0x58, 0xBB, 0xE7, 0x9D, 0x91, 0xC6, 0xCF, 0xBC, 0x3E, 0x3B, 0xFB,
0xFB, 0xCF, 0xEC, 0x03, 0x9C, 0xB9, 0x9D, 0xE9, 0xED, 0x9F, 0x66, 0x92, 0xEE, 0xB4, 0x9E, 0x74,
0xF7, 0x86, 0xF5, 0xA7, 0xE3, 0xA7, 0xB5, 0xBE,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0xE2,
0xBA, 0x64, 0x03, 0xC4, 0x02, 0xBE, 0x04, 0x90, 0xD5, 0xA9, 0xA0, 0x9E, 0x66, 0x18, 0xD1, 0x36,
0xF0, 0xCC, 0x4E, 0x81, 0xA6, 0x42, 0xC4, 0x75, 0xCD, 0xD7, 0x1C, 0xEA, 0x5D, 0x4C, 0x82, 0xCB,
0xBD, 0xAB, 0x5C, 0x65, 0xD5, 0x1F, 0xDB, 0x01, 0x01, 0xE8, 0x24, 0x09, 0xAA, 0x6C, 0xDA, 0x56,
0xD5, 0x1E, 0x26, 0x76, 0xF0, 0x47, 0xD8, 0xC9, 0xC5, 0x7D, 0x0B, 0x3C, 0xD5, 0xB4, 0x3D, 0x6D,
0x0B, 0x53, 0x62, 0x90, 0xA1, 0x21, 0xF9, 0x91, 0xF6, 0xA7, 0xF5, 0x64, 0x78, 0x29, 0x5C, 0xDA,
0x7E, 0xD8, 0xEA, 0x31, 0xDC, 0xAA, 0x7B, 0x4B, 0xFB, 0xD3, 0x7A, 0x39, 0xE7, 0x7F, 0xF1, 0x70,
0x18, 0xCE, 0xAA, 0xDB, 0xB2, 0x97, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42,
0x60, 0x82
};
#endif /* __icon_button2_png_h_included */

View File

@ -0,0 +1,174 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_list_item1_png_h_included
#define __icon_list_item1_png_h_included
#include <stdint.h>
/* Contents of file icon_list_item1.png */
#define icon_list_item1_png_fileName "icon_list_item1.png"
#define icon_list_item1_png_fileSize 2556
static const uint8_t icon_list_item1_png_fileBinaryArray[2556] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xE2, 0x98, 0x77,
0x38, 0x00, 0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 0x06, 0x1B,
0x0A, 0x39, 0x41, 0x83, 0x15, 0x4F, 0x5A, 0xC6, 0x99, 0x26, 0x7C, 0xD6, 0x53, 0x4B, 0x08, 0x13,
0x00, 0x48, 0x88, 0xD0, 0x80, 0x4D, 0x6D, 0x8B, 0xEB, 0xB6, 0x6C, 0xA3, 0x12, 0x35, 0x1D, 0x01,
0x4D, 0x47, 0x10, 0x34, 0xB4, 0x1E, 0x37, 0x6D, 0x3D, 0xE0, 0x00, 0x67, 0x02, 0x65, 0x9A, 0xF0,
0x91, 0x66, 0xA0, 0x3D, 0x6D, 0x90, 0xAE, 0x64, 0x21, 0x7C, 0x30, 0x60, 0x9C, 0x1A, 0x0E, 0x80,
0xE8, 0xF0, 0xBD, 0xB4, 0x0D, 0x20, 0xF3, 0xA8, 0x61, 0xCC, 0x38, 0x34, 0xE3, 0x7A, 0x3E, 0xE2,
0x95, 0x2C, 0x84, 0x0B, 0x06, 0x04, 0xCF, 0x38, 0xB9, 0xD0, 0x86, 0x5A, 0xE5, 0xEB, 0x30, 0x69,
0x48, 0x6D, 0x96, 0x99, 0x69, 0xDA, 0x51, 0xE7, 0x2B, 0xA7, 0x5D, 0xB9, 0x68, 0x1F, 0x48, 0xCB,
0xA0, 0xCC, 0x72, 0x33, 0xAD, 0xAA, 0xFC, 0x07, 0x9A, 0xB8, 0xA2, 0x7E, 0x27, 0xE3, 0x05, 0x8D,
0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
};
#endif /* __icon_list_item1_png_h_included */

View File

@ -0,0 +1,176 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_list_item2_png_h_included
#define __icon_list_item2_png_h_included
#include <stdint.h>
/* Contents of file icon_list_item2.png */
#define icon_list_item2_png_fileName "icon_list_item2.png"
#define icon_list_item2_png_fileSize 2578
static const uint8_t icon_list_item2_png_fileBinaryArray[2578] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1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0x42,
0x60, 0x82
};
#endif /* __icon_list_item2_png_h_included */

View File

@ -0,0 +1,167 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_scale_png_h_included
#define __icon_scale_png_h_included
#include <stdint.h>
/* Contents of file icon_scale.png */
#define icon_scale_png_fileName "icon_scale.png"
#define icon_scale_png_fileSize 2440
static const uint8_t icon_scale_png_fileBinaryArray[2440] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xE2, 0x98, 0x77,
0x38, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
0x09, 0x42, 0x49, 0x44, 0x41, 0x54, 0x78, 0x01, 0xED, 0x9D, 0x3D, 0x6C, 0x14, 0x47, 0x18, 0x86,
0xC7, 0x7F, 0xB1, 0x63, 0x62, 0x40, 0x60, 0x59, 0xA0, 0x28, 0x41, 0x58, 0x71, 0x65, 0xD1, 0x20,
0x04, 0x28, 0xA2, 0x43, 0x4A, 0x13, 0x22, 0x6A, 0x6A, 0x0A, 0x6A, 0x90, 0x50, 0x08, 0xA4, 0x8A,
0x82, 0x80, 0x06, 0x8A, 0x54, 0x29, 0xA8, 0xA1, 0x04, 0xC9, 0x69, 0xA2, 0xD0, 0x11, 0x09, 0x08,
0x94, 0x69, 0xB1, 0x1C, 0x09, 0x03, 0x12, 0x20, 0x62, 0x02, 0x21, 0xF8, 0x2F, 0xF3, 0xAC, 0xEF,
0x5D, 0xCD, 0xCD, 0xFD, 0xAC, 0xEF, 0x67, 0x77, 0xD6, 0xBE, 0xF9, 0xA4, 0xF1, 0xCC, 0xCE, 0xEC,
0x7C, 0xB3, 0xF3, 0xBC, 0x33, 0xB3, 0x7B, 0xB7, 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79, 0x35, 0x6B, 0xB6, 0x0F, 0xD4, 0x17, 0xC2, 0xDD, 0x56, 0x7D, 0xD5, 0x61, 0xBB,
0x17, 0x4D, 0x70, 0xE9, 0xBB, 0xD2, 0xF5, 0x62, 0x95, 0xBB, 0x71, 0x8D, 0x00, 0x14, 0x62, 0x82,
0xAA, 0xD8, 0xCF, 0xAB, 0x97, 0x9F, 0x54, 0xEC, 0xC1, 0x3F, 0xC9, 0x48, 0xAE, 0xF4, 0x5B, 0xE0,
0xD9, 0xF4, 0xF3, 0xFD, 0xBC, 0xA4, 0x8A, 0x0B, 0x32, 0xC9, 0xF0, 0xFE, 0xF8, 0xE5, 0xFE, 0xB6,
0xB7, 0x7B, 0x2A, 0x9C, 0x9F, 0xBF, 0xD9, 0xB6, 0x5D, 0xB8, 0xF5, 0xFA, 0xE6, 0x97, 0xFB, 0xDB,
0x69, 0x9D, 0xFF, 0x01, 0xE6, 0xF9, 0x19, 0xD7, 0x4A, 0xC7, 0x0D, 0x5C, 0x00, 0x00, 0x00, 0x00,
0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
};
#endif /* __icon_scale_png_h_included */

View File

@ -0,0 +1,173 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_switch_select_png_h_included
#define __icon_switch_select_png_h_included
#include <stdint.h>
/* Contents of file icon_switch_select.png */
#define icon_switch_select_png_fileName "icon_switch_select.png"
#define icon_switch_select_png_fileSize 2529
static const uint8_t icon_switch_select_png_fileBinaryArray[2529] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xE2, 0x98, 0x77,
0x38, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 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0xF1, 0xD9,
0x26, 0x50, 0xD3, 0x10, 0x7A, 0x9A, 0xED, 0xD9, 0x06, 0xE9, 0x72, 0x14, 0xC2, 0xC5, 0xD8, 0x19,
0xF7, 0x0A, 0x59, 0xAE, 0x87, 0x39, 0x06, 0x40, 0x21, 0x84, 0x50, 0x19, 0x9A, 0x79, 0x5E, 0xF9,
0x4E, 0xC3, 0x32, 0x7C, 0x71, 0x66, 0x72, 0x76, 0xDC, 0x04, 0x8F, 0xA4, 0x99, 0x6F, 0xE6, 0x39,
0x4D, 0x74, 0x90, 0x4E, 0x86, 0xF1, 0x62, 0x96, 0x9B, 0x69, 0xA3, 0xBA, 0x6B, 0x38, 0x33, 0x7F,
0xB2, 0xA5, 0x75, 0xB8, 0x5E, 0x63, 0x33, 0xCB, 0xCD, 0xB4, 0xDB, 0xE6, 0x7F, 0x62, 0xCE, 0x22,
0x70, 0x90, 0xCB, 0xAB, 0x5B, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60,
0x82
};
#endif /* __icon_switch_select_png_h_included */

View File

@ -0,0 +1,172 @@
/* Generated by file2c, do not edit manually */
#ifndef __icon_switch_unselect_png_h_included
#define __icon_switch_unselect_png_h_included
#include <stdint.h>
/* Contents of file icon_switch_unselect.png */
#define icon_switch_unselect_png_fileName "icon_switch_unselect.png"
#define icon_switch_unselect_png_fileSize 2514
static const uint8_t icon_switch_unselect_png_fileBinaryArray[2514] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x60, 0x08, 0x06, 0x00, 0x00, 0x00, 0xE2, 0x98, 0x77,
0x38, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
0x09, 0x8C, 0x49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C, 0xCE, 0x67, 0xBE, 0xE9, 0xA7, 0x08, 0x80, 0x4C, 0x18, 0xA1, 0xD2, 0xB7, 0xD3, 0xD2, 0xA5,
0xEB, 0x8A, 0x15, 0xF8, 0x47, 0x8F, 0xE4, 0xC4, 0x71, 0x13, 0x3C, 0xA2, 0x76, 0xBA, 0x9D, 0xA6,
0xAB, 0x98, 0x20, 0x75, 0x82, 0xF5, 0xC7, 0xCE, 0xB7, 0xE3, 0x56, 0xF1, 0x40, 0x38, 0x3B, 0x7D,
0xA4, 0xC5, 0x4D, 0xB8, 0xE9, 0x8E, 0xCD, 0xCE, 0xB7, 0xE3, 0x41, 0x9D, 0xFF, 0x01, 0xB2, 0x15,
0x34, 0x9A, 0xBC, 0x3E, 0x46, 0x6A, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42,
0x60, 0x82
};
#endif /* __icon_switch_unselect_png_h_included */

View File

@ -0,0 +1,256 @@
/* Generated by file2c, do not edit manually */
#ifndef __widget_config_json_h_included
#define __widget_config_json_h_included
#include <stdint.h>
/* Contents of file widget_config.json */
#define widget_config_json_fileName "widget_config.json"
#define widget_config_json_fileSize 3858
static const uint8_t widget_config_json_fileBinaryArray[3858] = {
0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x22, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6F, 0x6E, 0x22, 0x3A,
0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6D, 0x61, 0x6A,
0x6F, 0x72, 0x22, 0x20, 0x3A, 0x20, 0x20, 0x31, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x22, 0x6D, 0x69, 0x6E, 0x6F, 0x72, 0x22, 0x20, 0x3A, 0x20, 0x20, 0x30, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6D, 0x61, 0x69, 0x6E, 0x5F,
0x69, 0x6E, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x6C, 0x6F, 0x61, 0x74, 0x69, 0x6E, 0x67, 0x5F,
0x77, 0x69, 0x6E, 0x64, 0x6F, 0x77, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x73, 0x5F, 0x65, 0x6E, 0x61, 0x62, 0x6C,
0x65, 0x22, 0x3A, 0x20, 0x74, 0x72, 0x75, 0x65, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64,
0x67, 0x65, 0x74, 0x5F, 0x6C, 0x69, 0x73, 0x74, 0x22, 0x3A, 0x20, 0x5B, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67,
0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20, 0x30, 0x2C, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77,
0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x62, 0x75,
0x74, 0x74, 0x6F, 0x6E, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E,
0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x42, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x5F, 0x31, 0x22,
0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x73, 0x65, 0x74,
0x22, 0x3A, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F,
0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74,
0x65, 0x64, 0x22, 0x20, 0x3A, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x62, 0x75, 0x74,
0x74, 0x6F, 0x6E, 0x31, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x75,
0x6E, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x20, 0x3A, 0x20, 0x20, 0x22, 0x69,
0x63, 0x6F, 0x6E, 0x5F, 0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x31, 0x2E, 0x70, 0x6E, 0x67, 0x22,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D,
0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20,
0x31, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x22,
0x3A, 0x20, 0x22, 0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64,
0x67, 0x65, 0x74, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x42, 0x75, 0x74, 0x74,
0x6F, 0x6E, 0x5F, 0x32, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C,
0x65, 0x5F, 0x73, 0x65, 0x74, 0x22, 0x3A, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x73,
0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x20, 0x3A, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F,
0x6E, 0x5F, 0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x32, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x2C, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E,
0x61, 0x6D, 0x65, 0x5F, 0x75, 0x6E, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x20,
0x3A, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x62, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x32,
0x2E, 0x70, 0x6E, 0x67, 0x22, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64,
0x65, 0x78, 0x22, 0x3A, 0x20, 0x32, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F,
0x74, 0x79, 0x70, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x6C, 0x69, 0x73, 0x74, 0x22, 0x2C, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x4C,
0x69, 0x73, 0x74, 0x5F, 0x33, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6C, 0x69, 0x73, 0x74, 0x5F, 0x69, 0x74,
0x65, 0x6D, 0x22, 0x3A, 0x20, 0x5B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6D, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22,
0x3A, 0x20, 0x22, 0x49, 0x74, 0x65, 0x6D, 0x5F, 0x31, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x73,
0x65, 0x74, 0x22, 0x3A, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E,
0x61, 0x6D, 0x65, 0x5F, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x20, 0x3A, 0x20,
0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x6C, 0x69, 0x73, 0x74, 0x5F, 0x69, 0x74, 0x65, 0x6D,
0x31, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E,
0x61, 0x6D, 0x65, 0x5F, 0x75, 0x6E, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x20,
0x3A, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x6C, 0x69, 0x73, 0x74, 0x5F, 0x69, 0x74,
0x65, 0x6D, 0x31, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6D, 0x5F, 0x6E, 0x61,
0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x49, 0x74, 0x65, 0x6D, 0x5F, 0x32, 0x22, 0x2C, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C,
0x65, 0x5F, 0x73, 0x65, 0x74, 0x22, 0x3A, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C,
0x65, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22,
0x20, 0x3A, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x6C, 0x69, 0x73, 0x74, 0x5F, 0x69,
0x74, 0x65, 0x6D, 0x32, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C,
0x65, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x75, 0x6E, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65,
0x64, 0x22, 0x20, 0x3A, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x6C, 0x69, 0x73, 0x74,
0x5F, 0x69, 0x74, 0x65, 0x6D, 0x32, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5D, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67,
0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20, 0x33, 0x2C, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77,
0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x73, 0x77,
0x69, 0x74, 0x63, 0x68, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E,
0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x53, 0x77, 0x69, 0x74, 0x63, 0x68, 0x5F, 0x34, 0x22,
0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x73, 0x65, 0x74,
0x22, 0x3A, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F,
0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74,
0x65, 0x64, 0x22, 0x20, 0x3A, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x73, 0x77, 0x69,
0x74, 0x63, 0x68, 0x5F, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x2C,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F,
0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x75, 0x6E, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22,
0x20, 0x3A, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68,
0x5F, 0x75, 0x6E, 0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77,
0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20, 0x34, 0x2C,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3A, 0x20,
0x22, 0x73, 0x63, 0x61, 0x6C, 0x65, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74,
0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x53, 0x63, 0x61, 0x6C, 0x65, 0x5F, 0x35,
0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x73, 0x65,
0x74, 0x22, 0x3A, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E,
0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x73, 0x65, 0x6C, 0x65, 0x63,
0x74, 0x65, 0x64, 0x22, 0x20, 0x3A, 0x20, 0x20, 0x22, 0x69, 0x63, 0x6F, 0x6E, 0x5F, 0x73, 0x63,
0x61, 0x6C, 0x65, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69,
0x63, 0x6F, 0x6E, 0x5F, 0x66, 0x69, 0x6C, 0x65, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x5F, 0x75, 0x6E,
0x73, 0x65, 0x6C, 0x65, 0x63, 0x74, 0x65, 0x64, 0x22, 0x20, 0x3A, 0x20, 0x20, 0x22, 0x69, 0x63,
0x6F, 0x6E, 0x5F, 0x73, 0x63, 0x61, 0x6C, 0x65, 0x2E, 0x70, 0x6E, 0x67, 0x22, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x22, 0x63, 0x6F, 0x6E, 0x66, 0x69, 0x67, 0x5F, 0x69, 0x6E, 0x74, 0x65, 0x72,
0x66, 0x61, 0x63, 0x65, 0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x22, 0x74, 0x65, 0x78, 0x74, 0x5F, 0x69, 0x6E, 0x70, 0x75, 0x74, 0x5F, 0x62, 0x6F, 0x78,
0x22, 0x3A, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20,
0x22, 0x54, 0x65, 0x78, 0x74, 0x49, 0x6E, 0x70, 0x75, 0x74, 0x42, 0x6F, 0x78, 0x22, 0x2C, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x70, 0x6C, 0x61,
0x63, 0x65, 0x68, 0x6F, 0x6C, 0x64, 0x65, 0x72, 0x5F, 0x74, 0x65, 0x78, 0x74, 0x22, 0x3A, 0x20,
0x22, 0x50, 0x6C, 0x65, 0x61, 0x73, 0x65, 0x20, 0x69, 0x6E, 0x70, 0x75, 0x74, 0x20, 0x6D, 0x65,
0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x73, 0x5F, 0x65, 0x6E, 0x61, 0x62, 0x6C, 0x65, 0x22, 0x3A,
0x20, 0x74, 0x72, 0x75, 0x65, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74,
0x5F, 0x6C, 0x69, 0x73, 0x74, 0x22, 0x3A, 0x20, 0x5B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F,
0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20, 0x35, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67,
0x65, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x62, 0x75, 0x74, 0x74, 0x6F,
0x6E, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E, 0x61, 0x6D, 0x65,
0x22, 0x3A, 0x20, 0x22, 0x42, 0x75, 0x74, 0x74, 0x6F, 0x6E, 0x5F, 0x36, 0x22, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67,
0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20, 0x36, 0x2C, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77,
0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x73, 0x63,
0x61, 0x6C, 0x65, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E, 0x61,
0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x53, 0x63, 0x61, 0x6C, 0x65, 0x5F, 0x37, 0x22, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64,
0x67, 0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20, 0x37, 0x2C, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x69,
0x6E, 0x74, 0x5F, 0x69, 0x6E, 0x70, 0x75, 0x74, 0x5F, 0x62, 0x6F, 0x78, 0x22, 0x2C, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x49,
0x6E, 0x74, 0x65, 0x67, 0x65, 0x72, 0x49, 0x6E, 0x70, 0x75, 0x74, 0x42, 0x6F, 0x78, 0x5F, 0x38,
0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x22, 0x69, 0x6E, 0x74, 0x5F, 0x69, 0x6E, 0x70, 0x75, 0x74, 0x5F, 0x62, 0x6F,
0x78, 0x5F, 0x68, 0x69, 0x6E, 0x74, 0x22, 0x3A, 0x20, 0x22, 0x75, 0x6E, 0x69, 0x74, 0x3A, 0x73,
0x22, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22,
0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22, 0x3A, 0x20, 0x38,
0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3A,
0x20, 0x22, 0x73, 0x77, 0x69, 0x74, 0x63, 0x68, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67,
0x65, 0x74, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x53, 0x77, 0x69, 0x74, 0x63,
0x68, 0x5F, 0x39, 0x22, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x69, 0x6E, 0x64, 0x65, 0x78, 0x22,
0x3A, 0x20, 0x39, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64, 0x67, 0x65, 0x74, 0x5F, 0x74, 0x79, 0x70,
0x65, 0x22, 0x3A, 0x20, 0x22, 0x6C, 0x69, 0x73, 0x74, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x77, 0x69, 0x64,
0x67, 0x65, 0x74, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x4C, 0x69, 0x73, 0x74,
0x5F, 0x31, 0x30, 0x22, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6C, 0x69, 0x73, 0x74, 0x5F, 0x69, 0x74, 0x65, 0x6D,
0x22, 0x3A, 0x20, 0x5B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6D, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20,
0x22, 0x49, 0x74, 0x65, 0x6D, 0x20, 0x31, 0x22, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69,
0x74, 0x65, 0x6D, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x49, 0x74, 0x65, 0x6D,
0x20, 0x32, 0x22, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B,
0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6D, 0x5F, 0x6E,
0x61, 0x6D, 0x65, 0x22, 0x3A, 0x20, 0x22, 0x49, 0x74, 0x65, 0x6D, 0x20, 0x33, 0x22, 0x0A, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x7D, 0x2C, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7B, 0x0A, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x22, 0x69, 0x74, 0x65, 0x6D, 0x5F, 0x6E, 0x61, 0x6D, 0x65, 0x22, 0x3A,
0x20, 0x22, 0x49, 0x74, 0x65, 0x6D, 0x20, 0x34, 0x22, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
0x5D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A,
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x7D, 0x0A,
0x7D, 0x0A
};
#endif /* __widget_config_json_h_included */

View File

@ -0,0 +1,349 @@
/**
********************************************************************
* @file test_xport.c
* @version V2.0.0
* @date 2019/10/16
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <psdk_gimbal.h>
#include "test_xport.h"
#include "psdk_logger.h"
#include "psdk_platform.h"
#include "utils/util_misc.h"
#include "psdk_aircraft_info.h"
#include "camera_emu/test_payload_cam_emu.h"
/* Private constants ---------------------------------------------------------*/
#define XPORT_TASK_FREQ (10)
#define XPORT_TASK_STACK_SIZE (2048)
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static void *UserXPort_Task(void *arg);
static T_PsdkReturnCode ReceiveXPortSystemState(T_PsdkGimbalSystemState systemState);
static T_PsdkReturnCode ReceiveXPortAttitudeInformation(T_PsdkGimbalAttitudeInformation attitudeInformation);
/* Private variables ---------------------------------------------------------*/
static T_PsdkTaskHandle s_userXPortThread;
static T_PsdkMutexHandle s_userXPortMutex;
static T_PsdkGimbalSystemState s_userXPortSystemState = {0};
static bool s_isUserXPortInited = false;
static bool s_isUserXPortSystemStateVaild = false;
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode PsdkTest_XPortInit(void)
{
T_PsdkReturnCode psdkStat;
T_PsdkXPortLimitAngle limitAngle = {0};
T_PsdkAircraftInfoBaseInfo aircraftInfoBaseInfo = {0};
psdkStat = PsdkXPort_Init();
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("XPort init error: 0x%08llX.", psdkStat);
return psdkStat;
}
s_isUserXPortInited = true;
psdkStat = PsdkOsal_MutexCreate(&s_userXPortMutex);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("user XPort mutex create error: 0x%08llX.", psdkStat);
return psdkStat;
}
psdkStat = PsdkXPort_RegReceiveSystemStateCallback(ReceiveXPortSystemState);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("register receive XPort system state callback function error: 0x%08llX.", psdkStat);
return psdkStat;
}
psdkStat = PsdkXPort_RegReceiveAttitudeInformationCallback(ReceiveXPortAttitudeInformation);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("register receive XPort attitude information callback function error: 0x%08llX.",
psdkStat);
return psdkStat;
}
limitAngle.upperLimit = 300;
limitAngle.lowerLimit = -1000;
psdkStat = PsdkXPort_SetLimitAngleSync(PSDK_XPORT_LIMIT_ANGLE_CATEGORY_PITCH_JOINT_ANGLE, limitAngle);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("set pitch joint angle limit angle for XPort error: 0x%08llX.", psdkStat);
return psdkStat;
}
limitAngle.upperLimit = 300;
limitAngle.lowerLimit = -800;
psdkStat = PsdkXPort_SetLimitAngleSync(PSDK_XPORT_LIMIT_ANGLE_CATEGORY_PITCH_EULER_ANGLE, limitAngle);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("set pitch euler angle limit angle for XPort error: 0x%08llX.", psdkStat);
return psdkStat;
}
limitAngle.upperLimit = 300;
limitAngle.lowerLimit = -1000;
psdkStat = PsdkXPort_SetLimitAngleSync(PSDK_XPORT_LIMIT_ANGLE_CATEGORY_PITCH_EULER_ANGLE_EXTENSION, limitAngle);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("set pitch extension euler angle limit angle for XPort error: 0x%08llX.", psdkStat);
return psdkStat;
}
psdkStat = PsdkAircraftInfo_GetBaseInfo(&aircraftInfoBaseInfo);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get aircraft base information error: 0x%08llX.", psdkStat);
return psdkStat;
}
if (aircraftInfoBaseInfo.payloadMountPosition == PSDK_AIRCRAFT_INFO_PAYLOAD_MOUNT_POSITION_NO1) {
limitAngle.upperLimit = 300;
limitAngle.lowerLimit = -1500;
} else if (aircraftInfoBaseInfo.payloadMountPosition == PSDK_AIRCRAFT_INFO_PAYLOAD_MOUNT_POSITION_NO2) {
limitAngle.upperLimit = 1500;
limitAngle.lowerLimit = -300;
} else if (aircraftInfoBaseInfo.payloadMountPosition == PSDK_AIRCRAFT_INFO_PAYLOAD_MOUNT_POSITION_NO3) {
limitAngle.upperLimit = 1500;
limitAngle.lowerLimit = -1500;
} else {
PsdkLogger_UserLogWarn("payload mount position is unknown.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
psdkStat = PsdkXPort_SetLimitAngleSync(PSDK_XPORT_LIMIT_ANGLE_CATEGORY_YAW_JOINT_ANGLE, limitAngle);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("set yaw joint angle limit angle for XPort error: 0x%08llX.", psdkStat);
return psdkStat;
}
psdkStat = PsdkXPort_SetGimbalModeSync(PSDK_GIMBAL_MODE_FREE);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("set XPort gimbal mode error: 0x%08llX.", psdkStat);
return psdkStat;
}
psdkStat = PsdkXPort_ResetSync(PSDK_GIMBAL_RESET_MODE_PITCH_AND_YAW);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("reset XPort gimbal error: 0x%08llX.", psdkStat);
return psdkStat;
}
if (PsdkOsal_TaskCreate(&s_userXPortThread, UserXPort_Task, "user_xport_task", XPORT_TASK_STACK_SIZE, NULL) !=
PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("user XPort task create error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkTest_XPortDeInit(void)
{
T_PsdkReturnCode psdkStat;
psdkStat = PsdkOsal_TaskDestroy(s_userXPortThread);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Destroy test xport thread error: 0x%08llX.", psdkStat);
return psdkStat;
}
psdkStat = PsdkOsal_MutexDestroy(s_userXPortMutex);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Destroy test xport mutex error: 0x%08llX.", psdkStat);
return psdkStat;
}
psdkStat = PsdkXPort_DeInit();
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("XPort de-init error: 0x%08llX.", psdkStat);
return psdkStat;
}
s_isUserXPortInited = false;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkTest_XPortGetSystemState(T_PsdkGimbalSystemState *systemState)
{
T_PsdkReturnCode returnCode;
if (s_isUserXPortInited != true || s_isUserXPortSystemStateVaild != true) {
PsdkLogger_UserLogWarn("user XPort has not inited.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_NONSUPPORT_IN_CURRENT_STATE;
}
returnCode = PsdkOsal_MutexLock(s_userXPortMutex);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("user XPort mutex lock error: 0x%08llX.", returnCode);
return returnCode;
}
memcpy(systemState, &s_userXPortSystemState, sizeof(T_PsdkGimbalSystemState));
returnCode = PsdkOsal_MutexUnlock(s_userXPortMutex);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("user XPort mutex unlock error: 0x%08llX.", returnCode);
return returnCode;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
#ifndef __CC_ARM
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
#endif
static void *UserXPort_Task(void *arg)
{
T_PsdkReturnCode psdkStat;
T_PsdkXPortLimitAngle limitAngle = {0};
float opticalZoomFactor = 1.0f;
float digitalZoomFactor = 1.0f;
int step = 0;
USER_UTIL_UNUSED(arg);
while (1) {
PsdkOsal_TaskSleepMs(1000 / XPORT_TASK_FREQ);
step++;
if (USER_UTIL_IS_WORK_TURN(step, 1, XPORT_TASK_FREQ)) {
psdkStat = PsdkXPort_GetLimitAngleSync(PSDK_XPORT_LIMIT_ANGLE_CATEGORY_ROLL_JOINT_ANGLE, &limitAngle);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get roll joint angle limit angle from XPort error: 0x%08llX.", psdkStat);
continue;
}
PsdkLogger_UserLogDebug("roll joint angle limit angle of XPort: upper limit %d, lower limit %d.",
limitAngle.upperLimit, limitAngle.lowerLimit);
psdkStat = PsdkXPort_GetLimitAngleSync(PSDK_XPORT_LIMIT_ANGLE_CATEGORY_PITCH_JOINT_ANGLE, &limitAngle);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get pitch joint angle limit angle from XPort error: 0x%08llX.", psdkStat);
continue;
}
PsdkLogger_UserLogDebug("pitch joint angle limit angle of XPort: upper limit %d, lower limit %d.",
limitAngle.upperLimit, limitAngle.lowerLimit);
psdkStat = PsdkXPort_GetLimitAngleSync(PSDK_XPORT_LIMIT_ANGLE_CATEGORY_PITCH_EULER_ANGLE, &limitAngle);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get pitch euler angle limit angle from XPort error: 0x%08llX.", psdkStat);
continue;
}
PsdkLogger_UserLogDebug("pitch euler angle limit angle of XPort: upper limit %d, lower limit %d.",
limitAngle.upperLimit, limitAngle.lowerLimit);
psdkStat = PsdkXPort_GetLimitAngleSync(PSDK_XPORT_LIMIT_ANGLE_CATEGORY_PITCH_EULER_ANGLE_EXTENSION,
&limitAngle);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get pitch extension euler angle limit angle from XPort error: 0x%08llX.",
psdkStat);
continue;
}
PsdkLogger_UserLogDebug("pitch extension euler angle limit angle of XPort: upper limit %d, lower limit %d.",
limitAngle.upperLimit, limitAngle.lowerLimit);
psdkStat = PsdkXPort_GetLimitAngleSync(PSDK_XPORT_LIMIT_ANGLE_CATEGORY_YAW_JOINT_ANGLE, &limitAngle);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get yaw joint angle limit angle from XPort error: 0x%08llX.", psdkStat);
continue;
}
PsdkLogger_UserLogDebug("yaw joint angle limit angle of XPort: upper limit %d, lower limit %d.",
limitAngle.upperLimit, limitAngle.lowerLimit);
}
if (USER_UTIL_IS_WORK_TURN(step, 10, XPORT_TASK_FREQ)) {
if (PsdkTest_CameraIsInited()) {
psdkStat = PsdkTest_CameraGetOpticalZoomFactor(&opticalZoomFactor);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get camera optical zoom factor error: %d.", psdkStat);
continue;
}
psdkStat = PsdkTest_CameraGetDigitalZoomFactor(&digitalZoomFactor);
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get camera digital zoom factor error: %d.", psdkStat);
continue;
}
psdkStat = PsdkXPort_SetSpeedConversionFactor(1 / (opticalZoomFactor * digitalZoomFactor));
if (psdkStat != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("set speed conversion factor error: %d.", psdkStat);
continue;
}
}
}
}
}
#ifndef __CC_ARM
#pragma GCC diagnostic pop
#endif
static T_PsdkReturnCode ReceiveXPortSystemState(T_PsdkGimbalSystemState systemState)
{
T_PsdkReturnCode returnCode;
returnCode = PsdkOsal_MutexLock(s_userXPortMutex);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("user XPort mutex lock error: 0x%08llX.", returnCode);
return returnCode;
}
s_isUserXPortSystemStateVaild = true;
memcpy(&s_userXPortSystemState, &systemState, sizeof(T_PsdkGimbalSystemState));
returnCode = PsdkOsal_MutexUnlock(s_userXPortMutex);
if (returnCode != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("user XPort mutex unlock error: 0x%08llX.", returnCode);
return returnCode;
}
PsdkLogger_UserLogDebug("receive XPort system state: mounted upward flag %d, gimbal mode %d.",
systemState.mountedUpward, systemState.gimbalMode);
PsdkLogger_UserLogDebug("XPort fine tune: %d %d %d.", systemState.fineTuneAngle.pitch,
systemState.fineTuneAngle.roll, systemState.fineTuneAngle.yaw);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_PsdkReturnCode ReceiveXPortAttitudeInformation(T_PsdkGimbalAttitudeInformation attitudeInformation)
{
PsdkLogger_UserLogDebug("receive XPort attitude information:");
PsdkLogger_UserLogDebug("XPort attitude: pitch %d, roll %d, yaw %d.", attitudeInformation.attitude.pitch,
attitudeInformation.attitude.roll, attitudeInformation.attitude.yaw);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,56 @@
/**
********************************************************************
* @file test_xport.h
* @version V2.0.0
* @date 2019/10/16
* @brief This is the header file for "test_xport.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef TEST_XPORT_H
#define TEST_XPORT_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#include "psdk_xport.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkTest_XPortInit(void);
T_PsdkReturnCode PsdkTest_XPortDeInit(void);
T_PsdkReturnCode PsdkTest_XPortGetSystemState(T_PsdkGimbalSystemState *systemState);
#ifdef __cplusplus
}
#endif
#endif // TEST_XPORT_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,484 @@
/**
********************************************************************
* @file sys_monitor.c
* @version V2.0.0
* @date 2019/11/10
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <assert.h>
#include "sys_monitor.h"
#include "psdk_logger.h"
#include "utils/util_misc.h"
/* Private constants ---------------------------------------------------------*/
#define MONITOR_VMRSS_LINE 15
#define MONITOR_PROCESS_ITEM 14
#define MONITOR_CMD_BUF_SIZE 512
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
static const char *Monitor_GetItems(const char *buffer, int ie);
/* Private variables ---------------------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
int Monitor_GetPhyMem(pid_t p)
{
int i;
char file[64] = {0};
FILE *fd;
char lineBuf[256] = {0};
char name[32];
int vmrss = 0; //memory peak
char *ret = NULL;
sprintf(file, "/proc/%d/status", (int) p);
fd = fopen(file, "r");
if (fd == NULL) {
PsdkLogger_UserLogError("open file fail.");
return 0;
}
for (i = 0; i < MONITOR_VMRSS_LINE - 1; i++) {
ret = fgets(lineBuf, sizeof(lineBuf), fd);
USER_UTIL_UNUSED(ret);
}
ret = fgets(lineBuf, sizeof(lineBuf), fd);
if (ret == NULL)
goto out;
sscanf(lineBuf, "%31s %d", name, &vmrss);
out:
fclose(fd);
return vmrss;
}
int Monitor_GetTotalMem(void)
{
char *file = "/proc/meminfo";
FILE *fd;
char lineBuf[256] = {0};
char name[32];
int memtotal = 0;
char *ret = NULL;
fd = fopen(file, "r");
if (fd == NULL) {
PsdkLogger_UserLogError("open file fail.");
return 0;
}
ret = fgets(lineBuf, sizeof(lineBuf), fd);
if (ret == NULL)
goto out;
sscanf(lineBuf, "%31s %d", name, &memtotal);
out:
fclose(fd);
return memtotal;
}
float Monitor_GetPmem(pid_t p)
{
int phy = Monitor_GetPhyMem(p);
int total = Monitor_GetTotalMem();
float occupy = (float) ((phy * 1.0) / (total * 1.0));
return occupy;
}
unsigned int Monitor_GetCpuOccupyOfProcess(pid_t pid)
{
char file[64] = {0};
T_MonitorProcessCpuOccupy t = {0};
FILE *fd;
char lineBuf[1024] = {0};
char *q = NULL;
char *ret = NULL;
sprintf(file, "/proc/%d/stat", (int) pid);
fd = fopen(file, "r");
if (fd == NULL) {
PsdkLogger_UserLogError("open file fail.");
return 0;
}
ret = fgets(lineBuf, sizeof(lineBuf), fd);
if (ret == NULL)
goto out;
sscanf(lineBuf, "%u", (unsigned int *) &t.pid);
q = (char *) Monitor_GetItems(lineBuf, MONITOR_PROCESS_ITEM);
if (q == NULL) {
PsdkLogger_UserLogError("get item fail.");
goto out;
}
sscanf(q, "%u %u %u %u", &t.utime, &t.stime, &t.cutime, &t.cstime);
out:
fclose(fd);
return (t.utime + t.stime + t.cutime + t.cstime);
}
unsigned int Monitor_GetCpuOccupyOfThread(pid_t pid, pid_t tid)
{
char file[64] = {0};
T_MonitorProcessCpuOccupy t = {0};
FILE *fd;
char lineBuf[1024] = {0};
char *q = NULL;
char *ret = NULL;
sprintf(file, "/proc/%d/task/%d/stat", (int) pid, (int) tid);
fd = fopen(file, "r");
if (fd == NULL) {
PsdkLogger_UserLogError("open file fail.");
return 0;
}
ret = fgets(lineBuf, sizeof(lineBuf), fd);
if (ret == NULL)
goto out;
sscanf(lineBuf, "%u", (unsigned int *) &t.pid);
q = (char *) Monitor_GetItems(lineBuf, MONITOR_PROCESS_ITEM);
if (q == NULL) {
PsdkLogger_UserLogError("get item fail.");
goto out;
}
sscanf(q, "%u %u %u %u", &t.utime, &t.stime, &t.cutime, &t.cstime);
out:
fclose(fd);
return (t.utime + t.stime + t.cutime + t.cstime);
}
unsigned int Monitor_GetCpuTotalOccupy(void)
{
FILE *fd;
char buff[1024] = {0};
T_MonitorTotalCpuOccupy t = {0};
char name[16];
char *ret = NULL;
fd = fopen("/proc/stat", "r");
if (fd == NULL) {
PsdkLogger_UserLogError("open file fail.");
return 0;
}
ret = fgets(buff, sizeof(buff), fd);
if (ret == NULL)
goto out;
sscanf(buff, "%15s %u %u %u %u", name, &t.user, &t.nice, &t.system, &t.idle);
out:
fclose(fd);
return (t.user + t.nice + t.system + t.idle);
}
float Monitor_GetPcpuOfThread(pid_t pid, pid_t tid)
{
FILE *fp;
char cmdStr[MONITOR_CMD_BUF_SIZE];
char lineBuf[256] = {0};
pid_t tidInCommandLine = 0;
float pcpuInCommandLine = 0.0f;
int ret;
char *q = NULL;
snprintf(cmdStr, MONITOR_CMD_BUF_SIZE, "ps -mp %d -o tid,pcpu", (int) pid);
fp = popen(cmdStr, "r");
if (fp == NULL) {
PsdkLogger_UserLogError("fp is null.");
return 0;
}
while (fgets(lineBuf, sizeof(lineBuf), fp) != NULL) {
q = (char *) Monitor_GetItems(lineBuf, 1);
if (q == NULL) {
PsdkLogger_UserLogError("get item fail.");
goto out;
}
sscanf(q, "%u", (unsigned int *) &tidInCommandLine);
if (tidInCommandLine == tid) {
q = (char *) Monitor_GetItems(lineBuf, 2);
if (q == NULL) {
PsdkLogger_UserLogError("get item fail.");
goto out;
}
ret = sscanf(q, "%f", &pcpuInCommandLine);
if (ret <= 0) {
PsdkLogger_UserLogError("get pcpu error.");
pcpuInCommandLine = 0;
}
goto out;
}
}
PsdkLogger_UserLogDebug("not found thread.");
out:
pclose(fp);
return pcpuInCommandLine;
}
unsigned int Monitor_GetThreadCountOfProcess(pid_t pid)
{
FILE *fp;
char cmdStr[MONITOR_CMD_BUF_SIZE];
unsigned int count;
int ret;
snprintf(cmdStr, MONITOR_CMD_BUF_SIZE, "ps -T -p %d | wc -l", (int) pid);
fp = popen(cmdStr, "r");
if (fp == NULL) {
PsdkLogger_UserLogError("fp is null.");
return 0;
}
ret = fscanf(fp, "%u", &count);
if (ret <= 0) {
PsdkLogger_UserLogError("get count error.");
count = 0;
goto out;
}
count--;
out:
pclose(fp);
return count;
}
void Monitor_GetTidListOfProcess(pid_t pid, pid_t *tidList, unsigned int size)
{
int i = 0;
FILE *fp;
char cmdStr[MONITOR_CMD_BUF_SIZE];
char lineBuf[256] = {0};
int ret = 0;
if (Monitor_GetThreadCountOfProcess(pid) > size) {
PsdkLogger_UserLogError("size is too small.");
return;
}
snprintf(cmdStr, MONITOR_CMD_BUF_SIZE, "ps -mp %d -o tid", (int) pid);
fp = popen(cmdStr, "r");
if (fp == NULL) {
PsdkLogger_UserLogError("fp is null.");
return;
}
while (fgets(lineBuf, sizeof(lineBuf), fp) != NULL && i <= size) {
ret = sscanf(lineBuf, "%u", (unsigned int *) &tidList[i]);
if (ret > 0)
i++;
}
pclose(fp);
}
void Monitor_GetNameOfThread(pid_t pid, pid_t tid, char *name, unsigned int size)
{
char file[64] = {0};
FILE *fd;
char lineBuf[32] = {0};
char *ret = NULL;
memset(name, 0, size);
sprintf(file, "/proc/%d/task/%d/comm", (int) pid, (int) tid);
fd = fopen(file, "r");
if (fd == NULL) {
PsdkLogger_UserLogDebug("open file fail.");
return;
}
ret = fgets(lineBuf, sizeof(lineBuf), fd);
if (ret == NULL)
goto out;
if (lineBuf[strlen(lineBuf) - 1] == '\n')
lineBuf[strlen(lineBuf) - 1] = '\0';
strncpy(name, lineBuf, USER_UTIL_MIN(size - 1, sizeof(lineBuf)));
out:
fclose(fd);
}
/**
* @brief
* @param pid
* @return Unit: B.
*/
unsigned int Monitor_GetHeapUsed(pid_t pid)
{
FILE *fp;
char cmdStr[MONITOR_CMD_BUF_SIZE];
char lineBuf[256] = {0};
int ret = 0;
unsigned int heapUsed = 0;
char *q = NULL;
char *rett = NULL;
snprintf(cmdStr, MONITOR_CMD_BUF_SIZE, "cat /proc/%d/smaps | grep -A 18 heap | grep Private_Dirty", (int) pid);
fp = popen(cmdStr, "r");
if (fp == NULL) {
PsdkLogger_UserLogError("fp is null.");
return 0;
}
rett = fgets(lineBuf, sizeof(lineBuf), fp);
if (rett == NULL) {
goto out;
}
q = (char *) Monitor_GetItems(lineBuf, 2);
if (q == NULL) {
PsdkLogger_UserLogError("get item fail.");
goto out;
}
ret = sscanf(q, "%u", &heapUsed);
if (ret <= 0) {
PsdkLogger_UserLogError("can not find heapUsed.");
heapUsed = 0;
goto out;
}
heapUsed *= 1024;
out:
pclose(fp);
return heapUsed;
}
/**
* @brief
* @param pid
* @return Unit: B.
*/
unsigned int Monitor_GetStackUsed(pid_t pid)
{
FILE *fp;
char cmdStr[MONITOR_CMD_BUF_SIZE];
char lineBuf[256] = {0};
int ret = 0;
unsigned int stackUsed = 0;
char *q = NULL;
char *rett = NULL;
snprintf(cmdStr, MONITOR_CMD_BUF_SIZE, "cat /proc/%d/smaps | grep -A 18 stack | grep Private_Dirty", (int) pid);
fp = popen(cmdStr, "r");
if (fp == NULL) {
PsdkLogger_UserLogError("fp is null.");
return 0;
}
rett = fgets(lineBuf, sizeof(lineBuf), fp);
if (rett == NULL)
goto out;
q = (char *) Monitor_GetItems(lineBuf, 2);
if (q == NULL) {
PsdkLogger_UserLogError("get item fail.");
goto out;
}
ret = sscanf(q, "%u", &stackUsed);
if (ret <= 0) {
PsdkLogger_UserLogError("can not find stackUsed.");
stackUsed = 0;
goto out;
}
stackUsed *= 1024;
out:
pclose(fp);
return stackUsed;
}
/* Private functions definition-----------------------------------------------*/
static const char *Monitor_GetItems(const char *buffer, int ie)
{
int i = 0;
int j = 0;
char *p = (char *) buffer;
int len = (int) strlen(buffer);
int count = 0;
if (1 == ie || ie < 1) {
return p;
}
while (1) {
for (i = j; i < len; i++) {
if (*(buffer + i) != ' ') {
count++;
if (count == ie)
return buffer + i;
break;
}
}
for (j = i; j < len; ++j) {
if (*(buffer + j) == ' ')
break;
}
if (i == len || j == len)
break;
}
return NULL;
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,78 @@
/**
********************************************************************
* @file sys_monitor.h
* @version V2.0.0
* @date 2019/11/10
* @brief This is the header file for "sys_monitor.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef SYS_MONITOR_H
#define SYS_MONITOR_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
typedef struct {
unsigned int user;
unsigned int nice;
unsigned int system;
unsigned int idle;
} T_MonitorTotalCpuOccupy;
typedef struct {
pid_t pid;
unsigned int utime;
unsigned int stime;
unsigned int cutime;
unsigned int cstime;
} T_MonitorProcessCpuOccupy;
/* Exported functions --------------------------------------------------------*/
int Monitor_GetPhyMem(pid_t p);
int Monitor_GetTotalMem();
unsigned int Monitor_GetCpuTotalOccupy();
unsigned int Monitor_GetCpuOccupyOfProcess(pid_t pid);
unsigned int Monitor_GetCpuOccupyOfThread(pid_t pid, pid_t tid);
float Monitor_GetPcpuOfThread(pid_t pid, pid_t tid);
float Monitor_GetPmem(pid_t p);
unsigned int Monitor_GetThreadCountOfProcess(pid_t pid);
void Monitor_GetTidListOfProcess(pid_t pid, pid_t *tidList, unsigned int size);
void Monitor_GetNameOfThread(pid_t pid, pid_t tid, char *name, unsigned int size);
unsigned int Monitor_GetHeapUsed(pid_t pid);
unsigned int Monitor_GetStackUsed(pid_t pid);
#ifdef __cplusplus
}
#endif
#endif //SYS_MONITOR_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,294 @@
/**
********************************************************************
* @file psdk_osal.c
* @version V2.0.0
* @date 2019/07/01
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "osal.h"
#include "utils/util_misc.h"
#include "psdk_logger.h"
/* Private constants ---------------------------------------------------------*/
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
/* Private functions definition-----------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode
Osal_TaskCreate(T_PsdkTaskHandle *task, void *(*taskFunc)(void *), const char *name, uint32_t stackSize, void *arg)
{
int result;
char nameDealed[16] = {0};
USER_UTIL_UNUSED(stackSize);
*task = malloc(sizeof(pthread_t));
if (*task == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
result = pthread_create(*task, NULL, taskFunc, arg);
if (result != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
if (name != NULL)
strncpy(nameDealed, name, sizeof(nameDealed) - 1);
result = pthread_setname_np(*(pthread_t * ) * task, nameDealed);
if (result != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_TaskDestroy(T_PsdkTaskHandle task)
{
pthread_cancel(*(pthread_t *) task);
free(task);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_TaskSleepMs(uint32_t timeMs)
{
usleep(1000 * timeMs);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/**
* @brief Declare the mutex container, initialize the mutex, and
* create mutex ID.
* @param mutex: pointer to the created mutex ID.
* @return an enum that represents a status of PSDK
*/
T_PsdkReturnCode Osal_MutexCreate(T_PsdkMutexHandle *mutex)
{
int result;
*mutex = malloc(sizeof(pthread_mutex_t));
if (*mutex == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
result = pthread_mutex_init(*mutex, NULL);
if (result != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/**
* @brief Delete the created mutex.
* @param mutex: pointer to the created mutex ID.
* @return an enum that represents a status of PSDK
*/
T_PsdkReturnCode Osal_MutexDestroy(T_PsdkMutexHandle mutex)
{
int result;
result = pthread_mutex_destroy(mutex);
if (result != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
free(mutex);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/**
* @brief Acquire and lock the mutex when peripheral access is required
* @param mutex: pointer to the created mutex ID.
* @return an enum that represents a status of PSDK
*/
T_PsdkReturnCode Osal_MutexLock(T_PsdkMutexHandle mutex)
{
int result = pthread_mutex_lock(mutex);
if (result != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/**
* @brief Unlock and release the mutex, when done with the peripheral access.
* @param mutex: pointer to the created mutex ID.
* @return an enum that represents a status of PSDK
*/
T_PsdkReturnCode Osal_MutexUnlock(T_PsdkMutexHandle mutex)
{
int result = pthread_mutex_unlock(mutex);
if (result != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/**
* @brief Declare the semaphore container, initialize the semaphore, and
* create semaphore ID.
* @param semaphore: pointer to the created semaphore ID.
* @param initValue: initial value of semaphore.
* @return an enum that represents a status of PSDK
*/
T_PsdkReturnCode Osal_SemaphoreCreate(T_PsdkSemHandle *semaphore, uint32_t initValue)
{
int result;
*semaphore = malloc(sizeof(sem_t));
if (*semaphore == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_MEMORY_ALLOC_FAILED;
}
result = sem_init(*semaphore, 0, (unsigned int) initValue);
if (result != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/**
* @brief Delete the created semaphore.
* @param semaphore: pointer to the created semaphore ID.
* @return an enum that represents a status of PSDK
*/
T_PsdkReturnCode Osal_SemaphoreDestroy(T_PsdkSemHandle semaphore)
{
int result;
result = sem_destroy((sem_t *) semaphore);
if (result != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
free(semaphore);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/**
* @brief Wait the semaphore until token becomes available.
* @param semaphore: pointer to the created semaphore ID.
* @return an enum that represents a status of PSDK
*/
T_PsdkReturnCode Osal_SemaphoreWait(T_PsdkSemHandle semaphore)
{
int result;
result = sem_wait(semaphore);
if (result != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/**
* @brief Wait the semaphore until token becomes available.
* @param semaphore: pointer to the created semaphore ID.
* @param waitTime: timeout value of waiting semaphore, unit: millisecond.
* @return an enum that represents a status of PSDK
*/
T_PsdkReturnCode Osal_SemaphoreTimedWait(T_PsdkSemHandle semaphore, uint32_t waitTime)
{
int result;
struct timespec semaphoreWaitTime;
struct timeval systemTime;
gettimeofday(&systemTime, NULL);
systemTime.tv_usec += waitTime * 1000;
if (systemTime.tv_usec >= 1000000) {
systemTime.tv_sec += systemTime.tv_usec / 1000000;
systemTime.tv_usec %= 1000000;
}
semaphoreWaitTime.tv_sec = systemTime.tv_sec;
semaphoreWaitTime.tv_nsec = systemTime.tv_usec * 1000;
result = sem_timedwait(semaphore, &semaphoreWaitTime);
if (result != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/**
* @brief Release the semaphore token.
* @param semaphore: pointer to the created semaphore ID.
* @return an enum that represents a status of PSDK
*/
T_PsdkReturnCode Osal_SemaphorePost(T_PsdkSemHandle semaphore)
{
int result;
result = sem_post(semaphore);
if (result != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/**
* @brief Get the system time for ms.
* @return an uint32 that the time of system, uint:ms
*/
T_PsdkReturnCode Osal_GetTimeMs(uint32_t *ms)
{
struct timeval time;
gettimeofday(&time, NULL);
*ms = (time.tv_sec * 1000 + time.tv_usec / 1000);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
void *Osal_Malloc(uint32_t size)
{
return malloc(size);
}
void Osal_Free(void *ptr)
{
free(ptr);
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,77 @@
/**
********************************************************************
* @file osal.h
* @version V2.0.0
* @date 2019/8/28
* @brief This is the header file for "osal.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef OSAL_H
#define OSAL_H
/* Includes ------------------------------------------------------------------*/
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <semaphore.h>
#include <sys/time.h>
#include <unistd.h>
#include "psdk_typedef.h"
#include "psdk_platform.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode
Osal_TaskCreate(T_PsdkTaskHandle *task, void *(*taskFunc)(void *), const char *name, uint32_t stackSize, void *arg);
T_PsdkReturnCode Osal_TaskDestroy(T_PsdkTaskHandle task);
T_PsdkReturnCode Osal_TaskSleepMs(uint32_t timeMs);
T_PsdkReturnCode Osal_MutexCreate(T_PsdkMutexHandle *mutex);
T_PsdkReturnCode Osal_MutexDestroy(T_PsdkMutexHandle mutex);
T_PsdkReturnCode Osal_MutexLock(T_PsdkMutexHandle mutex);
T_PsdkReturnCode Osal_MutexUnlock(T_PsdkMutexHandle mutex);
T_PsdkReturnCode Osal_SemaphoreCreate(T_PsdkSemHandle *semaphore, uint32_t initValue);
T_PsdkReturnCode Osal_SemaphoreDestroy(T_PsdkSemHandle semaphore);
T_PsdkReturnCode Osal_SemaphoreWait(T_PsdkSemHandle semaphore);
T_PsdkReturnCode Osal_SemaphoreTimedWait(T_PsdkSemHandle semaphore, uint32_t waitTime);
T_PsdkReturnCode Osal_SemaphorePost(T_PsdkSemHandle semaphore);
T_PsdkReturnCode Osal_GetTimeMs(uint32_t *ms);
void *Osal_Malloc(uint32_t size);
void Osal_Free(void *ptr);
#ifdef __cplusplus
}
#endif
#endif // OSAL_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,219 @@
/**
********************************************************************
* @file upgrade_platform_opt_linux.c
* @version V2.0.0
* @date 3/25/20
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "upgrade_platform_opt_linux.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <psdk_logger.h>
#include <psdk_upgrade.h>
/* Private constants ---------------------------------------------------------*/
#define PSDK_TEST_CMD_CALL_MAX_LEN (PSDK_FILE_PATH_SIZE_MAX + 256)
#define PSDK_REBOOT_STATE_FILE_NAME "reboot_state"
/* Private types -------------------------------------------------------------*/
/* Private values -------------------------------------------------------------*/
static FILE *s_upgradeProgramFile = NULL;
/* Private functions declaration ---------------------------------------------*/
static T_PsdkReturnCode PsdkTest_RunSystemCmd(char *systemCmdStr);
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode PsdkUpgradePlatformLinux_RebootSystem(void)
{
// attention: you need su permission to reboot system
return PsdkTest_RunSystemCmd("reboot -h now");
}
T_PsdkReturnCode PsdkUpgradePlatformLinux_CleanUpgradeProgramFileStoreArea(void)
{
char cmdBuffer[PSDK_TEST_CMD_CALL_MAX_LEN];
snprintf(cmdBuffer, PSDK_TEST_CMD_CALL_MAX_LEN, "rm -rf %s*", PSDK_TEST_UPGRADE_FILE_DIR);
return PsdkTest_RunSystemCmd(cmdBuffer);
}
T_PsdkReturnCode PsdkUpgradePlatformLinux_ReplaceOldProgram(void)
{
char cmdBuffer[PSDK_TEST_CMD_CALL_MAX_LEN];
snprintf(cmdBuffer, PSDK_TEST_CMD_CALL_MAX_LEN, "cp -f %s*_V*.*.*.bin %s", PSDK_TEST_UPGRADE_FILE_DIR,
PSDK_TEST_UPGRADE_OLD_FIRMWARE_PATH);
return PsdkTest_RunSystemCmd(cmdBuffer);
}
T_PsdkReturnCode PsdkUpgradePlatformLinux_SetUpgradeRebootState(const T_PsdkUpgradeEndInfo *upgradeEndInfo)
{
FILE *rebootStateFile;
size_t res;
T_PsdkReturnCode returnCode;
rebootStateFile = fopen(PSDK_REBOOT_STATE_FILE_NAME, "w+");
if (rebootStateFile == NULL) {
PsdkLogger_UserLogError("Create reboot state file error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
res = fwrite((uint8_t *) upgradeEndInfo, 1, sizeof(T_PsdkUpgradeEndInfo), rebootStateFile);
if (res != sizeof(T_PsdkUpgradeEndInfo)) {
PsdkLogger_UserLogError("Write data len is not equal");
returnCode = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
goto out;
}
returnCode = PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
out:
fclose(rebootStateFile);
return returnCode;
}
T_PsdkReturnCode PsdkUpgradePlatformLinux_GetUpgradeRebootState(bool *isUpgradeReboot,
T_PsdkUpgradeEndInfo *upgradeEndInfo)
{
FILE *rebootStateFile;
size_t res;
rebootStateFile = fopen(PSDK_REBOOT_STATE_FILE_NAME, "r");
if (rebootStateFile == NULL) {
*isUpgradeReboot = false;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
res = fread(upgradeEndInfo, 1, sizeof(T_PsdkUpgradeEndInfo), rebootStateFile);
if (res != sizeof(T_PsdkUpgradeEndInfo)) {
PsdkLogger_UserLogError("Read data len is not equal");
*isUpgradeReboot = false;
goto out;
}
*isUpgradeReboot = true;
out:
fclose(rebootStateFile);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkUpgradePlatformLinux_CleanUpgradeRebootState(void)
{
return PsdkTest_RunSystemCmd("rm -f "PSDK_REBOOT_STATE_FILE_NAME);
}
T_PsdkReturnCode PsdkUpgradePlatformLinux_CreateUpgradeProgramFile(const T_PsdkUpgradeFileInfo *fileInfo)
{
char filePath[PSDK_FILE_PATH_SIZE_MAX];
s_upgradeProgramFile = NULL;
snprintf(filePath, PSDK_FILE_PATH_SIZE_MAX, "%s%s", PSDK_TEST_UPGRADE_FILE_DIR, fileInfo->fileName);
s_upgradeProgramFile = fopen(filePath, "w+");
if (s_upgradeProgramFile == NULL) {
PsdkLogger_UserLogError("Upgrade program file can't create");
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode
PsdkUpgradePlatformLinux_WriteUpgradeProgramFile(uint32_t offset, const uint8_t *data, uint16_t dataLen)
{
size_t writeLen;
if (s_upgradeProgramFile == NULL) {
PsdkLogger_UserLogError("upgrade program file can't be NULL");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (fseek(s_upgradeProgramFile, offset, SEEK_SET) != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
writeLen = fwrite(data, 1, dataLen, s_upgradeProgramFile);
if (writeLen != dataLen) {
PsdkLogger_UserLogError("Write upgrade program file error, writeLen = %d, dataLen = %d", writeLen);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkUpgradePlatformLinux_ReadUpgradeProgramFile(uint32_t offset, uint16_t readDataLen, uint8_t *data,
uint16_t *realLen)
{
uint32_t readRtn;
if (s_upgradeProgramFile == NULL) {
PsdkLogger_UserLogError("upgrade program file can't be NULL");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (fseek(s_upgradeProgramFile, offset, SEEK_SET) != 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
readRtn = fread(data, 1, readDataLen, s_upgradeProgramFile);
if (readRtn == 0 || readRtn > readDataLen) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
*realLen = readRtn;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode PsdkUpgradePlatformLinux_CloseUpgradeProgramFile(void)
{
if (s_upgradeProgramFile == NULL) {
PsdkLogger_UserLogError("upgrade program file can't be NULL");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
fclose(s_upgradeProgramFile);
s_upgradeProgramFile = NULL;
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
static T_PsdkReturnCode PsdkTest_RunSystemCmd(char *systemCmdStr)
{
int status;
status = system(systemCmdStr);
if (status == -1 || WIFEXITED(status) == false) {
PsdkLogger_UserLogError("Call %s error, status = %d", systemCmdStr, status);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
if (WEXITSTATUS(status) == 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
} else {
PsdkLogger_UserLogError("Exit status is = %d", WEXITSTATUS(status));
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,71 @@
/**
********************************************************************
* @file upgrade_platform_opt_linux.h
* @version V2.0.0
* @date 3/25/20
* @brief This is the header file for "upgrade_platform_opt_linux.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef UPGRADE_PLATFORM_OPT_LINUX_H
#define UPGRADE_PLATFORM_OPT_LINUX_H
/* Includes ------------------------------------------------------------------*/
#include <psdk_typedef.h>
#include <psdk_upgrade.h>
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
#define PSDK_TEST_UPGRADE_OLD_FIRMWARE_PATH "/usr/local/bin/psdk_demo"
#define PSDK_TEST_UPGRADE_FILE_DIR "/upgrade/"
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode PsdkUpgradePlatformLinux_RebootSystem(void);
T_PsdkReturnCode PsdkUpgradePlatformLinux_CleanUpgradeProgramFileStoreArea(void);
T_PsdkReturnCode PsdkUpgradePlatformLinux_CreateUpgradeProgramFile(const T_PsdkUpgradeFileInfo *fileInfo);
T_PsdkReturnCode PsdkUpgradePlatformLinux_WriteUpgradeProgramFile(uint32_t offset, const uint8_t *data,
uint16_t dataLen);
T_PsdkReturnCode PsdkUpgradePlatformLinux_ReadUpgradeProgramFile(uint32_t offset, uint16_t readDataLen, uint8_t *data,
uint16_t *realLen);
T_PsdkReturnCode PsdkUpgradePlatformLinux_CloseUpgradeProgramFile(void);
T_PsdkReturnCode PsdkUpgradePlatformLinux_ReplaceOldProgram(void);
T_PsdkReturnCode PsdkUpgradePlatformLinux_SetUpgradeRebootState(const T_PsdkUpgradeEndInfo *upgradeEndInfo);
T_PsdkReturnCode PsdkUpgradePlatformLinux_GetUpgradeRebootState(bool *isUpgradeReboot,
T_PsdkUpgradeEndInfo *upgradeEndInfo);
T_PsdkReturnCode PsdkUpgradePlatformLinux_CleanUpgradeRebootState(void);
#ifdef __cplusplus
}
#endif
#endif // UPGRADE_PLATFORM_OPT_LINUX_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,38 @@
Payload SDK Linux Sample.
Test Environment:
Hardware: Manifold2-C/G
Serial: USB-to-Serial Controller CP210x
C Compiler: GCC version 5.4.0 20160609
CMake Version: Cmake version 3.5.1
IDE: CLion 2020.3.1
Communication Serial Configuration:
Baud Rate: 460800
Network Port Configuration:
IP Address: Auto Config (Need root permission)
Network Port: Auto Config
NetMask: Auto Config
Gateway: Auto Config
====== The steps to run the Payload SDK linux sample ======
Step 1 : modify related device information, such as device name of network or uart, uart baud rate.
Step 2 : fill in your app info to file with path 'sample/platform/linux/manifold2/application/app_info.h'.
This info can be obtained by logging in to the developer website https://developer.dji.com/payload-sdk.
Step 3 : build source file, use following cmd:
cd source_code_dir/project
mkdir build
cd build
cmake ..
make
Step 4 : Manifold should connect to Skyport 2.0/XPort via usb-to-serial controller and network cable, make sure the
serial pins are connected properly.
Step 5 : use the root permission to execute this program, use following cmd:
sudo ./psdk_demo
Step 6: open DJI Pilot APP/MSDK APP to use the payload demo functions.

View File

@ -0,0 +1,57 @@
/**
********************************************************************
* @file app_info.h
* @version V2.0.0
* @date 2019/07/01
* @brief This is the header file for "app_info.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef APP_INFO_H
#define APP_INFO_H
/* Includes ------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
// ATTENTION: User must goto developer.dji.com to create your own payload sdk application, get payload sdk application
// information then fill in the application information here.
#define USER_APP_NAME "your_app_name"
#define USER_APP_ID "your_app_id"
#define USER_APP_KEY "your_app_key"
#define USER_DEVELOPER_ACCOUNT "your_developer_account"
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif //APP_INFO_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,506 @@
/**
********************************************************************
* @file main.c
* @version V2.0.0
* @date 2019/07/01
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include <fcntl.h>
#include <stdio.h>
#include <time.h>
#include "errno.h"
#include <signal.h>
#include "psdk_logger.h"
#include "psdk_core.h"
#include "psdk_platform.h"
#include "osal/osal.h"
#include "utils/util_misc.h"
#include "hal/hal_uart.h"
#include "hal/hal_network.h"
#include "psdk_config.h"
#include "app_info.h"
#include "psdk_aircraft_info.h"
#include "camera_emu/test_payload_cam_emu.h"
#include "data_transmission/test_data_transmission.h"
#include "data_subscription/test_data_subscription.h"
#include "payload_collaboration/test_payload_collaboration.h"
#include "camera_media_emu/test_payload_cam_media.h"
#include "widget/test_widget.h"
#include "gimbal_emu/test_payload_gimbal_emu.h"
#include "psdk_data_channel.h"
#include "data_channel/test_data_channel.h"
#include "power_management/test_power_management.h"
#include "xport/test_xport.h"
#include "monitor/sys_monitor.h"
#include "psdk_product_info.h"
#include "mop_channel/test_mop_channel.h"
#include "upgrade/test_upgrade.h"
#include "upgrade_platform_opt/upgrade_platform_opt_linux.h"
#include <psdk_payload_camera.h>
/* Private constants ---------------------------------------------------------*/
#define PSDK_LOG_PATH "Logs/psdk_local"
#define PSDK_LOG_INDEX_FILE_NAME "Logs/latest"
#define PSDK_LOG_FOLDER_NAME "Logs"
#define PSDK_LOG_PATH_MAX_SIZE (128)
#define PSDK_LOG_FOLDER_NAME_MAX_SIZE (32)
/* Private types -------------------------------------------------------------*/
typedef struct {
pid_t tid;
char name[16];
float pcpu;
} T_ThreadAttribute;
/* Private functions declaration ---------------------------------------------*/
static T_PsdkReturnCode PsdkUser_FillInUserInfo(T_PsdkUserInfo *userInfo);
static T_PsdkReturnCode PsdkUser_Console(const uint8_t *data, uint16_t dataLen);
static T_PsdkReturnCode PsdkUser_LocalWrite(const uint8_t *data, uint16_t dataLen);
static T_PsdkReturnCode PsdkUser_FileSystemInit(const char *path);
static void *PsdkUser_MonitorTask(void *argument);
/* Exported functions definition ---------------------------------------------*/
static FILE *s_psdkLogFile;
static FILE *s_psdkLogFileCnt;
static pthread_t s_monitorThread = 0;
/* Private functions definition-----------------------------------------------*/
static T_PsdkReturnCode PsdkUser_FillInUserInfo(T_PsdkUserInfo *userInfo)
{
memset(userInfo->appName, 0, sizeof(userInfo->appName));
memset(userInfo->appId, 0, sizeof(userInfo->appId));
memset(userInfo->appKey, 0, sizeof(userInfo->appKey));
memset(userInfo->developerAccount, 0, sizeof(userInfo->developerAccount));
if (strlen(USER_APP_NAME) >= sizeof(userInfo->appName) ||
strlen(USER_APP_ID) > sizeof(userInfo->appId) ||
strlen(USER_APP_KEY) > sizeof(userInfo->appKey) ||
strlen(USER_DEVELOPER_ACCOUNT) >= sizeof(userInfo->developerAccount)) {
PsdkLogger_UserLogError("Length of user information string is beyond limit. Please check.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
if (!strcmp(USER_APP_NAME, "your_app_name") ||
!strcmp(USER_APP_ID, "your_app_id") ||
!strcmp(USER_APP_KEY, "your_app_key") ||
!strcmp(USER_DEVELOPER_ACCOUNT, "your_developer_account")) {
PsdkLogger_UserLogError("Please fill in correct user information to psdk_app_info.h file.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
strncpy(userInfo->appName, USER_APP_NAME, sizeof(userInfo->appName) - 1);
memcpy(userInfo->appId, USER_APP_ID, USER_UTIL_MIN(sizeof(userInfo->appId), strlen(USER_APP_ID)));
memcpy(userInfo->appKey, USER_APP_KEY, USER_UTIL_MIN(sizeof(userInfo->appKey), strlen(USER_APP_KEY)));
strncpy(userInfo->developerAccount, USER_DEVELOPER_ACCOUNT, sizeof(userInfo->developerAccount) - 1);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_PsdkReturnCode PsdkUser_Console(const uint8_t *data, uint16_t dataLen)
{
USER_UTIL_UNUSED(dataLen);
/*
* Warning: printf() is a blocking interface. If print speed is too low, PSDK will be blocked and many abnormal
* situations occur, such as initialization failure and payload disconnection. Users can raise corresponding
* console level to INFO or even higher to solve this problem.
*/
printf("%s", data);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
static T_PsdkReturnCode PsdkUser_LocalWrite(const uint8_t *data, uint16_t dataLen)
{
int32_t realLen;
if (s_psdkLogFile == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
realLen = fwrite(data, 1, dataLen, s_psdkLogFile);
fflush(s_psdkLogFile);
if (realLen == dataLen) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
} else {
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
}
static T_PsdkReturnCode PsdkUser_FileSystemInit(const char *path)
{
T_PsdkReturnCode psdkStat = PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
char filePath[PSDK_LOG_PATH_MAX_SIZE];
char folderName[PSDK_LOG_FOLDER_NAME_MAX_SIZE];
time_t currentTime = time(NULL);
struct tm *localTime = localtime(&currentTime);
uint16_t logFileIndex = 0;
uint16_t currentLogFileIndex = 0;
uint8_t ret = 0;
if (localTime == NULL) {
printf("Get local time error.\r\n");
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
if (access(PSDK_LOG_FOLDER_NAME, F_OK) != 0) {
printf("Log file is not existed, need create new.\r\n");
sprintf(folderName, "mkdir %s", PSDK_LOG_FOLDER_NAME);
ret = system(folderName);
if (ret != 0) {
printf("Create new log folder error, ret:%d.\r\n", ret);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
}
s_psdkLogFileCnt = fopen(PSDK_LOG_INDEX_FILE_NAME, "rb+");
if (s_psdkLogFileCnt == NULL) {
s_psdkLogFileCnt = fopen(PSDK_LOG_INDEX_FILE_NAME, "wb+");
if (s_psdkLogFileCnt == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
} else {
ret = fseek(s_psdkLogFileCnt, 0, SEEK_SET);
if (ret != 0) {
printf("Seek log count file error, ret: %d, errno: %d.\r\n", ret, errno);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
ret = fread((uint16_t *) &logFileIndex, 1, sizeof(uint16_t), s_psdkLogFileCnt);
if (ret != sizeof(uint16_t)) {
printf("Read log file index error.\r\n");
}
}
printf("Get current log index: %d\r\n", logFileIndex);
currentLogFileIndex = logFileIndex;
logFileIndex++;
ret = fseek(s_psdkLogFileCnt, 0, SEEK_SET);
if (ret != 0) {
printf("Seek log file error, ret: %d, errno: %d.\r\n", ret, errno);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
ret = fwrite((uint16_t *) &logFileIndex, 1, sizeof(uint16_t), s_psdkLogFileCnt);
if (ret != sizeof(uint16_t)) {
printf("Write log file index error.\r\n");
fclose(s_psdkLogFileCnt);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
fclose(s_psdkLogFileCnt);
sprintf(filePath, "%s_%04d_%04d%02d%02d_%02d-%02d-%02d.log", path, currentLogFileIndex,
localTime->tm_year + 1900, localTime->tm_mon + 1, localTime->tm_mday,
localTime->tm_hour, localTime->tm_min, localTime->tm_sec);
s_psdkLogFile = fopen(filePath, "wb+");
if (s_psdkLogFile == NULL) {
PsdkLogger_UserLogWarn("Open filepath time error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return psdkStat;
}
static void PsdkUser_NormalExitHandler(int signalNum)
{
USER_UTIL_UNUSED(signalNum);
exit(0);
}
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
static void *PsdkUser_MonitorTask(void *argument)
{
unsigned int i = 0;
unsigned int threadCount = 0;
pid_t *tidList = NULL;
T_ThreadAttribute *threadAttribute = NULL;
USER_UTIL_UNUSED(argument);
while (1) {
threadCount = Monitor_GetThreadCountOfProcess(getpid());
tidList = PsdkOsal_Malloc(threadCount * sizeof(pid_t));
if (tidList == NULL) {
PsdkLogger_UserLogError("malloc fail.");
goto delay;
}
Monitor_GetTidListOfProcess(getpid(), tidList, threadCount);
threadAttribute = PsdkOsal_Malloc(threadCount * sizeof(T_ThreadAttribute));
if (threadAttribute == NULL) {
PsdkLogger_UserLogError("malloc fail.");
goto freeTidList;
}
for (i = 0; i < threadCount; ++i) {
threadAttribute[i].tid = tidList[i];
}
PsdkLogger_UserLogDebug("thread pcpu:");
PsdkLogger_UserLogDebug("tid\tname\tpcpu");
for (i = 0; i < threadCount; ++i) {
threadAttribute[i].pcpu = Monitor_GetPcpuOfThread(getpid(), tidList[i]);
Monitor_GetNameOfThread(getpid(), tidList[i], threadAttribute[i].name, sizeof(threadAttribute[i].name));
PsdkLogger_UserLogDebug("%d\t%15s\t%f %%.", threadAttribute[i].tid, threadAttribute[i].name,
threadAttribute[i].pcpu);
}
PsdkLogger_UserLogDebug("heap used: %d B.", Monitor_GetHeapUsed(getpid()));
PsdkLogger_UserLogDebug("stack used: %d B.", Monitor_GetStackUsed(getpid()));
PsdkOsal_Free(threadAttribute);
freeTidList:
PsdkOsal_Free(tidList);
delay:
sleep(10);
}
}
#pragma GCC diagnostic pop
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wmissing-noreturn"
#pragma GCC diagnostic ignored "-Wreturn-type"
int main(void)
{
T_PsdkUserInfo userInfo;
const T_PsdkDataChannelBandwidthProportionOfHighspeedChannel bandwidthProportionOfHighspeedChannel =
{10, 60, 30};
T_PsdkLoggerConsole printConsole = {
.consoleLevel = PSDK_LOGGER_CONSOLE_LOG_LEVEL_INFO,
.func = PsdkUser_Console,
};
T_PsdkLoggerConsole localRecordConsole = {
.consoleLevel = PSDK_LOGGER_CONSOLE_LOG_LEVEL_INFO,
.func = PsdkUser_LocalWrite,
};
T_PsdkHalUartHandler halUartHandler = {
.UartInit = Hal_UartInit,
.UartReadData = Hal_UartReadData,
.UartWriteData = Hal_UartSendData,
};
T_PsdkHalNetWorkHandler halNetWorkHandler = {
.NetWorkConfig = HalNetWork_Config,
};
T_PsdkOsalHandler osalHandler = {
.Malloc = Osal_Malloc,
.Free = Osal_Free,
.TaskCreate = Osal_TaskCreate,
.TaskDestroy = Osal_TaskDestroy,
.TaskSleepMs = Osal_TaskSleepMs,
.MutexCreate = Osal_MutexCreate,
.MutexDestroy = Osal_MutexDestroy,
.MutexLock = Osal_MutexLock,
.MutexUnlock = Osal_MutexUnlock,
.SemaphoreCreate = Osal_SemaphoreCreate,
.SemaphoreDestroy = Osal_SemaphoreDestroy,
.SemaphoreWait = Osal_SemaphoreWait,
.SemaphorePost = Osal_SemaphorePost,
.SemaphoreTimedWait = Osal_SemaphoreTimedWait,
.GetTimeMs = Osal_GetTimeMs,
};
T_PsdkAircraftInfoBaseInfo aircraftBaseInfo = {0};
if (PsdkPlatform_RegHalUartHandler(&halUartHandler) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
printf("psdk register hal uart handler error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (PsdkPlatform_RegHalNetworkHandler(&halNetWorkHandler) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
printf("psdk register hal network handler error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (PsdkPlatform_RegOsalHandler(&osalHandler) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
printf("psdk register osal handler error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (PsdkLogger_AddConsole(&printConsole) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
printf("psdk add console print error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (PsdkUser_FileSystemInit(PSDK_LOG_PATH) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
printf("psdk file system init error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (PsdkLogger_AddConsole(&localRecordConsole) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
printf("psdk add console record error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (PsdkUser_FillInUserInfo(&userInfo) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
printf("psdk fill in user info error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (PsdkCore_Init(&userInfo) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("psdk instance init error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (PsdkProductInfo_SetAlias("PSDK_APPALIAS") != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("set product alias error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
if (PsdkAircraftInfo_GetBaseInfo(&aircraftBaseInfo) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("get aircraft information error.");
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
#ifdef PSDK_USING_POWER_MANAGEMENT
if (PsdkTest_PowerManagementInit() != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("power management init error");
}
#endif
#ifdef PSDK_USING_CAMERA_EMU
if (PsdkTest_CameraInit() != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("psdk camera init error");
}
#endif
#ifdef PSDK_USING_CAMERA_MEDIA_EMU
#if PSDK_ARCH_SYS_LINUX
if (PsdkTest_CameraMediaInit() != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("psdk camera media init error");
}
#endif
#endif
#ifdef PSDK_USING_DATA_TRANSMISSION
if (PsdkTest_DataTransmissionInit() != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("psdk data transmission init error");
}
#endif
#ifdef PSDK_USING_DATA_CHANNEL
if (PsdkTest_DataChannelSetBandwidthProportionForHighspeedChannel(
bandwidthProportionOfHighspeedChannel) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("set bandwidth distribution for high-speed channel error");
}
#endif
#ifdef PSDK_USING_DATA_SUBSCRIPTION
if (PsdkTest_DataSubscriptionInit() != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("psdk data subscription init error");
}
#endif
#ifdef PSDK_USING_PAYLOAD_COLLABORATION
if (((aircraftBaseInfo.aircraftType == PSDK_AIRCRAFT_INFO_TYPE_M200_V2 ||
aircraftBaseInfo.aircraftType == PSDK_AIRCRAFT_INFO_TYPE_M210_V2 ||
aircraftBaseInfo.aircraftType == PSDK_AIRCRAFT_INFO_TYPE_M210RTK_V2) &&
aircraftBaseInfo.payloadMountPosition == PSDK_AIRCRAFT_INFO_PAYLOAD_MOUNT_POSITION_NO2) ||
aircraftBaseInfo.aircraftType == PSDK_AIRCRAFT_INFO_TYPE_M300_RTK) {
if (PsdkTest_PayloadCollaborationInit() != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("psdk payload collaboration init error");
}
}
#endif
#ifdef PSDK_USING_WIDGET
if (PsdkTest_WidgetInit() != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("psdk widget init error");
}
#endif
#ifdef PSDK_USING_GIMBAL_EMU
if (aircraftBaseInfo.psdkAdapterType == PSDK_AIRCRAFT_INFO_PSDK_ADAPTER_TYPE_SKYPORT_V2) {
if (PsdkTest_GimbalInit() != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("psdk gimbal init error");
}
}
#endif
#ifdef PSDK_USING_XPORT
if (aircraftBaseInfo.psdkAdapterType == PSDK_AIRCRAFT_INFO_PSDK_ADAPTER_TYPE_XPORT) {
if (PsdkTest_XPortInit() != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("psdk XPort init error");
}
}
#endif
#ifdef PSDK_USING_UPGRADE
T_PsdkTestUpgradePlatformOpt linuxUpgradePlatformOpt = {
.rebootSystem = PsdkUpgradePlatformLinux_RebootSystem,
.cleanUpgradeProgramFileStoreArea = PsdkUpgradePlatformLinux_CleanUpgradeProgramFileStoreArea,
.createUpgradeProgramFile = PsdkUpgradePlatformLinux_CreateUpgradeProgramFile,
.writeUpgradeProgramFile = PsdkUpgradePlatformLinux_WriteUpgradeProgramFile,
.readUpgradeProgramFile = PsdkUpgradePlatformLinux_ReadUpgradeProgramFile,
.closeUpgradeProgramFile = PsdkUpgradePlatformLinux_CloseUpgradeProgramFile,
.replaceOldProgram = PsdkUpgradePlatformLinux_ReplaceOldProgram,
.setUpgradeRebootState = PsdkUpgradePlatformLinux_SetUpgradeRebootState,
.getUpgradeRebootState = PsdkUpgradePlatformLinux_GetUpgradeRebootState,
.cleanUpgradeRebootState = PsdkUpgradePlatformLinux_CleanUpgradeRebootState,
};
if (PsdkTest_UpgradeInit(&linuxUpgradePlatformOpt) != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("psdk upgrade init error");
}
#endif
#ifdef PSDK_USING_MOP_CHANNEL
if (PsdkTest_MopChannelInit() != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("psdk mop channel init error");
}
#endif
if (pthread_create(&s_monitorThread, NULL, PsdkUser_MonitorTask, NULL) != 0) {
PsdkLogger_UserLogError("create monitor task fail.");
}
if (pthread_setname_np(s_monitorThread, "monitor task") != 0) {
PsdkLogger_UserLogError("set name for monitor task fail.");
}
if (PsdkCore_ApplicationStart() != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("psdk application start error");
}
signal(SIGTERM, PsdkUser_NormalExitHandler);
while (1) {
sleep(1);
}
}
#pragma GCC diagnostic pop
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,75 @@
/**
********************************************************************
* @file psdk_config.h
* @version V2.0.0
* @date 2019/9/11
* @brief This is the header file for "psdk_config.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef PSDK_CONFIG_H
#define PSDK_CONFIG_H
/* Includes ------------------------------------------------------------------*/
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
#define PSDK_USING_POWER_MANAGEMENT
#define PSDK_USING_CAMERA_EMU
#define PSDK_USING_CAMERA_MEDIA_EMU
#define PSDK_USING_DATA_TRANSMISSION
#define PSDK_USING_DATA_CHANNEL
#define PSDK_USING_DATA_SUBSCRIPTION
#define PSDK_USING_PAYLOAD_COLLABORATION
#define PSDK_USING_WIDGET
#define PSDK_USING_GIMBAL_EMU
#define PSDK_USING_XPORT
#define PSDK_USING_UPGRADE
/*!< Attention: This function needs to be used together with OSDK/MSDK mop sample.
* */
//#define PSDK_USING_MOP_CHANNEL
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
#ifdef __cplusplus
}
#endif
#endif // PSDK_CONFIG_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,90 @@
/**
********************************************************************
* @file hal_network.c
* @version V2.0.0
* @date 3/27/20
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "string.h"
#include "stdlib.h"
#include "stdio.h"
#include "hal_network.h"
#include "psdk_logger.h"
/* Private constants ---------------------------------------------------------*/
#define LINUX_NETWORK_DEV "enp0s31f6"
#define LINUX_CMD_STR_MAX_SIZE (128)
/* Private types -------------------------------------------------------------*/
/* Private values -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode HalNetWork_Config(const char *ipAddr, const char *netMask)
{
int32_t ret;
char cmdStr[LINUX_CMD_STR_MAX_SIZE];
if (ipAddr == NULL || netMask == NULL) {
PsdkLogger_UserLogError("hal network config param error");
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
//Attention: need root permission to config ip addr and netmask.
memset(cmdStr, 0, sizeof(cmdStr));
snprintf(cmdStr, sizeof(cmdStr), "ifconfig | grep %s", LINUX_NETWORK_DEV);
ret = system(cmdStr);
if (ret != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Can't find the network device. "
"Probably the name of network device is not match or device is not properly initialized. "
"Please check the name or status of network device. ");
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
snprintf(cmdStr, sizeof(cmdStr), "ifconfig %s up", LINUX_NETWORK_DEV);
ret = system(cmdStr);
if (ret != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Can't open the network. "
"Probably the program not execute with root permission. "
"Please use the root permission to execute the program. ");
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
snprintf(cmdStr, sizeof(cmdStr), "ifconfig %s %s netmask %s", LINUX_NETWORK_DEV, ipAddr, netMask);
ret = system(cmdStr);
if (ret != PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS) {
PsdkLogger_UserLogError("Can't config the ip address of network. "
"Probably the program not execute with root permission. "
"Please use the root permission to execute the program. ");
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
/* Private functions definition-----------------------------------------------*/
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,52 @@
/**
********************************************************************
* @file hal_network.h
* @version V2.0.0
* @date 3/27/20
* @brief This is the header file for "hal_network.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef HAL_NETWORK_H
#define HAL_NETWORK_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode HalNetWork_Config(const char *ipAddr, const char *netMask);
#ifdef __cplusplus
}
#endif
#endif // HAL_NETWORK_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,139 @@
/**
********************************************************************
* @file psdk_hal.c
* @version V2.0.0
* @date 2019/07/01
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "hal_uart.h"
/* Private constants ---------------------------------------------------------*/
#define LINUX_UART_DEV "/dev/ttyUSB0"
/* Private types -------------------------------------------------------------*/
static int s_psdkUartFd = -1;
/* Private functions declaration ---------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
T_PsdkReturnCode Hal_UartInit(void)
{
struct termios options;
struct flock lock;
T_PsdkReturnCode returnCode = PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
s_psdkUartFd = open(LINUX_UART_DEV, O_RDWR | O_NOCTTY | O_NDELAY);
if (s_psdkUartFd == -1) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
// Forbid multiple psdk programs to access the serial port
lock.l_type = F_WRLCK;
lock.l_pid = getpid();
lock.l_whence = SEEK_SET;
lock.l_start = 0;
lock.l_len = 0;
if (fcntl(s_psdkUartFd, F_GETLK, &lock) < 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
if (lock.l_type != F_UNLCK) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
lock.l_type = F_WRLCK;
lock.l_pid = getpid();
lock.l_whence = SEEK_SET;
lock.l_start = 0;
lock.l_len = 0;
if (fcntl(s_psdkUartFd, F_SETLKW, &lock) < 0) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
if (tcgetattr(s_psdkUartFd, &options) != 0) {
close(s_psdkUartFd);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
cfsetispeed(&options, B460800);
cfsetospeed(&options, B460800);
options.c_cflag |= CLOCAL;
options.c_cflag |= CREAD;
options.c_cflag &= ~CRTSCTS;
options.c_cflag &= ~CSIZE;
options.c_cflag |= CS8;
options.c_cflag &= ~PARENB;
options.c_iflag &= ~INPCK;
options.c_cflag &= ~CSTOPB;
options.c_oflag &= ~OPOST;
options.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG);
options.c_iflag &= ~(BRKINT | ICRNL | INPCK | ISTRIP | IXON);
options.c_cc[VTIME] = 0;
options.c_cc[VMIN] = 0;
tcflush(s_psdkUartFd, TCIFLUSH);
if (tcsetattr(s_psdkUartFd, TCSANOW, &options) != 0) {
close(s_psdkUartFd);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return returnCode;
}
T_PsdkReturnCode Hal_UartSendData(const uint8_t *pBuf, uint16_t bufLen)
{
int32_t realLen;
if (s_psdkUartFd == -1) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
realLen = write(s_psdkUartFd, pBuf, bufLen);
if (realLen == bufLen) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
} else {
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
}
T_PsdkReturnCode Hal_UartReadData(uint8_t *pBuf, uint16_t bufLen, uint16_t *realBufLen)
{
int result;
T_PsdkReturnCode returnCode;
result = read(s_psdkUartFd, pBuf, bufLen);
if (result >= 0) {
*realBufLen = result;
returnCode = PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
} else {
*realBufLen = 0;
returnCode = PSDK_ERROR_SYSTEM_MODULE_CODE_SYSTEM_ERROR;
}
return returnCode;
}
/* Private functions definition-----------------------------------------------*/
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,62 @@
/**
********************************************************************
* @file hal.h
* @version V2.0.0
* @date 2019/8/28
* @brief This is the header file for "hal.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef HAL_H
#define HAL_H
/* Includes ------------------------------------------------------------------*/
#include "stdint.h"
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <termios.h>
#include <unistd.h>
#include <string.h>
#include "psdk_platform.h"
#include "psdk_typedef.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode Hal_UartInit(void);
T_PsdkReturnCode Hal_UartSendData(const uint8_t *pBuf, uint16_t bufLen);
T_PsdkReturnCode Hal_UartReadData(uint8_t *pBuf, uint16_t bufLen, uint16_t *realBufLen);
#ifdef __cplusplus
}
#endif
#endif // HAL_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

View File

@ -0,0 +1,58 @@
cmake_minimum_required(VERSION 2.8)
project(psdk_demo C)
### Set toolchain flags
set(CMAKE_C_FLAGS "-D_REENTRANT -std=gnu99")
set(CMAKE_EXE_LINKER_FLAGS "-pthread -lpthread")
set(CMAKE_C_COMPILER "gcc")
set(CMAKE_CXX_COMPILER "g++")
set(PSDK_ARCH_SYS linux)
include_directories(..)
include_directories(../../common)
include_directories(../../../../api_sample)
include_directories(${CMAKE_CURRENT_LIST_DIR}/../../../../../psdk_lib/api_headers)
## Srcs
file(GLOB_RECURSE APP_SRC ../../manifold2/application/*.c
../../manifold2/hal/*.c)
file(GLOB_RECURSE COMMON_SRC ../../common/*.c)
file(GLOB_RECURSE SAMPLE_SRC ../../../../api_sample/*.c)
## "uname -m" to auto distinguish Manifold2-G or Manifold2-C
execute_process(COMMAND uname -m
OUTPUT_VARIABLE DEVICE_SYSTEM_ID)
if (NOT PSDK_ARCH_SYS)
message(FATAL_ERROR
"to use psdk inc src cmake ,
you must set <PSDK_ARCH_SYS> value to indicate your system arch!
This value can be linux, baremetal or rtos_xxxx (xxxx is the specific name of rtos."
)
endif ()
string(TOUPPER ${PSDK_ARCH_SYS} PSDK_ARCH_SYS_DEF)
add_definitions(-DPSDK_ARCH_SYS_${PSDK_ARCH_SYS_DEF}=1)
add_definitions(-D_GNU_SOURCE)
## Include directories and library
if (DEVICE_SYSTEM_ID MATCHES x86_64)
link_directories(${CMAKE_CURRENT_LIST_DIR}/../../../../../psdk_lib/lib/x86_64-linux-gnu-gcc)
link_libraries(${CMAKE_CURRENT_LIST_DIR}/../../../../../psdk_lib/lib/x86_64-linux-gnu-gcc/libpayloadsdk.a)
elseif (DEVICE_SYSTEM_ID MATCHES aarch64)
link_directories(${CMAKE_CURRENT_LIST_DIR}/../../../../../psdk_lib/lib/aarch64-linux-gnu-gcc)
link_libraries(${CMAKE_CURRENT_LIST_DIR}/../../../../../psdk_lib/lib/aarch64-linux-gnu-gcc/libpayloadsdk.a)
endif ()
## Outputs
add_executable(${CMAKE_PROJECT_NAME}
${APP_SRC}
${COMMON_SRC}
${SAMPLE_SRC}
)
target_link_libraries(${CMAKE_PROJECT_NAME} m)

View File

@ -0,0 +1,207 @@
/**
********************************************************************
* @file osal.c
* @version V2.0.0
* @date 2019/08/30
* @brief
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Includes ------------------------------------------------------------------*/
#include "limits.h"
#include "osal/osal.h"
#include "utils/util_misc.h"
#include "FreeRTOS.h"
#include "task.h"
#include "semphr.h"
/* Private constants ---------------------------------------------------------*/
#define SEM_MUTEX_WAIT_FOREVER 0xFFFFFFFF
#define TASK_PRIORITY_NORMAL 0
/* Private types -------------------------------------------------------------*/
/* Private functions declaration ---------------------------------------------*/
/* Exported functions definition ---------------------------------------------*/
/* Private functions definition-----------------------------------------------*/
T_PsdkReturnCode
Osal_TaskCreate(T_PsdkTaskHandle *task, void *(*taskFunc)(void *), const char *name, uint32_t stackSize, void *arg)
{
uint32_t stackDepth;
char nameDealed[16] = {0};
//attention : freertos use stack depth param, stack size = (stack depth) * sizeof(StackType_t)
if (stackSize % sizeof(StackType_t) == 0) {
stackDepth = stackSize / sizeof(StackType_t);
} else {
stackDepth = stackSize / sizeof(StackType_t) + 1;
}
if (name != NULL)
strncpy(nameDealed, name, sizeof(nameDealed) - 1);
if (xTaskCreate((TaskFunction_t) taskFunc, nameDealed, stackDepth, arg, TASK_PRIORITY_NORMAL, task) != pdPASS) {
*task = NULL;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_TaskDestroy(T_PsdkTaskHandle task)
{
vTaskDelete(task);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_TaskSleepMs(uint32_t timeMs)
{
TickType_t ticks;
ticks = timeMs / portTICK_PERIOD_MS;
/* Minimum delay = 1 tick */
vTaskDelay(ticks ? ticks : 1);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_MutexCreate(T_PsdkMutexHandle *mutex)
{
*mutex = xSemaphoreCreateMutex();
if (*mutex == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_MutexDestroy(T_PsdkMutexHandle mutex)
{
vQueueDelete((SemaphoreHandle_t) mutex);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_MutexLock(T_PsdkMutexHandle mutex)
{
TickType_t ticks;
if (mutex == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
ticks = portMAX_DELAY;
if (xSemaphoreTake(mutex, ticks) != pdTRUE) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_MutexUnlock(T_PsdkMutexHandle mutex)
{
if (xSemaphoreGive(mutex) != pdTRUE) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_SemaphoreCreate(T_PsdkSemHandle *semaphore, uint32_t initValue)
{
uint32_t maxCount = UINT_MAX;
*semaphore = xSemaphoreCreateCounting(maxCount, initValue);
if (*semaphore == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_SemaphoreDestroy(T_PsdkSemHandle semaphore)
{
vSemaphoreDelete(semaphore);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_SemaphoreWait(T_PsdkSemHandle semaphore)
{
Osal_SemaphoreTimedWait(semaphore, SEM_MUTEX_WAIT_FOREVER);
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_SemaphoreTimedWait(T_PsdkSemHandle semaphore, uint32_t waitTimeMs)
{
TickType_t ticks;
if (semaphore == NULL) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_INVALID_PARAMETER;
}
ticks = 0;
if (waitTimeMs == SEM_MUTEX_WAIT_FOREVER) {
ticks = portMAX_DELAY;
} else if (waitTimeMs != 0) {
ticks = waitTimeMs / portTICK_PERIOD_MS;
if (ticks == 0) {
ticks = 1;
}
}
if (xSemaphoreTake(semaphore, ticks) != pdTRUE) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_SemaphorePost(T_PsdkSemHandle semaphore)
{
if (xSemaphoreGive(semaphore) != pdTRUE) {
return PSDK_ERROR_SYSTEM_MODULE_CODE_UNKNOWN;
}
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
T_PsdkReturnCode Osal_GetTimeMs(uint32_t *ms)
{
*ms = xTaskGetTickCount();
return PSDK_ERROR_SYSTEM_MODULE_CODE_SUCCESS;
}
void *Osal_Malloc(uint32_t size)
{
return pvPortMalloc(size);
}
void Osal_Free(void *ptr)
{
vPortFree(ptr);
}
/****************** (C) COPYRIGHT DJI Innovations *****END OF FILE****/

View File

@ -0,0 +1,70 @@
/**
********************************************************************
* @file osal.h
* @version V2.0.0
* @date 2019/8/28
* @brief This is the header file for "osal.c", defining the structure and
* (exported) function prototypes.
*
* @copyright (c) 2018-2019 DJI. All rights reserved.
*
* All information contained herein is, and remains, the property of DJI.
* The intellectual and technical concepts contained herein are proprietary
* to DJI and may be covered by U.S. and foreign patents, patents in process,
* and protected by trade secret or copyright law. Dissemination of this
* information, including but not limited to data and other proprietary
* material(s) incorporated within the information, in any form, is strictly
* prohibited without the express written consent of DJI.
*
* If you receive this source code without DJIs authorization, you may not
* further disseminate the information, and you must immediately remove the
* source code and notify DJI of its removal. DJI reserves the right to pursue
* legal actions against you for any loss(es) or damage(s) caused by your
* failure to do so.
*
*********************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef OSAL_H
#define OSAL_H
/* Includes ------------------------------------------------------------------*/
#include "psdk_typedef.h"
#include "psdk_platform.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Exported constants --------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Exported functions --------------------------------------------------------*/
T_PsdkReturnCode
Osal_TaskCreate(T_PsdkTaskHandle *task, void *(*taskFunc)(void *), const char *name, uint32_t stackSize, void *arg);
T_PsdkReturnCode Osal_TaskDestroy(T_PsdkTaskHandle task);
T_PsdkReturnCode Osal_TaskSleepMs(uint32_t timeMs);
T_PsdkReturnCode Osal_MutexCreate(T_PsdkMutexHandle *mutex);
T_PsdkReturnCode Osal_MutexDestroy(T_PsdkMutexHandle mutex);
T_PsdkReturnCode Osal_MutexLock(T_PsdkMutexHandle mutex);
T_PsdkReturnCode Osal_MutexUnlock(T_PsdkMutexHandle mutex);
T_PsdkReturnCode Osal_SemaphoreCreate(T_PsdkSemHandle *semaphore, uint32_t initValue);
T_PsdkReturnCode Osal_SemaphoreDestroy(T_PsdkSemHandle semaphore);
T_PsdkReturnCode Osal_SemaphoreWait(T_PsdkSemHandle semaphore);
T_PsdkReturnCode Osal_SemaphoreTimedWait(T_PsdkSemHandle semaphore, uint32_t waitTime);
T_PsdkReturnCode Osal_SemaphorePost(T_PsdkSemHandle semaphore);
T_PsdkReturnCode Osal_GetTimeMs(uint32_t *ms);
void *Osal_Malloc(uint32_t size);
void Osal_Free(void *ptr);
#ifdef __cplusplus
}
#endif
#endif // OSAL_H
/************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/

Some files were not shown because too many files have changed in this diff Show More