Struct Master

Source
pub struct Master { /* private fields */ }

Implementations§

Source§

impl Master

Source

pub fn try_new<S: Into<String>>(iface: S) -> Result<Self, Error>

Source

pub fn auto_config(&mut self) -> Result<(), Error>

Automatically configure slaves and fetch SDO & PDO information.

Source

pub fn request_states(&mut self, state: AlState) -> Result<(), Error>

Source

pub fn check_states( &mut self, state: AlState, timeout: Duration, ) -> Result<AlState, Error>

Source

pub fn slaves(&self) -> &[Slave]

Source

pub fn slaves_mut(&mut self) -> &mut [Slave]

Source

pub fn states(&mut self) -> Result<Vec<AlState>, Error>

Source

pub fn send_processdata(&mut self) -> Result<(), Error>

Source

pub fn recv_processdata(&mut self) -> Result<usize, Error>

Source

pub fn group_outputs_wkc(&mut self, i: usize) -> Result<usize, Error>

Source

pub fn group_inputs_wkc(&mut self, i: usize) -> Result<usize, Error>

Source

pub fn slave_count(&self) -> usize

Source

pub fn max_group(&self) -> usize

Source

pub fn dc_time(&self) -> i64

Source

pub fn read_od_list( &mut self, slave: SlavePos, ) -> Result<Vec<(SdoInfo, Vec<Option<SdoEntryInfo>>)>, Error>

Source

pub fn read_sdo<'t>( &mut self, slave: SlavePos, idx: SdoIdx, access_complete: bool, target: &'t mut [u8], timeout: Duration, ) -> Result<&'t mut [u8], Error>

Source

pub fn read_sdo_entry( &mut self, slave: SlavePos, idx: SdoIdx, timeout: Duration, ) -> Result<Value, Error>

Source

pub fn read_sdo_complete( &mut self, slave: SlavePos, idx: Idx, timeout: Duration, ) -> Result<Vec<Option<Value>>, Error>

Source

pub fn write_sdo( &mut self, slave: SlavePos, idx: SdoIdx, access_complete: bool, data: &[u8], timeout: Duration, ) -> Result<(), Error>

Source

pub fn write_sdo_entry( &mut self, slave: SlavePos, idx: SdoIdx, value: Value, timeout: Duration, ) -> Result<(), Error>

Source

pub fn pdo_values(&self) -> Vec<Vec<(Idx, Vec<Value>)>>

Source

pub fn set_pdo_value( &mut self, slave: SlavePos, idx: PdoEntryIdx, v: Value, ) -> Result<(), Error>

Auto Trait Implementations§

§

impl Freeze for Master

§

impl RefUnwindSafe for Master

§

impl !Send for Master

§

impl !Sync for Master

§

impl Unpin for Master

§

impl UnwindSafe for Master

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.