Skip to content

Commit

Permalink
Merge pull request #35 from datashapesai/fix/34
Browse files Browse the repository at this point in the history
Added method to get the active state of streams
  • Loading branch information
kevinmehall authored Oct 19, 2024
2 parents 803312a + 4bdbb01 commit be8d164
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -919,6 +919,11 @@ impl<E: StreamSample> RxStream<E> {
}
}

/// Fetch the active state of the stream.
pub fn active(&self) -> bool {
self.active
}

// TODO: activate_burst()

/// Deactivate a stream.
Expand Down Expand Up @@ -1026,6 +1031,11 @@ impl<E: StreamSample> TxStream<E> {
}
}

/// Fetch the active state of the stream.
pub fn active(&self) -> bool {
self.active
}

/// Deactivate a stream.
/// The implementation will control switches or halt data flow.
///
Expand Down

0 comments on commit be8d164

Please # to comment.