pub struct HeliosDacWrapper { /* private fields */ }

Implementations§

Examples found in repository?
examples/list_devices.rs (line 5)
2
3
4
5
6
7
8
9
10
11
12
13
14
pub fn main() {
    use helios_dac::wrapper::HeliosDacWrapper;

    let mut controller = HeliosDacWrapper::new();
    let device_count = controller.open_devices().unwrap();

    for i in 0..device_count {
        let name = controller.name(i).unwrap();
        let status = controller.status(i);

        println!("{}: {:?}", name, status);
    }
}
More examples
Hide additional examples
examples/frames.rs (line 9)
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pub fn main() {
    use helios_dac::wrapper::HeliosDacWrapper;

    let frames = get_frames();

    let mut controller = HeliosDacWrapper::new();
    let device_count = controller.open_devices().unwrap();

    for i in 0..device_count {
        for frame in frames.clone() {
            controller.write_frame(i, frame).unwrap();
        }

        controller.stop(i).unwrap();
    }
}

Initializes drivers, opens connection to all devices Returns number of all available devices. NB: To re-scan for newly connected DACs after this function has once been called before, you must first call CloseDevices()

Examples found in repository?
examples/list_devices.rs (line 6)
2
3
4
5
6
7
8
9
10
11
12
13
14
pub fn main() {
    use helios_dac::wrapper::HeliosDacWrapper;

    let mut controller = HeliosDacWrapper::new();
    let device_count = controller.open_devices().unwrap();

    for i in 0..device_count {
        let name = controller.name(i).unwrap();
        let status = controller.status(i);

        println!("{}: {:?}", name, status);
    }
}
More examples
Hide additional examples
examples/frames.rs (line 10)
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pub fn main() {
    use helios_dac::wrapper::HeliosDacWrapper;

    let frames = get_frames();

    let mut controller = HeliosDacWrapper::new();
    let device_count = controller.open_devices().unwrap();

    for i in 0..device_count {
        for frame in frames.clone() {
            controller.write_frame(i, frame).unwrap();
        }

        controller.stop(i).unwrap();
    }
}

Closes and frees all devices

Writes and outputs a frame to the specified dac

device_number: dac number (0 to n where n+1 is the return value from open_devices )

Examples found in repository?
examples/frames.rs (line 14)
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pub fn main() {
    use helios_dac::wrapper::HeliosDacWrapper;

    let frames = get_frames();

    let mut controller = HeliosDacWrapper::new();
    let device_count = controller.open_devices().unwrap();

    for i in 0..device_count {
        for frame in frames.clone() {
            controller.write_frame(i, frame).unwrap();
        }

        controller.stop(i).unwrap();
    }
}

Gets status of DAC

Examples found in repository?
examples/list_devices.rs (line 10)
2
3
4
5
6
7
8
9
10
11
12
13
14
pub fn main() {
    use helios_dac::wrapper::HeliosDacWrapper;

    let mut controller = HeliosDacWrapper::new();
    let device_count = controller.open_devices().unwrap();

    for i in 0..device_count {
        let name = controller.name(i).unwrap();
        let status = controller.status(i);

        println!("{}: {:?}", name, status);
    }
}

Returns firmware version of DAC

Gets name of DAC (populates name with max 32 characters)

Examples found in repository?
examples/list_devices.rs (line 9)
2
3
4
5
6
7
8
9
10
11
12
13
14
pub fn main() {
    use helios_dac::wrapper::HeliosDacWrapper;

    let mut controller = HeliosDacWrapper::new();
    let device_count = controller.open_devices().unwrap();

    for i in 0..device_count {
        let name = controller.name(i).unwrap();
        let status = controller.status(i);

        println!("{}: {:?}", name, status);
    }
}

Sets name of DAC (name must be max 31 characters incl. null terminator)

Stops output of DAC until new frame is written (NB: blocks for 100ms)

Examples found in repository?
examples/frames.rs (line 17)
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
pub fn main() {
    use helios_dac::wrapper::HeliosDacWrapper;

    let frames = get_frames();

    let mut controller = HeliosDacWrapper::new();
    let device_count = controller.open_devices().unwrap();

    for i in 0..device_count {
        for frame in frames.clone() {
            controller.write_frame(i, frame).unwrap();
        }

        controller.stop(i).unwrap();
    }
}

Sets shutter level of DAC

Erase the firmware of the DAC, allowing it to be updated by accessing the SAM-BA bootloader

Trait Implementations§

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.