[][src]Struct isis_imtq_api::Imtq

pub struct Imtq<T: ImtqFFI> { /* fields omitted */ }

Structure for interacting with the ISIS iMTQ

Methods

impl Imtq<ImtqRaw>
[src]

Constructor - Returns an AdcsResult<Imtq>

Opens a connection to the underlying Imtq device.

Arguments

  • bus - I2C bus device of iMTQ
  • addr - I2C address of iMTQ
  • timeout - Timeout for watchdog kicking (in seconds)

Example

extern crate adcs_api;
extern crate isis_imtq_api;
use adcs_api::*;
use isis_imtq_api::*;


let imtq = Imtq::imtq("/dev/i2c-0", 0x40, 60)?;

impl<T: ImtqFFI> Imtq<T>
[src]

Passes a command directly to the Imtq device and returns back the response Useful for executing commands which have not been implemented in the API

Arguments

  • command - A string slice containing the command to be sent
  • rx_len - Expected length of command response
  • delay_secs - Delay between sending command and requesting response (seconds)
  • delay_nsecs - Delay between sending command and requesting response (nano seconds)

Example

extern crate adcs_api;
extern crate isis_imtq_api;
use adcs_api::*;
use isis_imtq_api::*;


let imtq = Imtq::imtq("/dev/i2c-0", 0x40, 60)?;
let cmd = vec![10, 10, 10, 10];
let result = imtq.passthrough(&cmd, 10, 0, 0)?;

Reboots the iMTQ. Performing a reset will revert all configuration options to their default values.

Example

extern crate adcs_api;
extern crate isis_imtq_api;
use adcs_api::*;
use isis_imtq_api::*;


let imtq = Imtq::imtq("/dev/i2c-0", 0x40, 60)?;
imtq.reset()?;

Trait Implementations

impl<T: ImtqFFI> Drop for Imtq<T>
[src]

Auto Trait Implementations

impl<T> Send for Imtq<T> where
    T: Send

impl<T> Sync for Imtq<T> where
    T: Sync

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]