rsiot/components_config/spi_master/
fieldbus_request.rs1use std::time::Instant;
2
3use crate::components_config::master_device::RequestResponseBound;
4
5use super::Operation;
6
7#[derive(Clone, Debug)]
10pub struct FieldbusRequest {
11 pub request_creation_time: Instant,
15
16 pub request_kind: u8,
20
21 pub operations: Vec<Operation>,
23}
24impl FieldbusRequest {
27 pub fn new(request_kind: impl Into<u8>, operations: Vec<Operation>) -> Self {
29 Self {
30 request_creation_time: Instant::now(),
31 request_kind: request_kind.into(),
32 operations,
33 }
34 }
35}
36
37impl RequestResponseBound for FieldbusRequest {}