Skip to main content

ChainExperimentData

Struct ChainExperimentData 

Source
pub struct ChainExperimentData {
    pub action_results: Vec<ActionResult>,
    pub signal_frames: Vec<TimestampedSignalFrame>,
    pub tcp_config: TCPReaderConfig,
    pub action_timings: Vec<(Instant, Instant)>,
    pub chain_start: Instant,
    pub chain_end: Instant,
    pub total_duration: Duration,
}
Expand description

Experiment data for action chain execution with timing for each action

Fields§

§action_results: Vec<ActionResult>

Results of each action in the chain

§signal_frames: Vec<TimestampedSignalFrame>

All signal frames collected during the entire chain execution

§tcp_config: TCPReaderConfig

TCP logger configuration for context

§action_timings: Vec<(Instant, Instant)>

Start and end times for each action in the chain

§chain_start: Instant

When the entire chain started

§chain_end: Instant

When the entire chain ended

§total_duration: Duration

Duration of entire chain execution

Implementations§

Source§

impl ChainExperimentData

Source

pub fn data_during_action( &self, action_index: usize, ) -> Vec<&TimestampedSignalFrame>

Get signal data captured during a specific action in the chain

§Arguments
  • action_index - Index of the action in the chain (0-based)
§Returns

Vector of signal frames collected during the specified action

Source

pub fn data_between_actions( &self, action1_index: usize, action2_index: usize, ) -> Vec<&TimestampedSignalFrame>

Get signal data captured between two actions in the chain

§Arguments
  • action1_index - Index of first action (end time)
  • action2_index - Index of second action (start time)
§Returns

Vector of signal frames collected between the two specified actions

Source

pub fn data_before_chain( &self, duration: Duration, ) -> Vec<&TimestampedSignalFrame>

Get signal data before the chain execution

§Arguments
  • duration - How far back from chain start to collect data
§Returns

Vector of signal frames from before the chain started

Source

pub fn data_after_chain( &self, duration: Duration, ) -> Vec<&TimestampedSignalFrame>

Get signal data after the chain execution

§Arguments
  • duration - How far forward from chain end to collect data
§Returns

Vector of signal frames from after the chain ended

Source

pub fn data_for_entire_chain(&self) -> Vec<&TimestampedSignalFrame>

Get all signal data for the entire chain execution

§Returns

Vector of signal frames from chain start to chain end

Source

pub fn action_timing( &self, action_index: usize, ) -> Option<(Instant, Instant, Duration)>

Get timing information for a specific action

§Arguments
  • action_index - Index of the action in the chain
§Returns

Optional tuple of (start_time, end_time, duration)

Source

pub fn chain_summary(&self) -> (usize, usize, usize, Duration)

Get summary statistics for the chain execution

§Returns

Tuple of (total_actions, successful_actions, total_frames, chain_duration)

Trait Implementations§

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.