Battery API for DJI OSDK @Details Provide API to get battery's Dynamic data. More...
#include <unistd.h>
#include <string>
#include "dji_vehicle.hpp"
#include "dji_linker.hpp"
#include "dji_hms.hpp"
#include "dji_hms_impl.hpp"
#include "dji_hms_internal.hpp"
#include "osdk_device_id.h"
#include "dji_status.hpp"
#include "osdk_command.h"
#include "dji_internal_command.hpp"
Namespaces | |
DJI | |
DJI::OSDK | |
Functions | |
bool | DJI::OSDK::replaceStr (string &str, const string oldReplaceStr, const string newReplaceStr) |
static bool | MarchErrCodeInfoTbl (DJIHMSImpl *djiHMSImpl, HMSPushData *hmsPushData) |
Compare HMS's pushing error code with the error code in the error code table, and print the prompt message. More... | |
static void | replaceHMSIdentifyStr (string &alarmInfo, uint32_t alarmId, uint8_t sensorIndex, uint8_t componentIndex) |
static E_OsdkStat | HMSRecvDataCallBack (struct _CommandHandle *cmdHandle, const T_CmdInfo *cmdInfo, const uint8_t *cmdData, void *userData) |
Variables | |
HMSErrCodeInfo | DJI::OSDK::hmsErrCodeInfoTbl [dbHMSErrNum] |
Detailed Description
Battery API for DJI OSDK @Details Provide API to get battery's Dynamic data.
HMS((Health Management System) error code table and some basic func for HMS API.
HMS(Health Management System) API for DJI OSDK implement @Details Provide API to subscribe Flight's Health State.
HMS(Health Management System) API for DJI OSDK @Details Provide API to subscribe Flight's Health State.
- Version
- 4.0.0
- Date
- APRIL 2020
@Copyright (c) 2019 DJI
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Version
- 4.0.0
- Date
- Dec 2019
@Copyright (c) 2019 DJI
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- Version
- 4.0.0
- Date
- APRIL 2020
@Copyright (c) 2020 DJI
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Function Documentation
◆ MarchErrCodeInfoTbl()
|
static |
Compare HMS's pushing error code with the error code in the error code table, and print the prompt message.
- Parameters
-
djiHMSImpl pointer to djiHMSImpl hmsPushData HMS's raw pushing data without a time stamp
- Returns
- bool pointer and status of subcribing flight check
- Note
- Each error code will print different prompt information according to different states of the aircraft (ground or air)
◆ replaceHMSIdentifyStr()
|
static |
In hmsErrCodeInfoTbl's alarmInfo,we need to replace some identified str with real data. for example, alarmid <-> 0x1a010040 , index <-> 1, component_index <-> 1