Skip to main content

GenicamError

Enum GenicamError 

Source
#[non_exhaustive]
pub enum GenicamError {
Show 30 variants GenApi(GenApiError), Xml(XmlError), Gige { during: &'static str, source: GigeError, }, U3v { during: &'static str, source: U3vError, }, Network { during: &'static str, source: Error, }, Io(Error), Configuration(ParseConfigurationError), Convert(ConvertError), MissingChunkFeature(String), UnsupportedPixelFormat(PixelFormat), CommandNotDone { name: String, waited: Duration, }, Timeout(Duration), MissingFeature { what: &'static str, tried: &'static [&'static str], }, NoEventSelection { events: Vec<String>, }, NotInControl(ControlState), PacketTooSmall { size: u32, min: u32, }, PacketTooLarge { size: u32, max: u32, }, StreamChannel { channel: u32, count: Option<u32>, }, PacketDelay { delay: Duration, problem: &'static str, }, NoInterface, InterfaceWithoutIpv4(String), NoRoute { camera: Ipv4Addr, source: Error, }, NotMulticast(SocketAddrV4), TimeSync(&'static str), NoBinningFactor { feature: &'static str, entry: String, }, NoBinningEntry { feature: &'static str, factor: i64, entries: Vec<String>, }, UnsizedFrame { pixel_format: String, }, Panicked(&'static str), Task { during: &'static str, source: JoinError, }, InsideRuntime(&'static str),
}
Expand description

Error type produced by the high level GenICam facade.

Every variant either carries what caused it as its source — a GVCP status, a USB failure, a socket’s error — or names what it refused with typed fields; nothing is flattened into text (ADR-0030). The during of a transport variant says what the facade was doing, such as "claim control".

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

GenApi(GenApiError)

A feature’s read, write or evaluation failed in the node map.

§

Xml(XmlError)

The camera’s GenApi XML could not be fetched or parsed.

§

Gige

A GigE Vision control transaction failed.

Fields

§during: &'static str

What the facade was doing.

§source: GigeError

The GVCP error: a status, a timeout, a socket’s failure.

§

U3v

A USB3 Vision transaction failed.

Fields

§during: &'static str

What the facade was doing.

§source: U3vError

The USB3 Vision error.

§

Network

A socket operation failed: binding a stream or event socket, joining a multicast group, receiving.

Fields

§during: &'static str

What the facade was doing.

§source: Error

The socket’s error.

§

Io(Error)

Reading or writing a file or stream failed.

§

Configuration(ParseConfigurationError)

A configuration file does not parse (see Camera::load_features).

§

Convert(ConvertError)

A frame’s pixels could not be converted.

§

MissingChunkFeature(String)

Required chunk feature missing from the nodemap.

§

UnsupportedPixelFormat(PixelFormat)

The camera reported a pixel format without a conversion path.

§

CommandNotDone

A command was written but the camera did not report it finished (GenICam IsDone) within the time allowed.

The write itself was acknowledged: the camera may still be acting on it, or its command register may never clear.

Fields

§name: String

The command node.

§waited: Duration

How long Camera::execute_and_wait polled.

§

Timeout(Duration)

Nothing arrived within the time a blocking call was given.

§

MissingFeature

The camera declares none of the names a standard feature goes by.

Fields

§what: &'static str

What was looked for, such as "exposure time".

§tried: &'static [&'static str]

Every name tried, in the order tried.

§

NoEventSelection

Events were asked for on a camera whose XML has no EventSelector/EventNotification; event selection has no bootstrap register to fall back on.

Fields

§events: Vec<String>

The events asked for.

§

NotInControl(ControlState)

The session does not hold control of the camera, so it neither writes nor configures a stream: it was opened as a monitor, or control was released or lost.

§

PacketTooSmall

A GVSP packet size below the smallest a stream accepts.

Fields

§size: u32

The packet size, as asked for or as the camera set it.

§min: u32

The smallest accepted.

§

PacketTooLarge

A GVSP packet size above the largest an IPv4 datagram carries.

Fields

§size: u32

The packet size asked for.

§max: u32

The largest accepted.

§

StreamChannel

A stream channel the camera does not have; count is its GevNumberOfStreamChannels, when it says.

Fields

§channel: u32

The channel asked for.

§count: Option<u32>

The channels the camera has.

§

PacketDelay

An inter-packet delay that cannot be expressed in GevSCPD’s unit.

Fields

§delay: Duration

The delay asked for.

§problem: &'static str

Why, such as "the camera reports a tick frequency of 0".

§

NoInterface

A stream needs a host interface to receive on, and none was given.

§

InterfaceWithoutIpv4(String)

The interface given has no IPv4 address.

§

NoRoute

No host interface routes to the camera; pass one explicitly.

Fields

§camera: Ipv4Addr

The camera’s address.

§source: Error

The route probe’s error.

§

NotMulticast(SocketAddrV4)

An address that is not a multicast group where one is needed: the group asked for, or where the camera streams to for a monitor.

§

TimeSync(&'static str)

Time calibration could not fit the camera’s clock.

§

NoBinningFactor

A binning enumeration entry names no factor (SVS’s On).

Fields

§feature: &'static str

The binning feature.

§entry: String

The entry it holds.

§

NoBinningEntry

No binning enumeration entry names the factor asked for.

Fields

§feature: &'static str

The binning feature.

§factor: i64

The factor asked for.

§entries: Vec<String>

The entries it has.

§

UnsizedFrame

A frame cannot be sized: the camera has no PayloadSize, and the pixel format declares no size.

Fields

§pixel_format: String

The pixel format, as the camera names it.

§

Panicked(&'static str)

A thread panicked: one holding the device’s lock, which a panic poisons, or one the call ran on.

§

Task

A background task the call waited on panicked or was cancelled.

Fields

§during: &'static str

What the task was doing.

§source: JoinError

Its join error.

§

InsideRuntime(&'static str)

A blocking call was made inside an async runtime, which it would stall; use the async API there.

Trait Implementations§

Source§

impl Debug for GenicamError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for GenicamError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for GenicamError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<ConvertError> for GenicamError

Source§

fn from(err: ConvertError) -> Self

Converts to this type from the input type.
Source§

impl From<Error> for GenicamError

Source§

fn from(source: Error) -> Self

Converts to this type from the input type.
Source§

impl From<GenApiError> for GenicamError

Source§

fn from(source: GenApiError) -> Self

Converts to this type from the input type.
Source§

impl From<GigeError> for GenicamError

Source§

fn from(source: GigeError) -> Self

Converts to this type from the input type.
Source§

impl From<ParseConfigurationError> for GenicamError

Source§

fn from(source: ParseConfigurationError) -> Self

Converts to this type from the input type.
Source§

impl From<U3vError> for GenicamError

Available on crate feature u3v only.
Source§

fn from(source: U3vError) -> Self

Converts to this type from the input type.
Source§

impl From<XmlError> for GenicamError

Source§

fn from(source: XmlError) -> Self

Converts to this type from the input type.

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
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more