#[non_exhaustive]pub struct CameraEvent {
pub event_id: String,
pub name: Option<String>,
pub ts_dev: String,
pub ts_host_ns: Option<String>,
pub stream_channel: Option<u16>,
pub block_id: Option<String>,
pub features: Vec<EventFeature>,
}Expand description
One event a camera sent, with the features its XML reads from it.
Published on crate::keys::events while event monitoring is on.
64-bit counters are decimal strings, so a JavaScript client keeps every
digit.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.event_id: StringThe event identifier the device sent, as 0x and four hex digits.
name: Option<String>The EventSelector entry the identifier belongs to, when the XML says
(viva_genicam::Camera::event_name).
ts_dev: StringDevice timestamp in ticks, decimal.
ts_host_ns: Option<String>Calibrated Unix nanoseconds; absent without a fitted device clock. Never the time the event arrived. Negative values precede the epoch.
stream_channel: Option<u16>GigE Vision: the stream channel the event concerns. Absent for USB3 Vision, whose events carry none.
block_id: Option<String>GigE Vision: the block the event concerns, decimal. Absent for USB3 Vision.
features: Vec<EventFeature>The features the event’s port feeds, each with its value or the error that kept it from being read, sorted by name.
Implementations§
Source§impl CameraEvent
impl CameraEvent
Sourcepub fn with_features<E: Display>(
self,
features: impl IntoIterator<Item = (String, Result<String, E>)>,
) -> Self
pub fn with_features<E: Display>( self, features: impl IntoIterator<Item = (String, Result<String, E>)>, ) -> Self
Attach the features read from this event, as
viva_genicam::Camera::event_features returns them.
Trait Implementations§
Source§impl Clone for CameraEvent
impl Clone for CameraEvent
Source§impl Debug for CameraEvent
impl Debug for CameraEvent
Source§impl<'de> Deserialize<'de> for CameraEvent
impl<'de> Deserialize<'de> for CameraEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for CameraEvent
Source§impl PartialEq for CameraEvent
impl PartialEq for CameraEvent
Source§impl Serialize for CameraEvent
impl Serialize for CameraEvent
impl StructuralPartialEq for CameraEvent
Source§impl TS for CameraEvent
impl TS for CameraEvent
Source§type WithoutGenerics = CameraEvent
type WithoutGenerics = CameraEvent
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or (). The only requirement for these dummy types is that
EXPORT_TO must be None. Read moreSource§type OptionInnerType = CameraEvent
type OptionInnerType = CameraEvent
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete(cfg: &Config) -> String
fn decl_concrete(cfg: &Config) -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl(cfg: &Config) -> String
fn decl(cfg: &Config) -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline(cfg: &Config) -> String
fn inline(cfg: &Config) -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened(cfg: &Config) -> String
fn inline_flattened(cfg: &Config) -> String
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported, relative to the output directory.
The returned path does not include any base directory. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
§fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
fn dependencies(cfg: &Config) -> Vec<Dependency>where
Self: 'static,
§fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export_all]. Read more§fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
fn export_all(cfg: &Config) -> Result<(), ExportError>where
Self: 'static,
TS::export]. Read moreAuto Trait Implementations§
impl Freeze for CameraEvent
impl RefUnwindSafe for CameraEvent
impl Send for CameraEvent
impl Sync for CameraEvent
impl Unpin for CameraEvent
impl UnsafeUnpin for CameraEvent
impl UnwindSafe for CameraEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.