29 #ifndef ONBOARDSDK_DJI_PERCEPTION_IMPL_H 30 #define ONBOARDSDK_DJI_PERCEPTION_IMPL_H 35 #include "dji_linker.hpp" 43 class PerceptionImpl {
45 PerceptionImpl(Vehicle *vehiclePtr);
50 typedef struct PerceptionImageHandler {
51 Perception::PerceptionImageCB cb;
53 } PerceptionImageHandler;
55 typedef struct PerceptionCamParamHandler {
56 Perception::PerceptionCamParamCB cb;
58 } PerceptionCamParamHandler;
60 static E_OsdkStat cameraImageHandler(
struct _CommandHandle *cmdHandle,
61 const T_CmdInfo *cmdInfo,
const uint8_t *cmdData,
void *userData);
63 static E_OsdkStat cameraParamHandler(
struct _CommandHandle *cmdHandle,
64 const T_CmdInfo *cmdInfo,
const uint8_t *cmdData,
void *userData);
66 E_OsdkStat subscribePerceptionImage(
const char camChoice[11]);
68 E_OsdkStat subscribePerceptionImage(Perception::CamPositionType camChoice);
70 E_OsdkStat subscribePerceptionImage(Perception::DirectionType directionChoice);
72 E_OsdkStat unsubscribePerceptionImage(
const char camChoice[11]);
74 E_OsdkStat unsubscribePerceptionImage(Perception::CamPositionType camChoice);
76 E_OsdkStat unsubscribePerceptionImage(Perception::DirectionType directionChoice);
78 E_OsdkStat subscribeCameraParam();
80 void cancelAllSubsciptions();
82 vector<Perception::DirectionType> getUpdatingDiretcion();
84 static PerceptionImageHandler imageHandler;
85 static PerceptionCamParamHandler camParamHandler;
87 static const char rectifyDownLeft[11];
88 static const char rectifyDownRight[11];
89 static const char rectifyFrontLeft[11];
90 static const char rectifyFrontRight[11];
91 static const char rectifyRearLeft[11];
92 static const char rectifyRearRight[11];
93 static const char rectifyUpLeft[11];
94 static const char rectifyUpRight[11];
95 static const char rectifyLeftLeft[11];
96 static const char rectifyLeftRight[11];
97 static const char rectifyRightLeft[11];
98 static const char rectifyRightRight[11];
102 static uint32_t imageUpdateSysMs[IMAGE_MAX_DIRECTION_NUM];
103 static uint32_t updateJudgingInMs;
104 string getSubscribeString(Perception::CamPositionType camChoice);
109 #endif //ONBOARDSDK_DJI_PERCEPTION_IMPL_H Camera dji perception API of OSDK.
Definition: dji_ack.cpp:38
Vehicle API for DJI onboardSDK library.