import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; import { CommandResult, Coordinate } from "./VehicleCommon"; import { Empty } from "./google/protobuf/empty"; export declare const protobufPackage = ""; /** * One step in a mission. The `step` oneof picks the action; fields * that don't apply to the chosen step are simply absent (no opaque * `param1..4` carrying overloaded meanings). * * Sequence position is the index in Mission.items — there is no * separate `seq` field. Connectors that need wire-level sequence * numbers (e.g. MAVLink MISSION_ITEM_INT) synthesise them from the * list index on upload. */ export interface MissionItem { autocontinue: boolean; waypoint?: Waypoint | undefined; loiter?: Loiter | undefined; delay?: Delay | undefined; returnHome?: ReturnHome | undefined; changeSpeed?: ChangeSpeed | undefined; setHome?: SetHome | undefined; } export interface Mission { items: MissionItem[]; } /** * Drive to a position and (optionally) hold for a fixed duration before * proceeding. `altitude_m` is interpreted per the connector's vehicle * type (surface vessels typically use 0). `acceptance_radius_m = 0` * means "use the autopilot's default". */ export interface Waypoint { position: Coordinate | undefined; altitudeM: number; acceptanceRadiusM: number; /** * Hold at the waypoint for this many seconds before advancing. * 0 = pass straight through. */ holdTimeS: number; } /** Orbit a position. Termination picks how the loiter ends. */ export interface Loiter { position: Coordinate | undefined; altitudeM: number; radiusM: number; /** loiter forever */ unlimited?: Empty | undefined; /** loiter for N complete orbits */ turns?: number | undefined; /** loiter for this many seconds */ durationS?: number | undefined; } /** Wait in place for a fixed duration before advancing. */ export interface Delay { durationS: number; } /** Return to the launch / home position. */ export interface ReturnHome { } /** Change the cruise speed used by subsequent waypoints. */ export interface ChangeSpeed { speedMps: number; } /** Update the vehicle's home position to a specific coordinate. */ export interface SetHome { position: Coordinate | undefined; altitudeM: number; } /** * Autopilot returns MAV_MISSION_RESULT (not MAV_RESULT) for mission * uploads. The connector maps MAV_MISSION_RESULT values into * CommandResult (NO_SPACE/INVALID_* /UNSUPPORTED_FRAME etc. fold into * FAILED/DENIED/UNSUPPORTED as appropriate) and preserves the raw code * in raw_autopilot_result so callers can disambiguate. */ export interface MissionUploadResponse { result: CommandResult; rawAutopilotResult: number; detail: string; } /** * Clear all mission items from the autopilot. Maps onto MAVLink * MISSION_CLEAR_ALL. Calling this RPC at all is the signal; there is no * "clear=false". */ export interface ClearMissionRequest { timestamp: Date | undefined; } export interface ClearMissionResponse { result: CommandResult; rawAutopilotResult: number; detail: string; } /** * Jump to a specific waypoint in the uploaded mission. Maps onto MAVLink * MISSION_SET_CURRENT. The autopilot does not COMMAND_ACK this; the * connector observes the next MISSION_CURRENT and reports the seq it * reports as actually current. */ export interface SetCurrentWaypointRequest { timestamp: Date | undefined; seq: number; } export interface SetCurrentWaypointResponse { result: CommandResult; rawAutopilotResult: number; detail: string; /** * The seq the autopilot reports as current after the call, polled * from MISSION_CURRENT. 0 if not observed within the wait window. */ seqActual: number; } export declare const MissionItem: MessageFns; export declare const Mission: MessageFns; export declare const Waypoint: MessageFns; export declare const Loiter: MessageFns; export declare const Delay: MessageFns; export declare const ReturnHome: MessageFns; export declare const ChangeSpeed: MessageFns; export declare const SetHome: MessageFns; export declare const MissionUploadResponse: MessageFns; export declare const ClearMissionRequest: MessageFns; export declare const ClearMissionResponse: MessageFns; export declare const SetCurrentWaypointRequest: MessageFns; export declare const SetCurrentWaypointResponse: MessageFns; export interface VehicleMission { upload_mission(request: Mission): Promise; download_mission(request: Empty): Promise; clear_mission(request: ClearMissionRequest): Promise; set_current_waypoint(request: SetCurrentWaypointRequest): Promise; } export declare const VehicleMissionServiceName = "VehicleMission"; export declare class VehicleMissionClientImpl implements VehicleMission { private readonly rpc; private readonly service; constructor(rpc: Rpc, opts?: { service?: string; }); upload_mission(request: Mission): Promise; download_mission(request: Empty): Promise; clear_mission(request: ClearMissionRequest): Promise; set_current_waypoint(request: SetCurrentWaypointRequest): Promise; } interface Rpc { request(service: string, method: string, data: Uint8Array): Promise; } type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; export type DeepPartial = T extends Builtin ? T : T extends globalThis.Array ? globalThis.Array> : T extends ReadonlyArray ? ReadonlyArray> : T extends {} ? { [K in keyof T]?: DeepPartial; } : Partial; type KeysOfUnion = T extends T ? keyof T : never; export type Exact = P extends Builtin ? P : P & { [K in keyof P]: Exact; } & { [K in Exclude>]: never; }; export interface MessageFns { encode(message: T, writer?: BinaryWriter): BinaryWriter; decode(input: BinaryReader | Uint8Array, length?: number): T; fromJSON(object: any): T; toJSON(message: T): unknown; create, I>>(base?: I): T; fromPartial, I>>(object: I): T; } export {};