1use crate::kachaka_api;
2
3#[derive(Debug)]
4pub struct KachakaError {
5 pub error_code: i32,
6}
7
8#[derive(Debug)]
9pub enum KachakaApiError {
10 CommunicationError(tonic::Status),
11 ApiError(KachakaError),
12 NullResult,
13 JsonParseError(serde_json::Error),
14}
15
16#[derive(Debug)]
17pub struct Pose {
18 pub x: f64,
19 pub y: f64,
20 pub theta: f64,
21}
22
23#[derive(Debug)]
24pub enum PowerSupplyStatus {
25 Charging,
26 Discharging,
27}
28
29#[derive(Debug)]
30pub struct BatteryInfo {
31 pub power_supply_status: PowerSupplyStatus,
32 pub remaining_percentage: f64,
33}
34
35#[derive(Debug)]
36pub enum CommandState {
37 Unspecified,
38 Pending,
39 Running(kachaka_api::Command, String),
40}
41
42#[derive(Debug)]
43pub struct CommandResult {
44 pub command: kachaka_api::Command,
45 pub result: std::result::Result<(), KachakaError>,
46}