use crate::frame::DllError;
use crate::od::{ObjectDictionary, ObjectValue};
use super::states::{NmtEvent, NmtState};
use alloc::vec::Vec;
pub trait NmtStateMachine {
fn current_state(&self) -> NmtState;
fn process_event(&mut self, event: NmtEvent, od: &mut ObjectDictionary) -> Option<Vec<DllError>>;
fn update_od_state(&self, od: &mut ObjectDictionary) {
od.write_internal(0x1F8C, 0, ObjectValue::Unsigned8(self.current_state() as u8), false).unwrap();
}
fn reset(&mut self, event: NmtEvent);
fn run_internal_initialisation(&mut self, od: &mut ObjectDictionary);
}