/*
 * Copyright (c) 2024 - 2025 Automated Design Corp. All Rights Reserved.
 * Created Date: Tu Feb 2024
 * -----
 * Last Modified: Sat Mar 15 2025
 * -----
 */

//
// Copyright (C) 2024 Automated Design Corp. All Rights Reserved.
// Created Date: 2024-02-02 17:05:57
// -----
// Last Modified: 2025-02-18 13:58:58
// -----
//
//

/// One-to-many notifier. Some cool lifetime concepts, but tokio::channels are usually a better choice.
pub mod notifier;
/// Timer on delay.
pub mod ton;

/// Register value used for flexible communication with a Codesys-based PLC,
/// although it should be compatible with any controller.
pub mod register_value;

pub mod command_arg_tuple;

/// An object dictionary similar to CANopen or CoE, used as registers with CommandFsm implementations.
pub mod object_dictionary;

/// An actor for tick events and command routing.
pub mod actor;
/// CommandMessage and CommandMessageResult. Used for our message pipelines and IPC.
pub mod command;
pub mod command_fsm;
/// Variant data type.
pub mod variant;

pub mod heartbeat;

/// Asynchronous, bi-directional comms channel.
pub mod async_channel;

/// Subscription mechanism, intended for async nodes to subscribe to messages.
pub mod subscription;

/// Low-latency bus communication
pub mod async_bus;

/// Shared Memory mapping
pub mod shm;


/// Corelink IPC Protocol
pub mod corelink;

/// IPC module for CommandMessage-based communication between autocore-server
/// and external modules. Provides ModuleHandler trait (analogous to AsyncServelet),
/// TCP transport with length-prefix framing, and TopicRouter for message dispatch.
pub mod ipc;

/// Size-limited rotating file writer for bounded log disk usage.
pub mod rotating_file_writer;
pub use rotating_file_writer::RotatingFileWriter;

/// Per-run timestamped log files with bounded run-count retention
/// (`<base>.<YYYYMMDDThhmmss>.log`, keeping the newest N runs).
pub mod run_log;
pub use run_log::{create_run_log, open_default_run_log, resolve_log_dir, RunLog};

/// One-call service logger setup: per-run file + size cap + simplelog, wired
/// together so the disk-usage cap can't be left out.
pub mod service_logger;
pub use service_logger::{init_service_logger, ServiceLog, MAX_RUN_BYTES};