rsiot/components/cmp_plc/plc/library/state_machine/
q.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
use std::time::Duration;

use serde::{Deserialize, Serialize};

/// Область памяти output
#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
pub struct Q<TState> {
    /// Текущее состояние
    pub current_state: TState,
    /// Время нахождения в состоянии
    pub state_time: Duration,
    /// Первое выполнение в новом цикле
    pub is_first_cycle: bool,
}