Application

Application class for managing the overall SDK lifecycle and vehicle fleet.

#include <application.hpp>

Classes

class Application

Main entry point for a RogueSDK application; owns the fleet lifecycle and fleet-wide configuration.

Application()

Constructs the Application instance.

Available since v0.1
auto Init(const std::string& config_path) -> bool

Initialize the entire fleet from a master configuration.

Available since v0.1
ParameterTypeDescription
config_path const std::string& Path to the vehicle configuration file (e.g., "config.json").

Returns: true if initialization was successful, false otherwise.

auto InitFromIdentityService(const std::string& host = "127.0.0.1", uint16_t port = 14595) -> bool

Initialize the fleet by fetching configuration from the identity service.

Available since v0.2
ParameterTypeDescription
host const std::string& Identity service host (default 127.0.0.1).
port uint16_t Identity service port (default 14595).

Returns: true if the service responded and configuration loaded successfully.

auto Start() -> void

Runs the fleet update loops in the background (non-blocking).

auto Run() -> void

Blocking call that keeps the application alive.

auto Stop() -> void

Gracefully shuts down all vehicles and services.

auto GetVehicle(uint8_t id) -> VehicleSharedPtr

Retrieves a vehicle by its unique ID. Returns nullptr if not found.

ParameterTypeDescription
id uint8_t Unique identifier for the vehicle (0-255).

Returns: Shared pointer to the Vehicle instance, or nullptr if not found.

auto GetAllVehicles() -> std::vector<VehicleSharedPtr>

Returns a list of all vehicles in the fleet.

Returns: Vector of shared pointers to all Vehicle instances managed by the application.

auto SetMission(std::function<void(const std::vector<VehicleSharedPtr>&)> mission_func) -> void

Sets mission logic that coordinates multiple vehicles.

ParameterTypeDescription
mission_func std::function<void(const std::vector<VehicleSharedPtr>&)> Callable receiving the full fleet; invoked by StartMission.
auto StartMission(uint8_t vehicle_id = 0) -> void

Triggers mission start on ground control or executes onboard start.

ParameterTypeDescription
vehicle_id uint8_t Optional ID of the vehicle to trigger. If 0, triggers all vehicles.
auto GetSaveLocation() const -> std::string

Returns the configured save location: "ground", "onboard", or "both". Defaults to "ground" if not set in config.

Returns: std::string

auto GetPilotDevice() -> PilotDevicePtr

Provides access to the primary pilot controller.

Coming soon
Note:

Not yet implemented — currently returns nullptr.

Returns: Shared pointer to the primary PilotDevice.

auto GetAllPilotDevices() -> std::vector<PilotDevicePtr>

Provides access to all pilot controllers in a multi-pilot configuration.

Coming soon
Note:

Not yet implemented — currently returns an empty vector.

Returns: Vector of shared pointers to all configured pilot devices.