mirror of
https://github.com/azaion/gps-denied-desktop.git
synced 2026-04-22 22:46:36 +00:00
initial structure implemented
docs -> _docs
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
from .base import FlightLifecycleManagerBase
|
||||
from .flight_lifecycle_manager import FlightLifecycleManager
|
||||
|
||||
__all__ = ["FlightLifecycleManagerBase", "FlightLifecycleManager"]
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Optional
|
||||
|
||||
from models.flight import Flight, Waypoint
|
||||
from models.core import GPSPoint
|
||||
|
||||
|
||||
class FlightLifecycleManagerBase(ABC):
|
||||
@abstractmethod
|
||||
async def create_flight(
|
||||
self,
|
||||
name: str,
|
||||
description: str,
|
||||
start_gps: GPSPoint,
|
||||
rough_waypoints: list[GPSPoint],
|
||||
camera_params: dict,
|
||||
altitude: float,
|
||||
) -> Flight:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def delete_flight(self, flight_id: str) -> bool:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def update_waypoints(
|
||||
self, flight_id: str, waypoints: list[Waypoint]
|
||||
) -> bool:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def get_flight(self, flight_id: str) -> Optional[Flight]:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def start_processing(self, flight_id: str) -> bool:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def stop_processing(self, flight_id: str) -> bool:
|
||||
pass
|
||||
|
||||
@abstractmethod
|
||||
async def get_processing_status(self, flight_id: str) -> dict:
|
||||
pass
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
from typing import Optional
|
||||
|
||||
from .base import FlightLifecycleManagerBase
|
||||
from models.flight import Flight, Waypoint
|
||||
from models.core import GPSPoint
|
||||
|
||||
|
||||
class FlightLifecycleManager(FlightLifecycleManagerBase):
|
||||
async def create_flight(
|
||||
self,
|
||||
name: str,
|
||||
description: str,
|
||||
start_gps: GPSPoint,
|
||||
rough_waypoints: list[GPSPoint],
|
||||
camera_params: dict,
|
||||
altitude: float,
|
||||
) -> Flight:
|
||||
raise NotImplementedError
|
||||
|
||||
async def delete_flight(self, flight_id: str) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
async def update_waypoints(
|
||||
self, flight_id: str, waypoints: list[Waypoint]
|
||||
) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
async def get_flight(self, flight_id: str) -> Optional[Flight]:
|
||||
raise NotImplementedError
|
||||
|
||||
async def start_processing(self, flight_id: str) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
async def stop_processing(self, flight_id: str) -> bool:
|
||||
raise NotImplementedError
|
||||
|
||||
async def get_processing_status(self, flight_id: str) -> dict:
|
||||
raise NotImplementedError
|
||||
|
||||
Reference in New Issue
Block a user