IMissionManager
interface IMissionManager
Description: Airline route mission management interface: Implement operations such as uploading, starting, pausing, and resuming of airline route mission
method uploadKmzMissionFile
fun uploadKmzMissionFile(
kmzPath: String,
guid: Int,
callback: CommonCallbacks.CompletionCallbackWithProgress<Double>
)
Description: Upload the KMZ airline route execution file
Input parameters: kmzPath:kmz file path
guid:The unique ID of the aircraft mission (use timestamp)
callback:progress for upload file
Output parameters: None。
Related parameters: CompletionCallbackWithParam。
method uploadMissionFile
fun uploadMissionFile(
missionInfo: MissionInfoJNI
callback: CommonCallbacks.CompletionCallbackWithProgress<Double>
)
Description: Upload route mission execution file
Input parameters: missionInfo: MissionInfo: route mission file model callback: progress for upload file
Output parameters: None。
Related parameters: CompletionCallbackWithProgress。
method uploadMissionFile
fun uploadMissionFile(
missionFilePath: String,
callback: CommonCallbacks.CompletionCallbackWithProgress<Double>
)
Description: Upload route mission execution file
Input parameters: missionFilePath: MissionInfo: The path of the MissionInfoJNI task file saved callback: progress for upload file
Output parameters: None。
Related parameters: CompletionCallbackWithProgress。
method cancelUploadMission
fun cancelUploadMission()
Description: cancel upload current mission
Input parameters: None。
Output parameters: None。
Related parameters: CompletionCallbackWithProgress。
method startMission
fun startMission(
missionInfo: IMissionWaypointBean,
callback: CommonCallbacks.CompletionCallbackWithProgressAndParam<Void>
)
Description: After the mission file is uploaded, the task can be started
Input parameters: missionInfo: mission information (Guid), implement different task file types through IMissionWaypointBean callback: callback for progress and params
Output parameters: None。
Related parameters: CompletionCallbackWithProgressAndParam、IMissionWaypointBean。
method pauseMission
fun pauseMission(
callback: CommonCallbacks.CompletionCallbackWithParam<Void>,
isKml: Boolean? = false
)
Description: Suspension of flight missions
Input parameters: callback: callback for progress with params
isKml: is it a KMZ task
Output parameters: None。
Related parameters: CompletionCallbackWithParam。
method resumeMission
fun resumeMission(
missionInfo: IMissionWaypointBean,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>
)
Description: Resume flight line missions from where they were paused
Input parameters: missionInfo: mission information (Guid), implement different task file types through IMissionWaypointBean callback: callback for completion
Output parameters: None。
Related parameters: CompletionCallbackWithParam。
method exitMission
fun exitMission(
callback: CommonCallbacks.CompletionCallbackWithParam<Void>,
isKml: Boolean? = false
)
Description: Exit waypoint mission mode
Input parameters: callback: callback for completion
isKml: is it a KMZ task
Output parameters: None。
Related parameters: CompletionCallbackWithParam。
method addWpMissionExecuteStateListener
fun addWaypointMissionExecuteStateListener(listener: CommonCallbacks.KeyListener<MissionWaypointStatusReportNtfyBean>)
Description: Set the listener for the execution status of the airline route mission. It can be used to monitor the execution status of the airline route mission, such as: the airline route mission is in execution, paused, completed, task progress, and other statuses
Input parameters: listener: listener for way point status
Output parameters: None。
Related parameters: KeyListener,MissionWaypointStatusReportNtfyBean。
method removeWpMissionExecuteStateListener
fun removeWaypointMissionExecuteStateListener(listener: CommonCallbacks.KeyListener<MissionWaypointStatusReportNtfyBean>)
Description: Remove the listener of the route task execution status
Input parameters: listener: listener for way point status
Output parameters: None。
Related parameters: KeyListener,MissionWaypointStatusReportNtfyBean。
method queryMissionBreakpointInfo
fun queryMissionBreakpointInfo(
param: MissionWaypointGUIDBean,
callback: CommonCallbacks.CompletionCallbackWithParam<MissionWaypointBreakRspBean>
)
Description: Query task breakpoint information
Input parameters: param: mission GUID model callback: callback on complete od way point break response
Output parameters: None。
Related parameters: CompletionCallbackWithParam, MissionWaypointBreakRspBean。
method resumeBeakpointMission
fun resumeBeakpointMission(
guidBean: IMissionWaypointBean,
callback: CommonCallbacks.CompletionCallbackWithParam<Void>)
Description: resume breakpoint mission
Input parameters: sourcePath: mission information (Guid), implement different task file types through IMissionWaypointBean callback: call back when finish
Output parameters: None。
Related parameters: None。
class MissionWaypointStatusReportNtfyBean
Description: mission execute status report
data class MissionWaypointStatusReportNtfyBean(
/**
* timestamp; uint: ms
*/
var timestamp: Long = 0L,
/**
* MissionID
*/
var missionId: Int = 0,
/**
* waypoint index
*/
var wpSeq: Int = 0,
/**
* remain Distance
*/
var remainDistance: Int = 0,
/**
* reference MISSION_TYPE
*/
var missionType: MissionTypeEnum = MissionTypeEnum.UNKNOWN,
/**
* current take photo number
*/
var photoNum: Int = 0,
/**
* remain Time; uint:s
*/
var remainTime: Int = 0,
/**
* current state, reference MISSION_CURRENT_STATUS
*/
var status: MissionCurrentStateEnum = MissionCurrentStateEnum.UNKNOWN,
/**
* mission guid
*/
var guid: Int = 0,
/**
* current action index
*/
var actionSeq: Int = 0,
/**
* waypoint array status; 0 - arrived; 1 - Not arrived
*/
var arrived: Int = 0,
/**
* mission progress %
*/
var percent: Int = 0,
/**
* current task stage
*/
var taskStageIndex: Int = 4
) {
fun isKmzMission(): Boolean
}