Expand description
This crate contains (mostly) safe bindings to the Aravis library.
The bindings are mostly auto-generated with the gir
tool from the gtk-rs project.
This crate currently targets version 0.8.14 of the Aravis library.
The autogenerated API uses extension traits to implement methods for many structs.
This is done by the gir
tool to emulate class inheritance.
Practically, this means that you should also look the CameraExt
trait if you want to know what you can do with a Camera
.
You can import the prelude to bring all available extension traits in scope:
use aravis::prelude::*;
§Migrating from 0.6
The API was regenerated with a new version of the gir
tool.
As a result, the public API has changed a bit:
- Getters no-longer have a
get_
prefix, so a function that was calledget_foo()
is now simply calledfoo()
. - Methods for classes without subclasses no-longer live in
*Ext
traits. For example, this means that all methods forBuffer
objects are now directly implemented on theBuffer
struct. This mostly means you can just remove the import of traits that no longer exist.
§Documentation copyright
This documentation constist mainly of original documentation of the Aravis project. The copyright and license of the Aravis project apply to those parts. The full original documentation is also available online and might help if the translation to Rust made things unclear.
Re-exports§
pub extern crate glib;
Modules§
Structs§
- Already
Initialized Error - Error returned when
Aravis::initialize
is called more than once. - Aravis
- Token representing access to the global state of the Aravis library.
- Buffer
- [class
Buffer
] provides a class for the instantiation of buffers used for the storage of the separate images of the video stream. - Camera
- [class
Aravis
] is a class for the generic control of cameras. It hides the complexity of the genicam interface by providing a simple API, with the drawback of not exposing all the available features. See [classAravis
] and [classAravis
] for a more advanced use of the Aravis library. - Chunk
Parser - [class
ChunkParser
] provides a class for the instantiation of chunk parsers used for the extraction of chunk data stored in the stream payload. - Device
Device
is an abstract base class for the control of cameras. It provides an easy access to the camera settings, and to its genicam interface for more advanced uses.- Device
Info - Information identifying a GenICam camera.
- DomCharacter
Data - This is an Abstract Base Class, you cannot instantiate it.
- DomDocument
- This is an Abstract Base Class, you cannot instantiate it.
- DomDocument
Fragment - This is an Abstract Base Class, you cannot instantiate it.
- DomElement
- This is an Abstract Base Class, you cannot instantiate it.
- DomNamed
Node Map - This is an Abstract Base Class, you cannot instantiate it.
- DomNode
- This is an Abstract Base Class, you cannot instantiate it.
- DomNode
Child List - Implements
- DomNode
List - This is an Abstract Base Class, you cannot instantiate it.
- DomText
- Implements
- Evaluator
- Implements
- Fake
Camera FakeCamera
is a class that simulate a real camera, which provides methods for the implementation ofFakeDevice
andFakeStream
.- Fake
Device - Properties
- Fake
Interface - Implements
- Fake
Stream - Implements
- Gc
Gc
implements the root document for the storage of the Genicam feature nodes. It builds the node tree by parsing an xml file in the Genicam standard format. See http://www.genicam.org.- GcBoolean
- Implements
- GcCategory
- Implements
- GcCommand
- Implements
- GcConverter
- This is an Abstract Base Class, you cannot instantiate it.
- GcConverter
Node - Implements
- GcEnum
Entry - Implements
- GcEnumeration
- Implements
- GcFeature
Node GcFeatureNode
provides a base class for the implementation of the different types of Genicam feature node (Group, Integer, Float, Enumeration…).- GcFloat
- Implements
- GcFloat
Node - Implements
- GcFloat
RegNode - Implements
- GcGroup
Node - Implements
- GcIndex
Node - Implements
- GcInt
Converter Node - Implements
- GcInt
RegNode - Implements
- GcInt
Swiss Knife Node - Implements
- GcInteger
- Implements
- GcInteger
Node - Implements
- GcInvalidator
Node - Implements
- GcMasked
IntReg Node - Implements
- GcNode
GcNode
provides a base class for the implementation of the different types of Genicam nodes.- GcPort
- Implements
- GcProperty
Node GcPropertyNode
provides a base class for the implementation of the different types of Genicam property nodes (Value, pValue, Endianness…).- GcRegister
- Implements
- GcRegister
Description Node - Implements
- GcRegister
Node - Implements
- GcSelector
- Implements
- GcString
- Implements
- GcString
Node - Implements
- GcString
RegNode - Implements
- GcStruct
Entry Node - Implements
- GcStruct
RegNode - Implements
- GcSwiss
Knife - This is an Abstract Base Class, you cannot instantiate it.
- GcSwiss
Knife Node - Implements
- GcValue
Indexed Node - Implements
- GvDevice
- Properties
- GvFake
Camera GvFakeCamera
is a class that simulates a real GigEVision camera.- GvInterface
- Implements
- GvStream
- Properties
- GvStream
Option - Interface
Interface
is an abstract base class for camera discovery. It maintains a list of the available devices and helps to instantiate the correspondingDevice
objects. If the user already knows the device id of the device, he should not worry about this class and just useCamera::new()
orarv_open_device()
.- Pixel
Format - Stream
Stream
provides an abstract base class for the implementation of video stream reception threads. The interface between the reception thread and the main thread is done using asynchronous queues, containingBuffer
objects.- UvDevice
- Properties
- UvInterface
- Implements
- UvStream
- Properties
- XmlSchema
- Implements
Enums§
- Acquisition
Mode - Auto
- Buffer
Part Data Type - Buffer
Payload Type - Buffer
Status - Chunk
Parser Error - Component
Selection Flags - Device
Error - DomNode
Type - Exposure
Mode - GcAccess
Mode - Specifies access mode for feature nodes and registers.
- GcCachable
- Specifies caching mode for register values.
- GcDisplay
Notation - Number display notations for showing numbers in user interfaces.
- GcError
- GcIs
Linear - Describes relationship between TO and FROM variables in Converter feature nodes.
- GcName
Space - Specifies feature node or register name space type. Standard name space features are listed in Genicam materials. Any other vendor-specific features should use custom name space type.
- GcProperty
Node Type - GcRepresentation
- Number representation formats.
- GcSignedness
- Specifies signedness of integer registers. Per standard Genicam internally uses signed 64-bit signed integers for representing all integer registers. Therefore unsigned 64-bit integers are not available.
- GcVisibility
- Specifies feature node recommended visibility in user interfaces.
- GvIp
Configuration Mode - GvPacket
Size Adjustment - GvStream
Packet Resend - GvStream
Socket Buffer - Image
Error - Register
Cache Policy - Stream
Callback Type - Describes when the reason the stream callback is called. You are probably more interested in
Init
andBufferDone
. - UvUsb
Mode - XmlSchema
Error
Traits§
- Camera
Ext - Trait containing all
Camera
methods. - Camera
ExtManual - Trait containing additional
Camera
methods. - Device
Ext - Trait containing all
Device
methods. - Device
ExtManual - Trait containing additional
Device
methods. - DomCharacter
Data Ext - Trait containing all
DomCharacterData
methods. - DomDocument
Ext - Trait containing all
DomDocument
methods. - DomElement
Ext - Trait containing all
DomElement
methods. - DomNamed
Node MapExt - Trait containing all
DomNamedNodeMap
methods. - DomNode
Ext - Trait containing all
DomNode
methods. - DomNode
List Ext - Trait containing all
DomNodeList
methods. - GcFeature
Node Ext - Trait containing all
GcFeatureNode
methods. - GcFloat
Ext - Trait containing all
GcFloat
methods. - GcInteger
Ext - Trait containing all
GcInteger
methods. - GcNode
Ext - Trait containing all
GcNode
methods. - GcProperty
Node Ext - Trait containing all
GcPropertyNode
methods. - GcRegister
Ext - Trait containing all
GcRegister
methods. - GcRegister
ExtManual - Trait containing additional
GcRegister
methods. - GcSelector
Ext - Trait containing all
GcSelector
methods. - GcString
Ext - Trait containing all
GcString
methods. - Interface
Ext - Trait containing all
Interface
methods. - Stream
Ext - Trait containing all
Stream
methods.
Functions§
- bits_
per_ pixel - Calculate the bits per pixel of a given format.
- buffer_
size - Calculated the size in bytes for a pixel format and count.
- buffer_
size_ wh - Calculate the size in bytes for a image with a pixel format, width and height.
- get_
device_ ⚠list - Enumerate all available GenICam devices without mutual exclusion.