use socketcan::{errors, frame, socket, CanFrame, Socket}; use crate::can_ids::DeviceId; #[derive(Copy, Clone)] pub enum DeviceState { On, Off, Broken, Unknown, } #[derive(Copy, Clone)] pub enum DeviceType { MGM, MGT, RWL, STR, CRS, OBC, PCDU, CAM, } #[derive(Copy, Clone)] pub struct DeviceProperties { device_type: DeviceType, device_state: DeviceState, } impl DeviceProperties { pub fn new(device_type: DeviceType, device_state: DeviceState) -> DeviceProperties { return DeviceProperties { device_type, device_state, }; } }