DJI::OSDK::DJIHMS Class Reference
DJI health manager system of drone. More...
#include <dji_hms.hpp>
Public Member Functions | |
DJIHMS (Vehicle *vehicle=0) | |
bool | subscribeHMSInf (bool enable, uint32_t timeOutMs=500) |
Send subscribe request to your flight controller to get HMS(Health Management System)'s information, blocking calls. More... | |
std::string | getHMSVersion () |
The interface of getting hms version. More... | |
HMSPushPacket | getHMSPushPacket () |
The interface of getting HMS's pushing data which has a timestamp. More... | |
uint8_t | getDeviceIndex () |
The interface of getting device(camera or gimbal) index. More... | |
Detailed Description
DJI health manager system of drone.
Member Function Documentation
◆ getDeviceIndex()
uint8_t DJIHMS::getDeviceIndex | ( | ) |
The interface of getting device(camera or gimbal) index.
- Supported Platforms : M300
- Returns
- uint8_t the private parameter deviceIndex which represents camera's or gimbal's index.
- Note
- After successful subscribing and registering, the data will be valid. if device is camera(payload) or gimbal ,the data will be valid;otherwise it will be 0xff(invalid).
◆ getHMSPushPacket()
HMSPushPacket DJIHMS::getHMSPushPacket | ( | ) |
The interface of getting HMS's pushing data which has a timestamp.
- Supported Platforms : M300
- Returns
- HMSPushPacket the private parameter hmsPushPacket which represents HMS's pushing data with a time stamp.
- Note
- The push data consists of the raw pushing data and a timestamp. After successful subscribing and registering, the data will be valid.
◆ getHMSVersion()
std::string DJIHMS::getHMSVersion | ( | ) |
The interface of getting hms version.
- Supported Platforms : M300
- Returns
- std::string hms version.(for example,HMS1.0.0)
◆ subscribeHMSInf()
bool DJIHMS::subscribeHMSInf | ( | bool | enable, |
uint32_t | timeOutMs = 500 |
||
) |
Send subscribe request to your flight controller to get HMS(Health Management System)'s information, blocking calls.
- Remarks
- Blocks until ACK frame arrives or timeout occurs
- Supported Platforms : M300
- Parameters
-
enable whether subscribe HMS Info false:reset aLL subcriber except APP true:subscribe all HMS's information timeOutMs blocking time to wait for ACK, unit:ms
- Returns
- bool subscribe's ack result true:subscribe/unsubscribe success false:subscribe/unsubscribe failed
- Note
- if the function return true,it will print "Subscribe/Unsubscribe all flight data success!", else,it will printf "Subscribe/Unsubscribe all flight data failed!"
The documentation for this class was generated from the following files:
- osdk-core/api/inc/dji_hms.hpp
- osdk-core/api/src/dji_hms.cpp