Module cameleon::u3v::register_map

source ·
Expand description

U3V device register classes.

This module abstracts physical configuration of the device and provides an easy access to its registers.

Examples

use cameleon::Camera;
use cameleon::u3v;
use cameleon::genapi;

// Enumerates cameras connected to the host.
let mut cameras = u3v::enumerate_cameras().unwrap();

// If no camera is found, return.
if cameras.is_empty() {
    return;
}

let mut camera = cameras.pop().unwrap();
// Opens the camera.
camera.open();

let ctrl = &mut camera.ctrl;
// Get Abrm.
let abrm = ctrl.abrm().unwrap();

// Read serial number from ABRM.
let serial_number = abrm.serial_number(ctrl).unwrap();
println!("{}", serial_number);

// Check user defined name feature is supported.
// If it is suppoted, read from and write to the register.
let device_capability = abrm.device_capability().unwrap();
if device_capability.is_user_defined_name_supported() {
    // Read from user defined name register.
    let user_defined_name = abrm.user_defined_name(ctrl).unwrap().unwrap();
    println!("{}", user_defined_name);

    // Write new name to the register.
    abrm.set_user_defined_name(ctrl, "cameleon").unwrap();
}

Structs

  • Represent Technology Agnostic Boot Register Map (ABRM), refer to GenCP specification for more information about ABRM.
  • Indicate some optional features are supported or not.
  • Configuration of the device.
  • XML file information.
  • Manifest entry describes GenApi XML properties.
  • ManifestTable provides iterator of ManifestEntry.
  • Represent Technology Specific Boot Register Map (SBRM).
  • Represent Streaming Interface Register Map (SIRM).
  • Indicate some optional U3V specific features are supported or not.

Enums

  • Represent file type of GenICam XML file on the device’s memory.