Edge SDK — Edge Adapter API Reference

Exhaustive method reference for EdgeAdapterService. For a narrative introduction, the interface's role in the gRPC flow, and worked examples, see the Edge Adapter guide.

Every method returns CompletableFuture<CommandResult> (getCapabilities returns CompletableFuture<CurrentCapabilities>). All are default methods returning NOT_IMPLEMENTED — override only what your adapter supports.

Flight Control

MethodParametersDescription
takeOff(TakeOffRequest)sn, tid, coordinatesInitiate takeoff at the given coordinates
returnToHome(ReturnToHomeRequest)sn, tid, altitudeReturn the sub-asset to its home position
goTo(GoToRequest)sn, tid, coordinatesNavigate to the specified coordinates

Dock Operations

MethodParametersDescription
openCover(String sn)snOpen the dock cover
closeCover(String sn, Boolean force)sn, forceClose the dock cover, optionally forcing it
startCharging(String sn)snStart charging the sub-asset
stopCharging(String sn)snStop charging the sub-asset
rebootAsset(String sn)snReboot the asset (dock)
bootUpSubAsset(String sn)snPower on the sub-asset (drone)
bootDownSubAsset(String sn)snPower off the sub-asset (drone)

Camera and Gimbal

MethodParametersDescription
lookAt(LookAtRequest)sn, lat, lon, alt, locked, payloadIndexPoint the camera at coordinates
changeLens(ChangeLensRequest)sn, lens, videoIdSwitch the active camera lens
changeZoom(ChangeZoomRequest)sn, lens, payloadIndex, zoomAdjust the camera zoom level
takePhoto(TakePhotoRequest)sn, payloadIndexCapture a still photo
enableGimbalTracking(String sn, boolean enabled)sn, enabledEnable or disable gimbal tracking mode
liveStreamSplitScreen(String sn, boolean enabled)sn, enabledToggle split-screen view across multiple lenses/payloads

Manual Control

MethodParametersDescription
enterManualControl(String sn)snEnter manual (joystick) control mode
exitManualControl(String sn)snExit manual control mode
manualControlInput(ManualControlInput)inputCalled once per incoming stick-input frame while a manual control session is active

Live Streaming

MethodParametersDescription
startLiveStream(LiveStreamStartRequest)sn, tid, videoId, streamServer, videoTypeStart a video live stream
stopLiveStream(LiveStreamStopRequest)sn, tid, videoIdStop a video live stream

Debug and Maintenance

MethodParametersDescription
enterRemoteDebugMode(String sn)snEnter remote debug mode on the device
closeRemoteDebugMode(String sn)snExit remote debug mode
changeAcMode(String sn, String mode)sn, modeChange the air conditioner mode of the asset

Task Execution

MethodParametersDescription
prepareTask(String taskId, String tid)taskId, tidPrepare a task for execution. Receives only a task ID — see the note below
startTask(String taskId, String tid)taskId, tidStart executing a previously prepared task. Receives only a task ID — see the note below
pauseTask(String taskId)taskIdPause a running task
resumeTask(String taskId)taskIdResume a paused task
stopTask(String taskId)taskIdStop a running task

The task methods receive only a task ID. To act on one, resolve it with ConnectorService.getTaskById(taskId) and read the WaypointTaskConfig off the returned TaskDTO — that is what the DJI adapter does to build and upload its KMZ. SAPIENT implements them too, because its own protocol owns the task that ID refers to. MAVLink and the simulator implement none of them — see Custom Commands for the alternative path they use instead.

Custom Commands

MethodParametersDescription
sendCustomCommand(String sn, String componentId, String commandType, Map<String, Object> params)sn, componentId, commandType, paramsHandle a command that doesn't map to a standard method above

See Command ID naming convention for how to name a custom command.

Capability Reporting

MethodParametersDescription
getCapabilities(String sn)snReturn the set of capabilities this adapter supports

CommandResult

Static factory methods on CommandResult:

// Success without transaction ID
CommandResult.success("Message", sn);

// Success with transaction ID
CommandResult.success("Message", tid, sn);

// Error without transaction ID
CommandResult.error("Error description", sn);

// Error with transaction ID
CommandResult.error("Error description", tid, sn);

// Accepted, but still running asynchronously — pass externalExecutionId so a later
// stopTask call can reference this specific run
CommandResult.success("Waypoint mission started", vendorExecutionId, sn);

// Not Implemented (used by default methods)
CommandResult.notImplemented("Command not supported", sn);

CommandResult.ResultType:

ValueMeaning
SUCCESScommand executed successfully
ERRORcommand failed
NOT_IMPLEMENTEDcommand is not supported by this adapter

Default Implementation Convenience Methods

EdgeAdapterServiceImpl extends the interface with convenience overloads that automatically use the configured serial number from EdgeClientConfig.sn():

  • openCover() / closeCover() (no sn parameter)
  • startCharging() / stopCharging()
  • rebootAsset()
  • bootUpSubAsset() / bootDownSubAsset()
  • enterManualControl() / exitManualControl()
  • getCapabilities()
  • enableGimbalTracking(boolean)
  • changeAcMode(String mode)

Available automatically if your adapter extends EdgeAdapterServiceImpl instead of implementing EdgeAdapterService directly.

Error Handling

Exceptions thrown by your adapter code are caught by the gRPC layer and mapped to error responses:

Exception TypegRPC Error Code
IllegalArgumentExceptionCLIENT_ERROR
UnsupportedOperationExceptionCLIENT_ERROR
TimeoutExceptionSYSTEM_ERROR
All other exceptionsSYSTEM_ERROR

You can also return explicit error results using CommandResult.error(...) instead of throwing exceptions for expected failure conditions.

Was this page helpful?