Expand description
This module provides access to GenApi
features of GenICam
a compatible camera.
Examples
// Loads `GenApi` context.
camera.load_context().unwrap();
let mut params_ctxt = camera.params_ctxt().unwrap();
// Get `Gain` node of `GenApi`.
// `GenApi SFNC` defines that `Gain` node should have `IFloat` interface,
// so this conversion would be success if the camera follows that.
// Some vendors may define `Gain` node as `IInteger`, in that case, use
// `as_integer(¶ms_ctxt)` instead of `as_float(¶ms_ctxt).
let gain_node = params_ctxt.node("Gain").unwrap().as_float(¶ms_ctxt).unwrap();
// Get the current value of `Gain`.
if gain_node.is_readable(&mut params_ctxt).unwrap() {
let value = gain_node.value(&mut params_ctxt).unwrap();
println!("{}", value);
}
// Set `0.1` to `Gain`.
if gain_node.is_writable(&mut params_ctxt).unwrap() {
gain_node.set_value(&mut params_ctxt, 0.1).unwrap();
}
Structs
- A node that has
IBoolean
interface. - A node that has
Category
interface. - A node that has
ICommand
interface. - Default
GenApi
context.
This context caches values ofGenApi
nodes if possible to reduce transaction. - Represents an entry of [
EnumerationNode]
. - A node that has
IEnumeration
interface. - A node that has
IFloat
interface. - A node that has
IInteger
interface GenApi
context.
This context doesn’t cache any value ofGenApi
nodes.- An uninterpreted node.
- Manages context of parameters of the device.
- A node that has
IPort
interface. - A node that has
IRegister
interface. - A sharable version of
DefaultGenApiCtxt
. - A sharable version of
NoCacheGenApiCtxt
. - A node that has
IString
interface.
Enums
- Represents
CompressionType
ofGenICam
XML file on the device’s memory.
Traits
- A trait that provides directly conversion from
GenApi
string to aGenApi
context. - A trait that provides accesss to
GenApi
context.