DJI Payload SDK  1.5.3
psdk_upper.h
Go to the documentation of this file.
1 /**
2  ********************************************************************
3  * @file psdk_upper.h
4  * @version V1.5.0
5  * @date 2019/07/31
6  * @brief This is the header file for "psdk_upper.c", defining the
7  * structures and (exported) function prototypes.
8  *
9  * @copyright (c) 2017-2018 DJI. All rights reserved.
10  *
11  * All information contained herein is, and remains, the property of DJI.
12  * The intellectual and technical concepts contained herein are proprietary
13  * to DJI and may be covered by U.S. and foreign patents, patents in process,
14  * and protected by trade secret or copyright law. Dissemination of this
15  * information, including but not limited to data and other proprietary
16  * material(s) incorporated within the information, in any form, is strictly
17  * prohibited without the express written consent of DJI.
18  *
19  * If you receive this source code without DJI’s authorization, you may not
20  * further disseminate the information, and you must immediately remove the
21  * source code and notify DJI of its removal. DJI reserves the right to pursue
22  * legal actions against you for any loss(es) or damage(s) caused by your
23  * failure to do so.
24  *
25  *********************************************************************
26  */
27 
28 /* Define to prevent recursive inclusion -------------------------------------*/
29 #ifndef PSDK_UPPER_H
30 #define PSDK_UPPER_H
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 /* Includes ------------------------------------------------------------------*/
37 #include <psdk_core.h>
38 
39 /** @addtogroup PSDK
40  * @{
41  */
42 
43 /** @addtogroup PSDK_Upper
44  * @{
45  */
46 
47 /* Exported constants --------------------------------------------------------*/
48 
49 /** @defgroup Upper_Exported_Constants Exported Constants
50  * @{
51  */
52 
53 /** @defgroup CAN_ID CAN ID
54  * @note Please unauthorized modify CAN ID.
55  * @{
56  */
57 
58 #define PSDK_CAN_ID_SEND 0x0021 /*!< CAN ID used to send data. */
59 #define PSDK_CAN_ID_RECEIVE 0x0012 /*!< CAN ID used to receive data. */
60 
61 /**
62  * @}
63  */
64 
65 /**
66  * @}
67  */
68 
69 /* Exported macros -----------------------------------------------------------*/
70 /* Exported types ------------------------------------------------------------*/
71 
72 /** @defgroup Upper_Exported_Types Exported Types
73  * @{
74  */
75 
76 /**
77  * @brief This is the set of ID information of your application with PSDK.
78  */
79 typedef struct {
80  char APP_Name[33]; /*!< Specifies Payload SDK APP name. */
81  char APP_Id[17]; /*!< Specifies Payload SDK APP ID. */
82  char APP_Key[33]; /*!< Specifies Payload SDK APP key. */
83  char DeveloperAccount[65]; /*!< Specifies developer account email. */
85 
86 /**
87  * @brief This structure is used to store a fixed SkyPort FW version for your application.
88  * @details See Upper_Exported_Functions::PsdkUpper_SetFixVersion for more details on usage.
89  */
90 typedef struct {
91  uint8_t verMajor;
92  uint8_t verMinor;
93  uint8_t verModify;
94  uint8_t verDebug;
96 
97 /**
98  * @brief This structure is used for obtaining the alias of your product name.
99  * Used for defining more descriptive names for your product.
100  */
101 typedef struct {
102  char ProductAlias[33]; /*!< Specifies Payload SDK APP alias. */
104 
105 /**
106  * @brief This is a structure type for defining a top-level structure for the
107  * integration of your application with PSDK.
108  * @details This structure type is used to instantiates an object for all the
109  * features that PSDK is capable of supporting.
110  * Use this structure type to define a PSDK object in your code and you will
111  * have access to the entire DJI PSDK API.
112  */
113 typedef struct {
114  T_PsdkProt protHandle;
115 } T_PsdkUpper;
116 
117 /**
118  * @}
119  */
120 
121 /* Exported variables --------------------------------------------------------*/
122 /* Exported functions --------------------------------------------------------*/
123 
124 /** @defgroup Upper_Exported_Functions Exported Functions
125  * @{
126  */
127 
128 E_PsdkStat PsdkUpper_Init(T_PsdkUpper *psdkUpper, const T_PsdkUserInfo *userInfo);
129 E_PsdkStat PsdkUpper_SetFixVersion(const T_PsdkUserFixSkyport *fixSkyport);
130 E_PsdkStat PsdkUpper_SetProductAlias(const T_PsdkUserCustomInfo *customInfo);
131 E_PsdkStat PsdkUpper_ProcessReceiveData(T_PsdkUpper *psdkUpper, const uint8_t *pData, uint16_t len);
132 E_PsdkStat PsdkUpper_RegSendFunction(T_PsdkUpper *psdkUpper, PsdkSendCallbackFunc sendCallbackFunc);
133 E_PsdkStat PsdkUpper_RegReceiveFunction(T_PsdkUpper *psdkUpper, PsdkReceiveCallbackFunc receiveCallbackFunc);
134 
135 /**
136  * @}
137  */
138 
139 /* Private constants ---------------------------------------------------------*/
140 /* Private macros ------------------------------------------------------------*/
141 /* Private types -------------------------------------------------------------*/
142 /* Private variables ---------------------------------------------------------*/
143 /* Private functions ---------------------------------------------------------*/
144 
145 /**
146  * @}
147  */
148 
149 /**
150  * @}
151  */
152 
153 #ifdef __cplusplus
154 }
155 #endif
156 
157 #endif //PSDK_UPPER_H
158 
159 /************************ (C) COPYRIGHT DJI Innovations *******END OF FILE******/
This is a structure type for defining a top-level structure for the integration of your application w...
Definition: psdk_upper.h:113
This is the set of ID information of your application with PSDK.
Definition: psdk_upper.h:79
PSDK core include file.
This structure is used to store a fixed SkyPort FW version for your application.
Definition: psdk_upper.h:90
This structure is used for obtaining the alias of your product name. Used for defining more descripti...
Definition: psdk_upper.h:101