blob: f627066cb265d10b00dd64cfb0f5d660edb88eee [file] [log] [blame]
// Copyright 2025 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//! This module defines the central application state structure used throughout the application.
use crate::handlers::chassis::ChassisState;
use crate::telemetry_source_manager::telemetry_source_manager::TelemetrySourceManager;
use std::sync::Arc;
/// Represents the global state of the application.
///
/// This structure holds shared state that can be accessed across different parts of the application.
/// It is typically wrapped in an `Arc` for thread-safe sharing.
pub struct AppState {
/// The current state of the chassis.
pub chassis_state: ChassisState,
/// A thread-safe reference to the sensor database.
pub telemetry_source_manager: Arc<TelemetrySourceManager>,
}